Skip to content

fix: Fix Flux 2 Klein dreambooth default text_encoder_out_layers - #14509

Open
Ricardo-M-L wants to merge 1 commit into
huggingface:mainfrom
Ricardo-M-L:fix/flux2-klein-dreambooth-default-layers-clean
Open

fix: Fix Flux 2 Klein dreambooth default text_encoder_out_layers#14509
Ricardo-M-L wants to merge 1 commit into
huggingface:mainfrom
Ricardo-M-L:fix/flux2-klein-dreambooth-default-layers-clean

Conversation

@Ricardo-M-L

Copy link
Copy Markdown
Contributor

Clean rebase of fix/flux2-klein-dreambooth-default-layers

Align the `--text_encoder_out_layers` CLI default in
`train_dreambooth_lora_flux2_klein.py` with the layers the Klein
pipeline actually consumes internally: `(9, 18, 27)` instead of
`(10, 20, 30)`.

The vanilla Flux 2 pipeline (`pipeline_flux2.py`) uses hidden states
`(10, 20, 30)` (Mistral text encoder), and its training script was
correctly set to that. The Klein script was copy-pasted from the
non-Klein one but the default was never adjusted, while Klein's
pipelines (`pipeline_flux2_klein*.py`) expect `(9, 18, 27)` — an
off-by-one that silently sends the training run to the wrong layers
unless the user overrides the flag on the CLI.

Fixes huggingface#13445
@github-actions github-actions Bot added examples size/S PR with diff < 50 LOC labels Aug 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi @Ricardo-M-L, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. Fixes #1234) to the PR description so the issue is linked. See the contribution guide for more details. If this PR intentionally does not fix a tracked issue, a maintainer can add the no-issue-needed label to silence this reminder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

examples size/S PR with diff < 50 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant