Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoiseScheduler parameters for StableDiffusion are wrong #2049

Open
DaniyarM opened this issue Sep 5, 2023 · 3 comments · May be fixed by #2065
Open

NoiseScheduler parameters for StableDiffusion are wrong #2049

DaniyarM opened this issue Sep 5, 2023 · 3 comments · May be fixed by #2065
Labels

Comments

@DaniyarM
Copy link

DaniyarM commented Sep 5, 2023

NoiseScheduler https://github.com/keras-team/keras-cv/blob/master/keras_cv/models/stable_diffusion/noise_scheduler.py contains a bug with default parameters. For a pretrained SD it must be: NoiseScheduler(beta_start=0.00085, beta_end=0.012, beta_schedule='scaled_linear', clip_sample=False). For now it is: NoiseScheduler(beta_start=0.0001, beta_end=0.02, beta_schedule='linear', clip_sample=True). As I understand it, this happened because of copy-paste with a hugging face (where the default parameters are taken for some old GANs).

@DaniyarM DaniyarM added the type:Bug Something isn't working label Sep 5, 2023
@jbischof
Copy link
Contributor

jbischof commented Sep 5, 2023

Thanks @DaniyarM! Can you share the source of the corrected parameters?

@DaniyarM
Copy link
Author

DaniyarM commented Sep 5, 2023

It can be obtained from huggingface's diffusers like that :
from diffusers import DDIMScheduler
scheduler = DDIMScheduler.from_pretrained('runwayml/stable-diffusion-v1-5', subfolder='scheduler')
print(scheduler)

Also, it can be found in that article: https://arxiv.org/pdf/2305.08891v2.pdf (Table 1).

@ianstenbit
Copy link
Contributor

Thanks @DaniyarM for pointing this out -- feel free to send a PR to update this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants