Skip to content

fix(examples): remove incorrect text_ids concatenation in FLUX DreamBooth LoRA training#13949

Open
Liauuu wants to merge 1 commit into
huggingface:mainfrom
Liauuu:pr3
Open

fix(examples): remove incorrect text_ids concatenation in FLUX DreamBooth LoRA training#13949
Liauuu wants to merge 1 commit into
huggingface:mainfrom
Liauuu:pr3

Conversation

@Liauuu

@Liauuu Liauuu commented Jun 14, 2026

Copy link
Copy Markdown

Description

This PR fixes a critical RuntimeError (dimension mismatch) that occurs during FLUX DreamBooth LoRA training when --with_prior_preservation is enabled and the static, pre-computed text embeddings path is triggered.

Core Bug Mechanism (Why it crashed)

In examples/dreambooth/train_dreambooth_lora_flux.py (around line 1536), when args.with_prior_preservation was True, the script incorrectly performed:

text_ids = torch.cat([text_ids, class_text_ids], dim=0)

Closes #10722

@github-actions github-actions Bot added examples size/S PR with diff < 50 LOC labels Jun 14, 2026
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

1 participant