Skip to content

Fix lora alpha and metadata handling #11739

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Tanuj-rai
Copy link

@Tanuj-rai Tanuj-rai commented Jun 18, 2025

What does this PR do?

This PR adds --lora_alpha and metadata handling in training scripts in 'train_dreambooth_lora_sdxl.py'.

Part of #11730

Before submitting

Who can review?

@linoytsaban @sayakpaul

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

Copy link
Collaborator

@linoytsaban linoytsaban left a comment

Choose a reason for hiding this comment

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

thanks! made some small changes

@Tanuj-rai
Copy link
Author

thanks! made some small changes

Thank you @linoytsaban , for reviewing and suggesting changes. I’ve implemented the requested updates.

@linoytsaban
Copy link
Collaborator

linoytsaban commented Jun 19, 2025

thanks @Tanuj-rai :) I just noticed lora_alpha is missing from the text_encoder config, after that's merged we'd be good to go

text_lora_config = get_lora_config(
rank=args.rank,
dropout=args.lora_dropout,
use_dora=args.use_dora,
target_modules=text_target_modules,

@Tanuj-rai
Copy link
Author

thanks @Tanuj-rai :) I just noticed lora_alpha is missing from the text_encoder config, after that's merged we'd be good to go

text_lora_config = get_lora_config(
rank=args.rank,
dropout=args.lora_dropout,
use_dora=args.use_dora,
target_modules=text_target_modules,

Thank you @linoytsaban for pointing it out. I have now added the lora_alpha in the text_encoder config.

@linoytsaban linoytsaban requested a review from sayakpaul June 23, 2025 08:53
@sayakpaul
Copy link
Member

@bot /style

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.

Should there be an entry about lora_alpha in the README as well?

@linoytsaban
Copy link
Collaborator

@sayakpaul yep, but I can take care of it in a separate PR, wdyt?

@sayakpaul
Copy link
Member

Okay for me.

@linoytsaban
Copy link
Collaborator

@bot /style

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