lshqqytiger / stable-diffusion-webui-amdgpu

Stable Diffusion web UI
GNU Affero General Public License v3.0
1.69k stars 178 forks source link

[Feature Request]: FreeU Implementation #281

Closed GreenLandisaLie closed 10 months ago

GreenLandisaLie commented 10 months ago

Is there an existing issue for this?

What would your feature do ?

FreeU - supposedly improves image quality with no extra costs. Code got released today and its easy to implement, here's an extension for Automatic1111 already: link.

Tried it out but fails at this line:

x_freq = torch.fft.fftn(x, dim=(-2, -1))

Gives the following error:

[F D:\a_work\1\s\pytorch-directml-plugin\torch_directml\csrc\engine\dml_util.cc:118] Invalid or unsupported data type.

I remember ToMe could not be added because DirectML doesn't support negative dimensions and this is probably the case here as well but I'm no dev so I'll let someone who knows what they are doing take a loot into it.

Please consider adding this if at all possible and if it even works as they claim it does to begin with.

Proposed workflow

.

Additional information

No response

lshqqytiger commented 10 months ago

This is because the complex types are not implemented in DirectML. I've asked about complex types support before, but it doesn't appear to be planning at the moment.

GreenLandisaLie commented 10 months ago

Yeah nothing we can do about it then. I'll keep a eye on it and if they ever add support I shall reopen.