diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

Community Integration: Making AIGC cheaper, faster, and more efficient.

Open binmakeswell opened this issue 3 years ago • 10 comments

Is your feature request related to a problem? Please describe. AIGC has recently risen to be one of the hottest topics in AI. Unfortunately, large hardware requirements and training costs are still a severe impediment to the rapid growth of the AIGC industry. The Stable Diffusion v1 version of the model requires 150,000 A100 GPU Hours for a single training session.

Describe the solution you'd like We are happy to share a fantastic solution where the costs of training AIGC models such as stable diffusion can be 7 times cheaper!

Colossal-AI release a complete open-source Stable Diffusion pretraining and fine-tuning solution with the pretraining cost reduced by 6.5 times, and the hardware cost of fine-tuning by 7 times. An RTX 2070/3050 PC is good enough to accomplish the fine-tuning task flow, allowing AIGC models such as Stable Diffusion to be available to a wider community.

Open-source code:https://github.com/hpcaitech/ColossalAI/tree/main/examples/images/diffusion

Additional context More details can be found on the blog. We believe the democratization of AIGC models is also very helpful for Hugging Face members. We would appreciate it if we could build the integration with you to benefit both of our users and we are willing to provide help you need in this cooperation for free.

Thank you very much.

Best regards, Yongbin Li, HPC-AI Tech

binmakeswell avatar Nov 09 '22 10:11 binmakeswell

Hey @binmakeswell,

This sounds great - I think we'd be very interested in having a better integration here! Also cc @patil-suraj @thomwolf

patrickvonplaten avatar Nov 09 '22 21:11 patrickvonplaten

This is very cool @binmakeswell ! Would be very happy to integrate diffusers in colossalAI examples!

patil-suraj avatar Nov 10 '22 11:11 patil-suraj

Thanks for your enthusiastic response and we look forward to working together!

How do you expect it to be carried out? Take our collaboration with Lightning for example, we communicated in slack for details, provided documentation and eventually did a joint release.

binmakeswell avatar Nov 11 '22 04:11 binmakeswell

Would love to see a simple integration between diffusers and ColossalAI!

Here's a collection of related issues I found/opened on various StableDiffusion / Dreambooth related projects about this:

  • https://github.com/hpcaitech/ColossalAI/issues/1935
  • https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/4606
  • https://github.com/d8ahazard/sd_dreambooth_extension/issues/174
  • https://github.com/TheLastBen/fast-stable-diffusion/issues/493
  • https://github.com/ShivamShrirao/diffusers/issues/129

It would also be really interesting to hear/see benchmarks for how ColossalAI is compares and contrasts with the various other speed/memory/etc optimisations out there (eg. xformers, AITemplate, deepspeed, deepspeed-MII, bitsandbytes, kernl, Triton, etc); whether it is a replacement for them, or whether it can be used alongside them for even greater gains. A few related issues off the top of my head:

  • https://github.com/huggingface/diffusers/issues/1094
  • https://github.com/huggingface/diffusers/pull/532#issuecomment-1301753138
  • https://github.com/huggingface/diffusers/pull/532#issuecomment-1303759989
    • More about DeepSpeed-MII
  • https://github.com/huggingface/diffusers/pull/532#issuecomment-1309786571
    • AITemplate + xformers

0xdevalias avatar Nov 14 '22 03:11 0xdevalias

Thanks for your enthusiastic response and we look forward to working together!

How do you expect it to be carried out? Take our collaboration with Lightning for example, we communicated in slack for details, provided documentation and eventually did a joint release.

Hi, @patrickvonplaten and @patil-suraj , thank you for the enthusiastic response.
Do you have any requests or suggestions? Hopefully, we can discuss the details soon and complete this integration. Thanks.

binmakeswell avatar Nov 15 '22 11:11 binmakeswell

Hey @binmakeswell,

Should we jump on a call to discuss? :-) I think we've reached out via email

patrickvonplaten avatar Nov 18 '22 12:11 patrickvonplaten

Hey @binmakeswell,

Should we jump on a call to discuss? :-) I think we've reached out via email

Sure. @patrickvonplaten I just emailed([email protected]) you our available hours. Looking forward to our meeting and cooperation :-)

binmakeswell avatar Nov 21 '22 06:11 binmakeswell

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] avatar Dec 15 '22 15:12 github-actions[bot]

Hopefully not stale.

0xdevalias avatar Dec 16 '22 00:12 0xdevalias

We are working in process for this integration : )

binmakeswell avatar Dec 16 '22 04:12 binmakeswell

Any update @binmakeswell ? It would be very great to fasten training process.

I found train_dreambooth.py and train_dreambooth_colossalai.py that are based on diffusers.

haofanwang avatar Jan 05 '23 04:01 haofanwang

Any update @binmakeswell ? It would be very great to fasten training process.

I found train_dreambooth.py and train_dreambooth_colossalai.py that are based on diffusers.

Thank you for your interest and contribution to colossalai, we have merged into the hugging face diffuser library. https://github.com/huggingface/diffusers/tree/main/examples/research_projects/colossalai

Fazziekey avatar Jan 06 '23 06:01 Fazziekey

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] avatar Jan 30 '23 15:01 github-actions[bot]

Is there any progress?

Kuri-su avatar Feb 20 '23 08:02 Kuri-su

It's merged to diffusers :-) See: https://github.com/huggingface/diffusers/tree/main/examples/research_projects/colossalai

patrickvonplaten avatar Mar 06 '23 10:03 patrickvonplaten

It's merged to diffusers :-) See: https://github.com/huggingface/diffusers/tree/main/examples/research_projects/colossalai

so does that mean that integration with Automatic1111 is around the corner?

Sniper199999 avatar Mar 28 '23 20:03 Sniper199999

@Sniper199999 Last I paid attention, automatic1111 isn't based on diffusers at all, so unless that has changed since I last looked, short answer is "no, probably not"

0xdevalias avatar Mar 29 '23 01:03 0xdevalias

Actually we'd really like to integrate diffusers into A1111, but it seems quite complicated. Note sure if anybody has a clear plan of action. Also related: https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/2577

Should we try to create a module plug-in?

patrickvonplaten avatar Mar 30 '23 16:03 patrickvonplaten