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

pipe.scheduler.sigmas change after forward call #7904

Open
neuron-party opened this issue May 10, 2024 · 5 comments
Open

pipe.scheduler.sigmas change after forward call #7904

neuron-party opened this issue May 10, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@neuron-party
Copy link
Contributor

Describe the bug

I noticed this issue when trying to manually modify the sigmas in my pipeline scheduler. Despite changing the values in this tensor, the sigmas tensor shrinks to the number of inference steps after one inference instance. Subsequent calls no longer change the values of the sigmas.

Reproduction

pipe.scheduler.sigmas = pipe.scheduler.sigmas * 4 # manually modifying sigmas
_ = pipe(..., num_inference_steps = N)
print(pipe.scheduler.sigmas) # len is N + 1, values do not reflect the manual modifications and no longer change in subsequent calls

Logs

No response

System Info

diffusers==0.27.2

Who can help?

No response

@neuron-party neuron-party added the bug Something isn't working label May 10, 2024
@yiyixuxu
Copy link
Collaborator

hi!
if you are looking to use custom sigmas, you can pass it down as sigmas from your pipeline
see doc https://huggingface.co/docs/diffusers/main/en/using-diffusers/schedulers#custom-timestep-schedules
and this PR #7817

you will need to install diffusers from the source and use the most recent updated version

@yiyixuxu
Copy link
Collaborator

also simgas change after forward call is intended behavior because we reset the timesteps based on the num_inference_steps argument

@neuron-party
Copy link
Contributor Author

Great thanks! I noticed this functionality still isn't supported for SDXL ControlNets, specifically diffusers.StableDiffusionXLControlNet pipeline, and I was wondering if you will be adding this functionality for this pipeline? Thanks!

@yiyixuxu
Copy link
Collaborator

yes - do you want to open a PR to help us add this to the Controlnet pipeline?
if not we can ask other members of the community for help too:)

@neuron-party
Copy link
Contributor Author

PR: #7913

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants