-
Notifications
You must be signed in to change notification settings - Fork 6k
Add Differential Diffusion to Kolors #9423
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
I am not able to load kolors in colab free tier. Tried to resolve it by using memory optimizations, but it dint work. Am I going wrong somewhere? |
Thanks for working on this! For Kolors, I think @asomoza might be able to share some suggestions on how to save memory and minimal VRAM requirements as he worked on it. If it doesn't work on a free-tier colab, I'll try and test the PR :) |
Sure. Thanks :) |
Hi @saqlain2204 sorry I missed this for so long. Kolors uses a big text encoder and a custom one that isn't in transformers yet so we can't optimize it for now, so for the time being, we can't use a quantized version of it. As I remember the text encoder is around 10GB and the unet 6 GB so they won't fit in the free tier colab GPU, don't remember how much RAM it has to store them in the CPU, but it should work with If it doesn't work like this, sadly we won't be able to optimize it just yet so it can run on the free tier colab. |
should we merge this? @asomoza |
Hi @asomoza , |
@saqlain2204 can you update the description with the typical examples we use for diff-diff, you can get them from the SD3 implementation. This way you and we can make sure it works which is pretty much the only requirement for community pipelines. From a quick look, it seems you're missing the map/mask input so there's no way to pass the depthmap/mask to the pipeline call method. |
I have updated. Can you please review it. |
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.
we need a couple of fixes, the rest looks good
Co-authored-by: Álvaro Somoza <[email protected]>
Co-authored-by: Álvaro Somoza <[email protected]>
@saqlain2204 can you please run |
thanks! |
👍 |
Thanks @a-r-r-o-w @asomoza ! |
* Added diff diff support for kolors img2img * Fized relative imports * Fized relative imports * Added diff diff support for Kolors * Fized import issues * Added map * Fized import issues * Fixed naming issues * Added diffdiff support for Kolors img2img pipeline * Removed example docstrings * Added map input * Updated latents Co-authored-by: Álvaro Somoza <[email protected]> * Updated `original_with_noise` Co-authored-by: Álvaro Somoza <[email protected]> * Improved code quality --------- Co-authored-by: Álvaro Somoza <[email protected]>
…#9622) * log a warning when there are missing keys in the LoRA loading. * handle missing keys and unexpected keys better. * add tests * fix-copies. * updates * tests * concat warning. * Add Differential Diffusion to Kolors (#9423) * Added diff diff support for kolors img2img * Fized relative imports * Fized relative imports * Added diff diff support for Kolors * Fized import issues * Added map * Fized import issues * Fixed naming issues * Added diffdiff support for Kolors img2img pipeline * Removed example docstrings * Added map input * Updated latents Co-authored-by: Álvaro Somoza <[email protected]> * Updated `original_with_noise` Co-authored-by: Álvaro Somoza <[email protected]> * Improved code quality --------- Co-authored-by: Álvaro Somoza <[email protected]> * FluxMultiControlNetModel (#9647) * tests * Update src/diffusers/loaders/lora_pipeline.py Co-authored-by: YiYi Xu <[email protected]> * fix --------- Co-authored-by: M Saqlain <[email protected]> Co-authored-by: Álvaro Somoza <[email protected]> Co-authored-by: hlky <[email protected]> Co-authored-by: YiYi Xu <[email protected]>
* Added diff diff support for kolors img2img * Fized relative imports * Fized relative imports * Added diff diff support for Kolors * Fized import issues * Added map * Fized import issues * Fixed naming issues * Added diffdiff support for Kolors img2img pipeline * Removed example docstrings * Added map input * Updated latents Co-authored-by: Álvaro Somoza <[email protected]> * Updated `original_with_noise` Co-authored-by: Álvaro Somoza <[email protected]> * Improved code quality --------- Co-authored-by: Álvaro Somoza <[email protected]>
…#9622) * log a warning when there are missing keys in the LoRA loading. * handle missing keys and unexpected keys better. * add tests * fix-copies. * updates * tests * concat warning. * Add Differential Diffusion to Kolors (#9423) * Added diff diff support for kolors img2img * Fized relative imports * Fized relative imports * Added diff diff support for Kolors * Fized import issues * Added map * Fized import issues * Fixed naming issues * Added diffdiff support for Kolors img2img pipeline * Removed example docstrings * Added map input * Updated latents Co-authored-by: Álvaro Somoza <[email protected]> * Updated `original_with_noise` Co-authored-by: Álvaro Somoza <[email protected]> * Improved code quality --------- Co-authored-by: Álvaro Somoza <[email protected]> * FluxMultiControlNetModel (#9647) * tests * Update src/diffusers/loaders/lora_pipeline.py Co-authored-by: YiYi Xu <[email protected]> * fix --------- Co-authored-by: M Saqlain <[email protected]> Co-authored-by: Álvaro Somoza <[email protected]> Co-authored-by: hlky <[email protected]> Co-authored-by: YiYi Xu <[email protected]>
What does this PR do?
Adds Differential Diffusion to Kolors
Fixes Partially #8924
@a-r-r-o-w @DN6