-
Notifications
You must be signed in to change notification settings - Fork 6.1k
SD 1.5 Support For Advanced Lora Training (train_dreambooth_lora_sdxl_advanced.py) #6449
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
Conversation
A quick adaptation to support people interested in using this method on 1.5 models.
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. |
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 for the PR! looks great, excited to see what LoRAs will come out of the advanced script with SD!
I left a few comments regarding compatibility issues for the prompt text encoding, and unet added conditions. I think all should be quite quick to fix if you don't mind taking another look 😊
examples/dreambooth/train_dreambooth_lora.py - this might help with making those adjustments :)
examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py
Outdated
Show resolved
Hide resolved
examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py
Outdated
Show resolved
Hide resolved
examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py
Outdated
Show resolved
Hide resolved
examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py
Outdated
Show resolved
Hide resolved
examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py
Outdated
Show resolved
Hide resolved
examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py
Outdated
Show resolved
Hide resolved
examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py
Outdated
Show resolved
Hide resolved
Thank you so much for the comments Linoy! I appreciate how much detail you just provided me. Admittedly, this was something I quickly put together since I saw a demand for 1.5. It's rather late right now, so when I find time tomorrow I'll make the necessary changes. Also, did you happen to test your script at all on 1.5, and do you have any comments on the efficacy of it? |
Awesome thanks so much😁 |
as per @linoytsaban 's recommendations. Testing would be appreciated,
I've made the suggested changes, and I've gotten it to train a style so I would appreciate some testing. There seems to be some fundamental differences(at least in naming, this is a bit over my head) between the base sdxl and 1.5 training scripts, but despite this it seems to work. Could you give it a test as well? Also, is there an example dataset and full list of parameters that can be shared and compared? |
Thanks a lot!
Sure! I'll go over it and run some experiments :) |
Hi, I've spent the last few days testing and it holds up against my similar training in kohya. Both styles and likenesses are successful, though it really excels at styles. |
Thanks so much for your work! Could we see some results? Also, let's get the code quality fixed, so that we can merge :) |
Removed some mentions of SDXL, and some arguments that don't apply to sd 1.5, and cleaned up some comments.
Here are some results training a 2d style off the base sd 1.5 checkpoint, I've attached the embedding and lora of a style(and somewhat character) train. offscriptstyleadv.zip And attached are some example images from comfyui and wandb: |
Cc: @linoytsaban |
Looks good @brandostrong! if you don't mind taking a look and merge my 2 suggestions (bug fixes for checkpoint saving) I think we'd be good to go 😁 |
btw @brandostrong - did you try prompting "in the style of |
Ah oops, the entire essence of this training workflow, totally forgot. I'll send screenshots in an hour or so with the same seed/prompt. I'm running a long animatediff so my VRAM is currently parked at max |
Was the merge I just made the suggestions? I'm not that experienced with much more than solo git. |
no worries! 😁 |
I believe they were not merged yet :) can you see my new comments? I think that would do it 😊 |
examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py
Show resolved
Hide resolved
examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py
Outdated
Show resolved
Hide resolved
@brandostrong I just committed 2 minor changes to |
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.
Awesome, thank you :D
…_advanced.py) (huggingface#6449) * sd1.5 support in separate script A quick adaptation to support people interested in using this method on 1.5 models. * sd15 prompt text encoding and unet conversions as per @linoytsaban 's recommendations. Testing would be appreciated, * Readability and quality improvements Removed some mentions of SDXL, and some arguments that don't apply to sd 1.5, and cleaned up some comments. * make style/quality commands * tracker rename and run-it doc * Update examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py * Update examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py --------- Co-authored-by: Linoy Tsaban <[email protected]>
A quick adaptation to support people interested in using this method on 1.5 models.
What does this PR do?
Adds support for 1.5 models on the advanced dreambooth training method laid out by @linoytsaban
Who can review?
@linoytsaban @sayakpaul