Uh oh!
There was an error while loading. Please reload this page.
[HiDream LoRA] optimizations + small updates - #11381
Conversation
…sed as well 2. save model card even if model is not pushed to hub 3. remove scheduler initialization from code example - not necessary anymore (it's now if the base model's config) 4. add skip_final_inference - to allow to run with validation, but skip the final loading of the pipeline with the lora weights to reduce memory reqs
HuggingFaceDocBuilderDev
commented
Apr 22, 2025
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
linoytsaban
commented
Apr 22, 2025
@sayakpaul now that I'm thinking about it, even when validation is enabled, since we're not optimizing the text encoders, can't we just pre-encode the validation prompt embeddings as well? and then we don't need to keep or load text encoders for validation at all and simply pass the embeddings to |
sayakpaul
commented
Apr 22, 2025
We should. Let's do that. |
sayakpaul
left a comment
There was a problem hiding this comment.
Thanks for the optims. LMK if the comments make sense or if anything is unclear.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
linoytsaban
commented
Apr 22, 2025
@bot /style |
Style fixes have been applied. View the workflow run here. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
sayakpaul
left a comment
There was a problem hiding this comment.
Thank you! Left some more comments. I think we can merge this today. Also would be good to see if we test this on a 40GB GPU.
Thanks @sayakpaul! I added prints using your snippet (here) - right before caching & and pre-computation of prompt embeddings and straight after deleting them. without offloading & caching - |
…s only pre-encoded if custom prompts are provided, but should be pre-encoded either way)
linoytsaban
commented
Apr 23, 2025
@bot /style |
Style fixes have been applied. View the workflow run here. |
linoytsaban
commented
Apr 23, 2025
@bot /style |
Style fixes have been applied. View the workflow run here. |
| target_modules = [layer.strip() for layer in args.lora_layers.split(",")] | ||
| else: | ||
| target_modules = ["to_k", "to_q", "to_v", "to_out.0"] | ||
| target_modules = ["to_k", "to_q", "to_v", "to_out"] |
There was a problem hiding this comment.
Perhaps we can add a comment explaining that including to_out will target all the expert layers.
…rovided and change example to 3d icons
linoytsaban
commented
Apr 23, 2025
@bot /style |
some memory optimizations:
--skip_final_inference- to allow to run with validation, but skip the final loading of the pipeline with the lora weights to reduce memory reqsother changes:
todo:
Yarn Art LoRA

training config