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

Add SetFirstSigma node #6459

Merged

Conversation

catboxanon
Copy link
Contributor

This PR adds a node to modify the first sigma value in a list of sigmas. This is applicable for models trained with zero terminal SNR. The default and max values are chosen based on the NovelAI V3 paper (which also describes, in A.2, why this first sigma value may be desired to be modified). https://arxiv.org/abs/2409.15997
Some more examples of this being used in practice can be found here: AUTOMATIC1111/stable-diffusion-webui#15608 (comment)

I personally believe this node is useful while also being straightforward enough it can live in this repo to benefit everyone.

Useful for models utilizing ztSNR. See: https://arxiv.org/abs/2409.15997
@ltdrdata
Copy link
Collaborator

It seems useful and efficient to change only the first sigma.

BTW, the paper also suggests applying Log-Sigmas. Have you tried that as well?

@comfyanonymous comfyanonymous merged commit 2cdbaf5 into comfyanonymous:master Jan 15, 2025
5 checks passed
@catboxanon
Copy link
Contributor Author

BTW, the paper also suggests applying Log-Sigmas. Have you tried that as well?

That graph is comparing the SDXL schedule vs. ZTSNR schedule in log space. The "native scheduler" described is also just the simple scheduler. If you graph the sigmas of a model using ZTSNR with the simple scheduler you get the same graph shown in the paper.
image

@catboxanon catboxanon deleted the feat/set-first-sigma branch January 15, 2025 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants