Skip to content

Conversation

@rootonchair
Copy link
Contributor

What does this PR do?

Fixes #6503

Before submitting

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.

@rootonchair
Copy link
Contributor Author

@sayakpaul this is the PR for Dreambooth Regular

@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.

f.write(yaml + model_card)


def unwrap_model(accelerator, model):
Copy link
Member

Choose a reason for hiding this comment

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

Let's make this inside the function as done in the other PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

log_validation lies outside of the function. Should I put log_validation inside too?

Copy link
Member

Choose a reason for hiding this comment

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

log_validation is fine since it's a big one. However, unwrap_model() isn't.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

log_validation uses unwrap_model too so moving unwrap_model inside the function will raise error. Do you have any idea how to fix this?

Copy link
Member

Choose a reason for hiding this comment

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

We can pass the model to log_validation in the unwrapped state, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see. I have made new update

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.

Good job. Left just one comment.

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.

Works for me. Just comment!

@sayakpaul
Copy link
Member

Oops. Apologies, looks like it breaks the style. Let's revert. Sorry.

@rootonchair
Copy link
Contributor Author

No problem. I have reverted it

@sayakpaul
Copy link
Member

Thanks for bearing with my requests!

@sayakpaul sayakpaul merged commit 7d63182 into huggingface:main Jan 12, 2024
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
…gface#6532)

* support compile

* make style

* move unwrap_model inside function

* change unwrap call

* run make style

* Update examples/dreambooth/train_dreambooth.py

Co-authored-by: Sayak Paul <[email protected]>

* Revert "Update examples/dreambooth/train_dreambooth.py"

This reverts commit 70ab097.

---------

Co-authored-by: Sayak Paul <[email protected]>
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.

[Training] Make officially maintained training scripts compatible with torch.compile()

3 participants