improved-diffusion icon indicating copy to clipboard operation
improved-diffusion copied to clipboard

How to run this

Open AkarshanGupta opened this issue 1 year ago • 5 comments

Any one have idea how to run this ??

AkarshanGupta avatar Aug 09 '24 16:08 AkarshanGupta

Did you even read the README?

Ali-Flt avatar Sep 24 '24 11:09 Ali-Flt

Did you even read the README?

I recently downloaded both the 64x64 diffusion model and the corresponding classifier model. I've written interface code to call and integrate these two models, but I'm not getting any output. I'm finding the process a bit confusing and would greatly appreciate any guidance or assistance to resolve this issue.

AkarshanGupta avatar Sep 24 '24 15:09 AkarshanGupta

running this command from the README should generate a .npz file including the sampled images. You can modify the image_sample.py code if you want to store the samples differently.

python scripts/image_sample.py --model_path /path/to/model.pt $MODEL_FLAGS $DIFFUSION_FLAGS

Ali-Flt avatar Sep 24 '24 16:09 Ali-Flt

running this command from the README should generate a .npz file including the sampled images. You can modify the image_sample.py code if you want to store the samples differently.

python scripts/image_sample.py --model_path /path/to/model.pt $MODEL_FLAGS $DIFFUSION_FLAGS

To clarify, I need to download the ZIP file, extract it, and run the code in an IDE (such as PyCharm or VS Code). After setting everything up, I can execute the command to generate the images. Is that correct?

AkarshanGupta avatar Sep 24 '24 16:09 AkarshanGupta

You should:

  1. Create a python environment (if you don't know how look it up it's easy)
  2. In your created environment install this repository: pip install -e .
  3. Download the checkpoint file for the model you want to run from the [checkpoint] links given in this section
  4. Activate your created python environment and run python scripts/image_sample.py --model_path /path/to/model.pt $MODEL_FLAGS $DIFFUSION_FLAGS (Edit path to model and set your running arguments before running it). The running arguments should be set based on the model. Read this section

Ali-Flt avatar Sep 24 '24 16:09 Ali-Flt