Skip to content
New issue

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

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

Already on GitHub? # to your account

SGMUniform scheduler for Hyper loras needs support! #9397

Closed
rollingcookies opened this issue Sep 9, 2024 · 7 comments
Closed

SGMUniform scheduler for Hyper loras needs support! #9397

rollingcookies opened this issue Sep 9, 2024 · 7 comments
Labels
stale Issues that haven't received updates

Comments

@rollingcookies
Copy link

Is your feature request related to a problem? Please describe.
Your library is used in a great product like Invoke! And SGMUniform scheduler is needed to support Hyper loras! Please add support for this scheduler in diffusers library!

Describe the solution you'd like.
Add scheduler - SGMUniform

Describe alternatives you've considered.
So far, I haven't found an alternative solution.

@asomoza
Copy link
Member

asomoza commented Sep 10, 2024

Hi, thanks for opening the issue. Can you please post some images were we can see the quality of the scheduler? I like a lot to use TCD since I think is the best for this use case so maybe you can compare them?

As an alternative, we have TCD, Euler and LCM that work with HyperSD though.

@rollingcookies
Copy link
Author

Hi! Unfortunately my version of Forge does not have a TCD scheduler, I can only compare it to Euler.

Euler
00042-t2i_3823554701 Euler

Euler SGMUniform
00039-t2i_3823554701 Euler SGMUniform

Euler
00144-t2i_3838990233 Euler

Euler SGMUniform
00142-t2i_3838990233 Euler SGMUniform

Euler
00066-t2i_2865392006 Euler

Euler SGMUniform
00068-t2i_2865392006 EulerSGMUniform

Euler
00076-t2i_2865392006 Euler

Euler SGMUniform
00074-t2i_2865392006 Euler SGMUniform

Euler
00096-t2i_2210004670 Euler

Euler SGMUniform
00094-t2i_2210004670 Euler SGMUniform

Euler
00078-t2i_2865392006 Euler

Euler SGMUniform
00080-t2i_2865392006 EulerSGMUniform

@asomoza
Copy link
Member

asomoza commented Sep 10, 2024

Thank you for the examples, sadly we can't compare it to the best one we have for this right now, but It does make the image cleaner, I can see the difference. I read some people saying that it's the recommended scheduler for lighting and hyper but in the official repo they recommend this:

Lighting

# Ensure sampler uses "trailing" timesteps and "sample" prediction type.
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", prediction_type="sample")

Hyper-SD

# Use TCD scheduler to achieve better image quality
pipe.scheduler = TCDScheduler.from_config(pipe.scheduler.config)

I don't know the implementation of SGMUniform but if we don't have it, it could make sense to add it, I can't add it or make the decision about it though, @yiyixuxu WDYT?

@yiyixuxu
Copy link
Collaborator

ok we can open an issue to see if anyone in the community wants to contribute first? @asomoza

@rollingcookies
Copy link
Author

rollingcookies commented Sep 11, 2024

@asomoza @yiyixuxu Thank you for your efforts, hopefully it will come to realization. I tried to implement also comparison on the same Prompts and Seeds in Comfi, unfortunately for TSD Scheduler there is no possibility to use A1111 emulation, because it is implemented via SamplerCustom node. But for Euler SGMUniform it was possible to use KSampler (inspire) node which has A1111 support. So that also influenced the result.

My verdict: the best and cleanest result is Euler SGMUniform in Forge, second place is Euler SGMUniform from Comfi with A1111 emulation, and the last place is TCD (Comfi, node TCD ModelSampling Discrete).

Euler SGMUniform
Euler_SGMUniform_00025_

TCD
TCD_00023_

Euler SGMUniform
Euler_SGMUniform_00024_

TCD
TCD_00022_

Euler SGMUniform
Euler_SGMUniform_00023_

TCD
TCD_00021_

Euler SGMUniform
Euler_SGMUniform_00022_

TCD
TCD_00020_

Euler SGMUniform
Euler_SGMUniform_00020_

TCD
TCD_00019_

Euler SGMUniform
Euler_SGMUniform_00019_

TCD
TCD_00018_

Copy link
Contributor

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.

@github-actions github-actions bot added the stale Issues that haven't received updates label Oct 12, 2024
@asomoza
Copy link
Member

asomoza commented Oct 14, 2024

closing this since we have a diffusers equivalent of this and was added to the docs with this PR.

@asomoza asomoza closed this as completed Oct 14, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
stale Issues that haven't received updates
Projects
None yet
Development

No branches or pull requests

3 participants