Skip to content

Conversation

@osanseviero
Copy link
Contributor

Right now this gives ModuleNotFoundError: No module named 'diffusers.optimization' error.

from diffusers.optimization import get_scheduler

Do we want to expose all schedulers or do we want to force people to use get_scheduler to get them?

@osanseviero osanseviero requested a review from anton-l July 6, 2022 12:37
@patrickvonplaten
Copy link
Contributor

@anton-l - could you take a look here? :-)

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jul 22, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@anton-l anton-l left a comment

Choose a reason for hiding this comment

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

I think it's ok to expose them for now, thanks for the fix! Although I'd like to make the naming less confusing between these and the noise schedulers.

Or maybe just replace them with https://pytorch.org/docs/stable/generated/torch.optim.lr_scheduler.OneCycleLR.html and others, since they've already caught up with the ones we have in 'transformers` and here in terms of flexibility.

@anton-l anton-l merged commit 570d3f1 into main Jul 22, 2022
@patrickvonplaten
Copy link
Contributor

Very much agree here with @anton-l, let's please make sure from the very beginning that learning rate schedulers are never confused with noise schedulers.
When we talk about "schedulers" in diffusers we should always assume that we refer to the noise schedulers under src/diffusers/schedulers". I would strongly suggest to open a PR to add a lr_ prefix (for learning rate) to all learning rate schedulers. What do you think @anton-l ? E.g. the function get_scheduler should be renamed to get_lr_scheduler etc..

@patrickvonplaten patrickvonplaten deleted the osanseviero-patch-1 branch July 25, 2022 10:33
PhaneeshB pushed a commit to nod-ai/diffusers that referenced this pull request Mar 1, 2023
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
* Expose schedulers

* Update __init__.py

Co-authored-by: Anton Lozhkov <anton@huggingface.co>
shiv2110 pushed a commit to dheyoai/diffusers that referenced this pull request Aug 1, 2025
fix: fix possible OOM caused by taylorseer caches
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.

5 participants