onediff icon indicating copy to clipboard operation
onediff copied to clipboard

enable free u

Open jyoung105 opened this issue 11 months ago • 7 comments

Thanks for awesome work. I want to adopt freeu(https://github.com/ChenyangSi/FreeU) to your library. Is there any plan to adopt it?

jyoung105 avatar Mar 04 '24 06:03 jyoung105

I want to adopt freeu(https://github.com/ChenyangSi/FreeU) to your library. Is there any plan to adopt it?

Happy to see this idea! I will look into this and reply to you later @jyoung105

strint avatar Mar 04 '24 09:03 strint

There is a code for freeu to unet2d and unet3d in diffusers. Check this repo please. https://github.com/search?q=repo%3Ahuggingface%2Fdiffusers%20freeu&type=code Thank you for reply!

jyoung105 avatar Mar 04 '24 14:03 jyoung105

There is a code for freeu to unet2d and unet3d in diffusers. Check this repo please. https://github.com/search?q=repo%3Ahuggingface%2Fdiffusers%20freeu&type=code Thank you for reply!

@jyoung105 FreeU is a great work.

And we have supported it in ComfyUI. Here is the workflow:

freeu-loader

As I tested, on 3090 RTX, SDXL-base-1.0, 1024x1024, it speedup about 89% ( 3.95 it/s Origin v.s. 7.58 it/s with OneDiff).

I will see the link you prvoide and see how to support it in diffusers.

doombeaker avatar Mar 05 '24 01:03 doombeaker

You explained all what I want to say. Thanks! And great works too 💪

jyoung105 avatar Mar 05 '24 01:03 jyoung105

I'm sorry, things are not as simple as they seem. I found that the workflow in ComfyUI can run, but it did not apply the effect of FreeU. Adding enable_freeu directly in diffusers code will also cause an error when building the OneDiff static graph. However, we will solve these problems, and will tell you in this issue after solving them.

doombeaker avatar Mar 05 '24 06:03 doombeaker

FreeU is very useful, wish Onediff supports it. thank you very much.

zhangp365 avatar Jun 28 '24 03:06 zhangp365

What an amazing compiler, thanks!

jyoung105 avatar Jun 28 '24 16:06 jyoung105