ljleb / sd-webui-freeu

a1111 implementation of https://github.com/ChenyangSi/FreeU
MIT License
307 stars 16 forks source link

Make compatible with TensorRT extension #36

Closed michael-imbeault closed 1 month ago

michael-imbeault commented 1 year ago

TensorRT is also hijacking unet, and the freeU extension has no effect with TensorRT enabled. Is there a way for you to make it compatible? Also, any plans to update to freeU v2?

michael-imbeault commented 1 year ago

See https://github.com/NVIDIA/Stable-Diffusion-WebUI-TensorRT

ljleb commented 1 year ago

I started working on v2 1 hour ago, will push it soon. Once I'm done with V2 I'll look into TRT

michael-imbeault commented 1 year ago

Can confirm v2 is working fine, thanks for the quick update - I'm following the issue you just opened in TensorRT, let's hope it's possible, the freeU improvements are good enough that I'm not using TensorRT at the moment - I'd rather have more quality than double speed

ljleb commented 1 year ago

Just a note, the current default presets have different performances depending on which version you are using. The authors of FreeU have updated their readme with new default values. I'm waiting for them to pin the values before updating the default presets. The default presets could be different depending on the active version in the extension.

For example, for the new SD1.4 preset, the only difference is that instead of backbone scale 1 = 1.2, it's 1.3. This actually has a major performance impact for V2.

ljleb commented 1 month ago

It's been a while, I don't think this will ever be possible from this extension as TRT is compiled and will likely maintain this way of working. Feel free to let me know in case there is renewed interest in compatibility with TRT and there could be a way to make it work.