-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Add use_karras_sigmas to the EulerDiscreteScheduler init() #6155
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
Conversation
As it is, you have to call set_timesteps to initialize the correct karras sigmas noise, which isn't done during training and so can cause incorrectly set noise.
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
I don't fully understand this fix, the EulerDiscreteScheduler already has some karras sigmas |
The problem is this -> sigmas = self._convert_to_karras(in_sigmas=sigmas, num_inference_steps=num_train_timesteps) This function is only called in "set_timesteps" right now, while the add_noise and step functions expect it to have been called, which means if you're writing a training script, you need to call set_timesteps or calculate the sigmas yourself for the timesteps with 0.25 * sigma.log(), which is how svd expects the timestep input to be done. https://github.com/pixeli99/SVD_Xtend/blob/main/train_svd.py You can see it with pixeli99s training script, he had to externalize a bunch of the scheduler functionality into the training loop, with my change, much of that would not have been needed, so the 0.25 * sigma.log() part would already be done, which would mean the noisy_latents code could be done with set_noise as usual. |
cc @yiyixuxu |
@patrickvonplaten this is the issue we had discussed when making changes to Euler for SVD.
I'm not fully sure if we should put this |
If it applies to all schedulers, it'd be better to apply it directly to the schedulers in my 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. |
As it is, you have to call set_timesteps to initialize the correct karras sigmas values with the EulerDiscreteScheduler, which isn't done during training and so would cause incorrect noise for anyone attempting to implement a training script with SVD.
@patil-suraj