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

[examples/advanced_diffusion_training] bug fixes and improvements for LoRA Dreambooth SDXL advanced training script #5935

Merged
merged 14 commits into from
Dec 1, 2023

Conversation

linoytsaban
Copy link
Collaborator

@linoytsaban linoytsaban commented Nov 26, 2023

fixes some bugs in the advanced lora dreambooth sdxl training script
1 . type issue when training pivotal tuning using mixed precision - ensures text_encoder params are dtype==float32 even if the rest of the model is loaded in fp16
2. adds text_encoder_lora_state_dict implementation (now matches examples/train_dreambooth_lora_sdxl.py)

+some cleaning and style fixing

cc for review and vis @apolinario

@HuggingFaceDocBuilderDev

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

@linoytsaban linoytsaban marked this pull request as ready for review November 26, 2023 22:07
@linoytsaban linoytsaban changed the title bug fixes and improvements for LoRA Dreambooth SDXL advanced training script [examples/advanced_diffusion_training] bug fixes and improvements for LoRA Dreambooth SDXL advanced training script Nov 26, 2023
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.

Feel free to merge once you're happy with it (for everything under advanced_diffusion_training :-) Also cc @apolinario

@apolinario
Copy link
Collaborator

let's go!

@apolinario apolinario merged commit d29d97b into huggingface:main Dec 1, 2023
20 checks passed
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
… LoRA Dreambooth SDXL advanced training script (huggingface#5935)

* imports and readme bug fixes

* bug fix - ensures text_encoder params are dtype==float32 (when using pivotal tuning) even if the rest of the model is loaded in fp16

* added pivotal tuning to readme

* mapping token identifier to new inserted token in validation prompt (if used)

* correct default value of --train_text_encoder_frac

* change default value of  --adam_weight_decay_text_encoder

* validation prompt generations when using pivotal tuning bug fix

* style fix

* textual inversion embeddings name change

* style fix

* bug fix - stopping text encoder optimization halfway

* readme - will include token abstraction and new inserted tokens when using pivotal tuning
- added type to --num_new_tokens_per_abstraction

* style fix

---------

Co-authored-by: Linoy Tsaban <[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.

4 participants