Skip to content

EDMEulerScheduler accept sigmas, add final_sigmas_type #10734

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

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

hlky
Copy link
Contributor

@hlky hlky commented Feb 6, 2025

What does this PR do?

Support passing sigmas to set_timesteps in EDMEulerScheduler and support final_sigmas_type.

from diffusers import EDMEulerScheduler
import torch

scheduler = EDMEulerScheduler(
    sigma_min=0.002,
    sigma_max=80,
    sigma_data=0.5,
    sigma_schedule="karras",
    num_train_timesteps=1000,
    prediction_type="epsilon",
    rho=7.0,
    final_sigmas_type="sigma_min",
)
num_inference_steps = 35
sigmas = torch.arange(num_inference_steps + 1) / num_inference_steps
scheduler.set_timesteps(sigmas=sigmas)
print(scheduler.sigmas)

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@yiyixuxu

@HuggingFaceDocBuilderDev

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.

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@hlky hlky merged commit 464374f into huggingface:main Feb 7, 2025
11 of 12 checks passed
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