diffusers
diffusers copied to clipboard
Added sampling script for unconditional training example
Added sampling script that supports both DDPM and DDIM sampling for unconditional training example
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.
Hmmm is this really needed, isn't that just equivalent to running the DDIMPipeline ?
Guess we should maybe add better examples to the DDIM pipeline?
The script enables the choice between DDPM and DDIM sampling pipelines but yeah it's basically just running those. I found it convenient to have a simple sampling script right here where it's being trained but you decide.
I'm a bit worried here because it adds quite some maintenance and will be outdated very quickly (we'll forget to update it going forward). Could we maybe instead focus on high quality example docstrings in the DDIM and DDPM pipeline. E.g. we could add a nice example to the method here: https://github.com/huggingface/diffusers/blob/f1fcfdeec5ae98b30b0939baf9e64f47c813da99/src/diffusers/pipelines/ddpm/pipeline_ddpm.py#L66 just like we add examples to other functions: https://github.com/huggingface/diffusers/blob/f1fcfdeec5ae98b30b0939baf9e64f47c813da99/src/diffusers/pipeline_utils.py#L662
=> this gives some nice docstrings as shown here: https://huggingface.co/docs/diffusers/api/diffusion_pipeline#diffusers.DiffusionPipeline.components.example
@patrickvonplaten I think good docstrings are nice but if there's an example training script and you just want to run training and then sample a bunch of images, you'd need to create this file anyway so why not just provide it so you can simply run two commands on the shell and not have to worry about implementing the additional folder creation and image saving stuff and creating a DDIMSchedule from the loaded DDPMSchedule. It's not hard, but 5 sec is better than 15 min.
I'm not sure what to think about maintenance. If people actually use it, and changes to the main code eventually break this script and you forget about it, I think it will be quite easy to fix once people post issues that it's broken?
@patrickvonplaten perhaps we can merge this script with the training script in this example so you can just use one script to train and sample?
I'm still not very in favor because https://github.com/huggingface/diffusers/pull/1234/files is essentially just calling the DDIMPipeline
Maybe cc @patil-suraj @pcuenca @anton-l here to hear your opinion
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
Sorry to only reply now, but I agree with Patrick here, since we are just calling DDIMPipeline
IMO it's necessary to have a script for this.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.