lshqqytiger / stable-diffusion-webui-amdgpu

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

[Bug]: soft inpaint reports errors, it works though #436

Open lostwing22 opened 5 months ago

lostwing22 commented 5 months ago

Checklist

What happened?

when I tried to use soft inpaint,

_"Error running post_sample: C:\stable-diffusion-webui-directml\extensions-builtin\soft-inpainting\scripts\softinpainting.py"

this appears

I think it works though, but it might means something is going wrong

if I changed COMMANDLINE_ARGS it disappears.

it disappears when I change "--use-directml" to any command line using CPU instead

Steps to reproduce the problem

I dont know why it happens

What should have happened?

i hope it disappears, so I can be relief

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

sysinfo-2024-04-07-01-45.json

Console logs

it appears every steps

---
 88%|███████████████████████████████████████████████████████████████████████▊          | 14/16 [00:10<00:01,  1.35it/s]*** Error running post_sample: C:\stable-diffusion-webui-directml\extensions-builtin\soft-inpainting\scripts\soft_inpainting.py
    Traceback (most recent call last):
      File "C:\stable-diffusion-webui-directml\modules\scripts.py", line 848, in on_mask_blend
        script.on_mask_blend(p, mba, *script_args)
      File "C:\stable-diffusion-webui-directml\extensions-builtin\soft-inpainting\scripts\soft_inpainting.py", line 678, in on_mask_blend
        mba.blended_latent = latent_blend(settings,
      File "C:\stable-diffusion-webui-directml\extensions-builtin\soft-inpainting\scripts\soft_inpainting.py", line 81, in latent_blend
        a_magnitude = torch.norm(a, p=2, dim=1, keepdim=True).to(torch.float64).pow_(
    RuntimeError

---
 94%|████████████████████████████████████████████████████████████████████████████▉     | 15/16 [00:11<00:00,  1.31it/s]*** Error running post_sample: C:\stable-diffusion-webui-directml\extensions-builtin\soft-inpainting\scripts\soft_inpainting.py
    Traceback (most recent call last):
      File "C:\stable-diffusion-webui-directml\modules\scripts.py", line 848, in on_mask_blend
        script.on_mask_blend(p, mba, *script_args)
      File "C:\stable-diffusion-webui-directml\extensions-builtin\soft-inpainting\scripts\soft_inpainting.py", line 678, in on_mask_blend
        mba.blended_latent = latent_blend(settings,
      File "C:\stable-diffusion-webui-directml\extensions-builtin\soft-inpainting\scripts\soft_inpainting.py", line 81, in latent_blend
        a_magnitude = torch.norm(a, p=2, dim=1, keepdim=True).to(torch.float64).pow_(
    RuntimeError

Additional information

No response

lshqqytiger commented 5 months ago

torch-directml doesn't seem to support float64 power operation. What's your gpu?

lostwing22 commented 5 months ago

torch-directml doesn't seem to support float64 power operation. What's your gpu?

it's Radeon RX 6600

lshqqytiger commented 5 months ago

I'll add CPU fallback, but you'd better to try ZLUDA that has more wide support.

lshqqytiger commented 5 months ago

I think this is fixed now. Could we close this issue?