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

change validation scheduler for train_dreambooth.py when training IF #4333

Conversation

YinzhenWang
Copy link
Contributor

What does this PR do?

Fixes #4313

Who can review?

cc @sayakpaul and @williamberman for dreambooth

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Awesome!

@sayakpaul sayakpaul requested a review from williamberman July 28, 2023 15:54
@williamberman
Copy link
Contributor

if we want to make the scheduler configurable, I would prefer if the flag was to set a particular scheduler via a string instead of an adhoc override. Can you change the pr to pass a --validation_scheduler which uses choices to pass in the name of the classes as string? I.e.

(pseudocode)

parser.add_argument('--validation_scheduler', default=''DPMSolverMultistepScheduler", choices=["DDPMScheduler", DPMSolverMultistepScheduler"])

@YinzhenWang
Copy link
Contributor Author

I use eval(args.validation_scheduler) to call DPMSolverMultistepScheduler. But the check reports: examples/dreambooth/train_dreambooth.py:50:5: F401 [*] diffusers.DPMSolverMultistepScheduler imported but unused. Maybe it doesn't matter.

@patrickvonplaten
Copy link
Contributor

Could we maybe work with importlib here instead of Python's eval?

@patrickvonplaten patrickvonplaten merged commit d185b5e into huggingface:main Aug 23, 2023
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
…uggingface#4333)

* dreambooth training

* train_dreambooth validation scheduler

* set a particular scheduler via a string

* modify readme after setting a particular scheduler via a string

* modify readme after setting a particular scheduler

* use importlib to set a particular scheduler

* import with correct sort
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.

Possible misuse of scheduler in function log_validation in train_dreambooth.py
5 participants