git clone https://github.com/loctxmoreh/improved-diffusion
cd improved-diffusionThis example will use the cifar10 dataset, which has download script in ./datasets.
On A100 machine, use a100env.yml to create a conda environment with torch==1.7.1:
conda env create -f a100env.yml
conda activate iddpmAnd a100env2.yml to create an environment with torch==1.12.1:
conda env create -f a100env2.yml
conda activate iddpm2Run the training script train-baseline.sh to train a baseline iDDPM model. Checkpoints are saved
in OPENAI_LOGDIR (set to ./log in the script).
./train-baseline.shSet the DIFFUSION_TRAINING_TEST environment variable to train for only a
limited time. Or else, the training will go on forever.
To sample from a iDDPM checkpoint, run the sample script sample-baseline.sh.
Checkpoints are saved in OPENAI_LOGDIR. It is recommended to sample from the
ema_0.9999_*.pt checkpoints.
./sample-baseline.sh <path-to-checkpoint>
# For example:
./sample-baseline.sh log/ema_0.9999_001000.pt