{{ message }}
Repository navigation
Krea 2 LoRA DreamBooth trainer - #14046
Merged
Merged
Conversation
Adds examples/dreambooth/train_dreambooth_lora_krea2.py and the Krea2LoraLoaderMixin (Krea2Pipeline now inherits it) so LoRA adapters can be saved/loaded for the Krea 2 transformer. The transformer/pipeline forward now accept attention_kwargs for runtime LoRA scaling. Co-Authored-By: linoytsaban <linoy.tsaban@gmail.com>
Collaborator
Collaborator
|
Note on the latest commit: after porting the pipeline to Fix: I inlined the two small pack/unpack ops directly in the training loop ( Alternative (maybe in a separate PR): restoring |
DN6
approved these changes
Jun 23, 2026
Collaborator
|
@bot /style |
Contributor
DN6
pushed a commit
that referenced
this pull request
Jul 1, 2026
* Add Krea 2 LoRA DreamBooth trainer + Krea2 LoRA loader Adds examples/dreambooth/train_dreambooth_lora_krea2.py and the Krea2LoraLoaderMixin (Krea2Pipeline now inherits it) so LoRA adapters can be saved/loaded for the Krea 2 transformer. The transformer/pipeline forward now accept attention_kwargs for runtime LoRA scaling. Co-Authored-By: linoytsaban <linoy.tsaban@gmail.com> * inline _pack/_unpack_latents in trainer (pipeline methods are instance methods) * add Krea2LoraLoaderMixin to LoRA loaders docs * remove mu from validation call to align with pipeline on main --------- Co-authored-by: linoytsaban <linoy.tsaban@gmail.com> Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com>
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.


What does this do?
Adds LoRA support for Krea 2 (now merged in #14045):
examples/dreambooth/train_dreambooth_lora_krea2.py— DreamBooth LoRA trainer with the authors' recommended defaults (rank/alpha 32, target layers, lr 3e-4 constant), fp8 support, validation, plusREADME_krea2.mdandrequirements_krea2.txt.Krea2LoraLoaderMixininloaders/lora_pipeline.py;Krea2Pipelinenow inherits it so LoRA adapters can be saved/loaded.Krea2Transformer2DModel.forwardand the pipeline__call__acceptattention_kwargsfor runtime LoRA scaling.tests/lora/test_lora_layers_krea2.py.Ported from the Krea 2 staging repo and rebased onto current
main.