Skip to content

SGMUniform scheduler for Hyper loras needs support! #9397

Closed

Description

@rollingcookies

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.

Activity

  1. asomoza commented on Sep 10, 2024

    @asomoza
    Member

    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.

  2. rollingcookies commented on Sep 10, 2024

    @rollingcookies
    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

  3. asomoza commented on Sep 10, 2024

    @asomoza
    Member

    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?

  4. yiyixuxu commented on Sep 11, 2024

    @yiyixuxu
    Collaborator

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

  5. rollingcookies commented on Sep 11, 2024

    @rollingcookies
    Author

    @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_

  6. github-actions commented on Oct 12, 2024

    @github-actions
    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.

  7. added
    stale
    on Oct 12, 2024
  8. asomoza commented on Oct 14, 2024

    @asomoza
    Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions