-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
[Flux] Add advanced training script + support textual inversion inference #9434
[Flux] Add advanced training script + support textual inversion inference #9434
Conversation
…uxPipeline for inference
…' into dreambooth-lora-flux-exploration
@sayakpaul @apolinario wdyt about me closing #9160 and moving the changes here as I suggest above? |
I would prefer #9160 as it helps to review the changes to the canonical script in isolation. Would that work for you? |
@linoytsaban let me know when you need another review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@yiyixuxu could you also give the changes in the pipelines a look? It's just about adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go! 🚀
This PR adds an advanced version of the dreambooth lora flux script, with additional accompanying update to FluxPipline:
adds an advanced script with pivotal tuning feature for CLIP & T5 encoder
--train_text_encoder_ti
(enables CLIP pivotal tuning)--enable_t5_ti
adds T5 to the mix--train_text_encoder_ti_frac
the portion of epochs to train embeddings on, when using just clip--train_transformer_frac
the portion of epochs to train the transformer on, train_transformer_frac==0 will trigger a "pure_textual_inversion" train run (= "classical" textual inversion, no optimization of transformer lora layers)--initializer_token
the token to init the textual inversion embeddings with instead of randomly (random by default).--lora_blocks
the blocks\layers to apply lora training on.modifies Flux Pipeline (and related pipelines) to allow for textual inversion inference (that is also required by Loras trained with pivotal tuning)
motivation: to allow for fast iterations & experimental features. I think it'd be good to fork the canonical script and bring the above changes into the advanced folder in a similar manner to what we have for SDXL.
cc @apolinario