Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: soft_inpainting TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead. #15800

Closed
3 of 6 tasks
631068264 opened this issue May 15, 2024 · 0 comments
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@631068264
Copy link

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

img2img use prompt S/R + ControlNet canny on M3 Mac

*** Error running post_sample: /Users/wyx/project/stable-diffusion-webui/extensions-builtin/soft-inpainting/scripts/soft_inpainting.py                                    | 15/340 [00:20<06:36,  1.22s/it]
    Traceback (most recent call last):
      File "/Users/wyx/project/stable-diffusion-webui/modules/scripts.py", line 889, in on_mask_blend
        script.on_mask_blend(p, mba, *script_args)
      File "/Users/wyx/project/stable-diffusion-webui/extensions-builtin/soft-inpainting/scripts/soft_inpainting.py", line 697, in on_mask_blend
        mba.blended_latent = latent_blend(settings,
      File "/Users/wyx/project/stable-diffusion-webui/extensions-builtin/soft-inpainting/scripts/soft_inpainting.py", line 90, in latent_blend
        a_magnitude = torch.norm(a, p=2, dim=1, keepdim=True).to(torch.float64).pow_(
    TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.

---

Steps to reproduce the problem

img2img use prompt S/R + ControlNet canny on M3 Mac to generate picture.

What should have happened?

get the picture

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

sysinfo-2024-05-15-12-30.json

Console logs

--
 50%|███████████████████████████████████████████████████████████████████████████████████▌                                                                                   | 8/16 [00:11<00:09,  1.25s/it]*** Error running post_sample: /Users/wyx/project/stable-diffusion-webui/extensions-builtin/soft-inpainting/scripts/soft_inpainting.py                                     | 8/340 [00:12<07:03,  1.27s/it]
    Traceback (most recent call last):
      File "/Users/wyx/project/stable-diffusion-webui/modules/scripts.py", line 889, in on_mask_blend
        script.on_mask_blend(p, mba, *script_args)
      File "/Users/wyx/project/stable-diffusion-webui/extensions-builtin/soft-inpainting/scripts/soft_inpainting.py", line 697, in on_mask_blend
        mba.blended_latent = latent_blend(settings,
      File "/Users/wyx/project/stable-diffusion-webui/extensions-builtin/soft-inpainting/scripts/soft_inpainting.py", line 90, in latent_blend
        a_magnitude = torch.norm(a, p=2, dim=1, keepdim=True).to(torch.float64).pow_(
    TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.

---
 56%|█████████████████████████████████████████████████████████████████████████████████████████████▉                                                                         | 9/16 [00:12<00:08,  1.23s/it]*** Error running post_sample: /Users/wyx/project/stable-diffusion-webui/extensions-builtin/soft-inpainting/scripts/soft_inpainting.py                                     | 9/340 [00:13<06:52,  1.25s/it]
    Traceback (most recent call last):
      File "/Users/wyx/project/stable-diffusion-webui/modules/scripts.py", line 889, in on_mask_blend
        script.on_mask_blend(p, mba, *script_args)
      File "/Users/wyx/project/stable-diffusion-webui/extensions-builtin/soft-inpainting/scripts/soft_inpainting.py", line 697, in on_mask_blend
        mba.blended_latent = latent_blend(settings,
      File "/Users/wyx/project/stable-diffusion-webui/extensions-builtin/soft-inpainting/scripts/soft_inpainting.py", line 90, in latent_blend
        a_magnitude = torch.norm(a, p=2, dim=1, keepdim=True).to(torch.float64).pow_(
    TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.

---
 62%|███████████████████████████████████████████████████████████████████████████████████████████████████████▊                                                              | 10/16 [00:13<00:07,  1.22s/it]*** Error running post_sample: /Users/wyx/project/stable-diffusion-webui/extensions-builtin/soft-inpainting/scripts/soft_inpainting.py                                    | 10/340 [00:14<06:47,  1.23s/it]
    Traceback (most recent call last):
      File "/Users/wyx/project/stable-diffusion-webui/modules/scripts.py", line 889, in on_mask_blend
        script.on_mask_blend(p, mba, *script_args)
      File "/Users/wyx/project/stable-diffusion-webui/extensions-builtin/soft-inpainting/scripts/soft_inpainting.py", line 697, in on_mask_blend
        mba.blended_latent = latent_blend(settings,
      File "/Users/wyx/project/stable-diffusion-webui/extensions-builtin/soft-inpainting/scripts/soft_inpainting.py", line 90, in latent_blend
        a_magnitude = torch.norm(a, p=2, dim=1, keepdim=True).to(torch.float64).pow_(
    TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.

---
 69%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏                                                   | 11/16 [00:15<00:06,  1.21s/it]*** Error running post_sample: /Users/wyx/project/stable-diffusion-webui/extensions-builtin/soft-inpainting/scripts/soft_inpainting.py                                    | 11/340 [00:16<06:41,  1.22s/it]
    Traceback (most recent call last):
      File "/Users/wyx/project/stable-diffusion-webui/modules/scripts.py", line 889, in on_mask_blend
        script.on_mask_blend(p, mba, *script_args)
      File "/Users/wyx/project/stable-diffusion-webui/extensions-builtin/soft-inpainting/scripts/soft_inpainting.py", line 697, in on_mask_blend
        mba.blended_latent = latent_blend(settings,
      File "/Users/wyx/project/stable-diffusion-webui/extensions-builtin/soft-inpainting/scripts/soft_inpainting.py", line 90, in latent_blend
        a_magnitude = torch.norm(a, p=2, dim=1, keepdim=True).to(torch.float64).pow_(
    TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.

---
 75%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▌                                         | 12/16 [00:16<00:04,  1.21s/it]*** Error running post_sample: /Users/wyx/project/stable-diffusion-webui/extensions-builtin/soft-inpainting/scripts/soft_inpainting.py                                    | 12/340 [00:17<06:38,  1.21s/it]
    Traceback (most recent call last):

Additional information

No response

@631068264 631068264 added the bug-report Report of a bug, yet to be confirmed label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

1 participant