Skip to content

A minimum exemplar of the Palette model implemented using the PyTorch Lightning framework.

License

Notifications You must be signed in to change notification settings

guyi2000/Palette-PL-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Palette: image-to-image diffusion model

A minimum exemplar of the Palette model implemented using the PyTorch Lightning framework.

Environment Setup

Setup the environment with the following commands:

conda create -n palette
conda activate palette
# Install pytorch & torchvision
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
# Install pytorch-lightning
conda install pytorch-lightning -c conda-forge
# Install pytorch-lightning CLO
pip install "pytorch-lightning[extra]"
# Install tensorboard
conda install tensorboard
# Install opencv for python
pip install opencv-python

Then, you need download the dataset CelebaHQ here. Put it in the ./data directory and unzip.

unzip achieve.zip

Usage

To train the model, run the following command:

python main.py fit -c ./conf/config.yaml

To test the model, run the following command:

python main.py test -c ./conf/config.yaml

Acknowledgments

This code borrows heavily from guided diffusion model and so on.

About

A minimum exemplar of the Palette model implemented using the PyTorch Lightning framework.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published