fix: align text_encoder_out_layers default with pipeline for Flux 2 Klein#13455
Open
Anai-Guo wants to merge 1 commit intohuggingface:mainfrom
Open
fix: align text_encoder_out_layers default with pipeline for Flux 2 Klein#13455Anai-Guo wants to merge 1 commit intohuggingface:mainfrom
Anai-Guo wants to merge 1 commit intohuggingface:mainfrom
Conversation
The CLI default [10, 20, 30] does not match the layers actually used in pipeline_flux2_klein.py (9, 18, 27). This off-by-one causes silent incorrect behavior during training. Fixes huggingface#13445
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
--text_encoder_out_layersCLI argument intrain_dreambooth_lora_flux2_klein.pydefaults to[10, 20, 30], but the pipeline implementation (pipeline_flux2_klein.py) uses(9, 18, 27).This off-by-one mismatch causes the training script to use different text encoder layers than what the pipeline expects at inference time, leading to silently degraded results.
Fix
Change the CLI default from
[10, 20, 30]to[9, 18, 27]to match the pipeline.Fixes #13445