zoubohao / DenoisingDiffusionProbabilityModel-ddpm-

This may be the simplest implement of DDPM. You can directly run Main.py to train the UNet on CIFAR-10 dataset and see the amazing process of denoising.
MIT License
1.48k stars 156 forks source link

Classifier guidance or classifer-free guidance? #6

Closed MMMMMz closed 1 year ago

MMMMMz commented 1 year ago

Hi, thanks for your great work!

Recently I have been working on the conditional generation of diffusion models, and I found that it has classifier guidance and classifier-free guidance. For the former, a classifier needs to be pre-trained. But I didn't find this pre-trained classifier in your code. I am a little confused if you are using the classifier-free guidance.

zoubohao commented 1 year ago

We do not need a pre-trained classifier. You can read this paper "Classifier-Free Diffusion Guidance". We can adjust the influence of guidance by using the "w" parameter in the MainCondition.py.

MMMMMz commented 1 year ago

Thanks @zoubohao for your answer! My doubts have been completely solved.