Skip to content

Conversation

zetyquickly
Copy link
Contributor

to get_scheduler func,

  • add it to the train_dreambooth.py

…_scheduler func, add it to train_dreambooth.py
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Dec 17, 2022

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

@zetyquickly
Copy link
Contributor Author

@pcuenca PR to an issue #1232

What's done:

  • exposed only two parameters power and num_cycles on top of existing get_scheduler func API. it's possible to expose all of the parameters but taking into account that the issue wasn't there before we've noticed it, I assume it would pile up the code
  • changed parameter num_cycles name of the cosine scheduler to not overlap with cosine_with_restarts, because they have different meanings
  • added new parameters to the dreambooth's args

Haven't found any test script in test folder that tests optimizers.py

Copy link
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

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

Looks good!

An alternative would be to use scheduler_kwargs in get_scheduler, but since we only have those two configurable schedulers I think it's good for now.

@pcuenca pcuenca requested a review from patil-suraj December 19, 2022 10:11
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

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

Thanks @zetyquickly

@patrickvonplaten patrickvonplaten merged commit d87cc15 into huggingface:main Dec 20, 2022
sliard pushed a commit to sliard/diffusers that referenced this pull request Dec 21, 2022
…uggingface#1737)

* expose polynomial:power and cosine_with_restarts:num_cycles using get_scheduler func, add it to train_dreambooth.py

* fix formatting

* fix style

* Update src/diffusers/optimization.py

Co-authored-by: Pedro Cuenca <pedro@huggingface.co>

Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
…uggingface#1737)

* expose polynomial:power and cosine_with_restarts:num_cycles using get_scheduler func, add it to train_dreambooth.py

* fix formatting

* fix style

* Update src/diffusers/optimization.py

Co-authored-by: Pedro Cuenca <pedro@huggingface.co>

Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
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.

4 participants