junhsss / consistency-models

A Toolkit for OpenAI's Consistency Models.
https://arxiv.org/abs/2303.01469
MIT License
195 stars 11 forks source link

Some generated images are noise in one batch in the training #6

Open zewei-Zhang opened 1 year ago

zewei-Zhang commented 1 year ago

Hi, I recently started training the consistency model using the code provided in the repository. However, I noticed that some generated images in one batch appear as noise. Could you please help me understand the possible reasons for this issue and suggest any solutions or workarounds to fix it? Thank you in advance for your assistance!

junhsss commented 1 year ago

Hi @zewei-Zhang! Thank you for your question. Can you please share the configurations you used?

The code saves samples before training starts for just aesthetic purposes, so it's possible that the noise-like images you observed were these samples. So please check it out!

zewei-Zhang commented 1 year ago

Hi @zewei-Zhang! Thank you for your question. Can you please share the configurations you used?

The code saves samples before training starts for just aesthetic purposes, so it's possible that the noise-like images you observed were these samples. So please check it out!

Hi, I save the comparison between real images and generated images during the training process, and after a certain number of steps, the generated images still have a lot of complete noise. The configuration I use is like the paper. And I encountered this problem with your code and my own code, as well as with the OpenAI code that just open sourced. This may be related to the learning rate, when I lowered from 4e-4, the issue was solved.

junhsss commented 1 year ago

I'm glad you were able to solve the issue! 😉 Just to let you know, I set the learning rate to 8e-5 and used a batch size of 160 for cifar10 experiment.