Skip to content

fix norm not training in train_control_lora_flux.py #11832

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

Merged
merged 1 commit into from
Jul 2, 2025

Conversation

Luo-Yihang
Copy link
Contributor

What does this PR do?

This PR fixes an issue in examples/flux-control/train_control_lora_flux.py where train_norm_layers (if set) were unintentionally disabled (requires_grad = False) after calling flux_transformer.add_adapter(transformer_lora_config). As a result, the normalization layers were not being trained as expected.

This PR fixes that.

@sayakpaul — Appreciate it if you could take a look.

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

@yiyixuxu yiyixuxu merged commit 5ef74fd into huggingface:main Jul 2, 2025
8 checks passed
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