lshqqytiger / stable-diffusion-webui-amdgpu

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

[Bug]: RuntimeError: The GPU device does not support Double (Float64) operations! #269

Closed StudioDUzes closed 4 months ago

StudioDUzes commented 10 months ago

Is there an existing issue for this?

What happened?

Hello, there were some problems since version 1.6, but this morning after an update it was impossible to generate a simple text2img:

RuntimeError: The GPU device does not support Double (Float64) operations!

Steps to reproduce the problem

  1. text2img
  2. generate
  3. RuntimeError: The GPU device does not support Double (Float64) operations!

What should have happened?

generate

Sysinfo

sysinfo-2023-09-09-07-24.txt

What browsers do you use to access the UI ?

Google Chrome

Console logs

Already up to date.
venv "N:\1.6\stable-diffusion-webui-directml\venv\Scripts\Python.exe"
fatal: No names found, cannot describe anything.
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: 1.6.0
Commit hash: 92849df26f73b416d396b95c3fb8c64070fe3ad8
Launching Web UI with arguments: --device-id 1 --port 7861 --medvram --always-batch-cond-uncond --upcast-sampling --precision full --no-half-vae --disable-nan-check --use-cpu interrogate codeformer --api --autolaunch
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
Warning: caught exception 'Something went wrong.', memory monitor disabled
Loading weights [31e35c80fc] from N:\1.6\stable-diffusion-webui-directml\models\Stable-diffusion\SDXL\sd_xl_base_1.0.safetensors
Running on local URL:  http://127.0.0.1:7861

To create a public link, set `share=True` in `launch()`.
Startup time: 7.7s (prepare environment: 0.3s, import torch: 2.9s, import gradio: 1.0s, setup paths: 0.5s, initialize shared: 1.1s, other imports: 0.2s, load scripts: 1.0s, create ui: 0.3s, gradio launch: 0.3s).
Creating model from config: N:\1.6\stable-diffusion-webui-directml\repositories\generative-models\configs\inference\sd_xl_base.yaml
Applying attention optimization: sdp... done.
Model loaded in 8.3s (load weights from disk: 2.9s, create model: 0.9s, apply weights to model: 1.3s, calculate empty prompt: 3.1s).
*** Error completing request
*** Arguments: ('task(sx9j1d6hakx7adh)', 'https://github.com/lshqqytiger/stable-diffusion-webui-directml', '', [], 20, 'DPM++ 2M Karras', 1, 1, 7, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', '', '', [], <gradio.routes.Request object at 0x000001E8591B2FB0>, 0, False, '', 0.8, -1, False, -1, 0, 0, 0, False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, False) {}
    Traceback (most recent call last):
      File "N:\1.6\stable-diffusion-webui-directml\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "N:\1.6\stable-diffusion-webui-directml\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "N:\1.6\stable-diffusion-webui-directml\modules\txt2img.py", line 64, in txt2img
        processed = processing.process_images(p)
      File "N:\1.6\stable-diffusion-webui-directml\modules\processing.py", line 733, in process_images
        res = process_images_inner(p)
      File "N:\1.6\stable-diffusion-webui-directml\modules\processing.py", line 871, in process_images_inner
        samples_ddim = p.sample(conditioning=p.c, unconditional_conditioning=p.uc, seeds=p.seeds, subseeds=p.subseeds, subseed_strength=p.subseed_strength, prompts=p.prompts)
      File "N:\1.6\stable-diffusion-webui-directml\modules\processing.py", line 1144, in sample
        samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x))
      File "N:\1.6\stable-diffusion-webui-directml\modules\sd_samplers_kdiffusion.py", line 201, in sample
        sigmas = self.get_sigmas(p, steps)
      File "N:\1.6\stable-diffusion-webui-directml\modules\sd_samplers_kdiffusion.py", line 128, in get_sigmas
        self.model_wrap.sigmas.__str__() # DML stringify
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\_tensor.py", line 426, in __repr__
        return torch._tensor_str._str(self, tensor_contents=tensor_contents)
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\_tensor_str.py", line 636, in _str
        return _str_intern(self, tensor_contents=tensor_contents)
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\_tensor_str.py", line 567, in _str_intern
        tensor_str = _tensor_str(self, indent)
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\_tensor_str.py", line 327, in _tensor_str
        formatter = _Formatter(get_summarized_data(self) if summarize else self)
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\_tensor_str.py", line 124, in __init__
        nonzero_finite_abs = tensor_totype(nonzero_finite_vals.abs())
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\_tensor_str.py", line 96, in tensor_totype
        return t.to(dtype=dtype)
    RuntimeError: The GPU device does not support Double (Float64) operations!

---
*** Error completing request
*** Arguments: ('task(oasu5j24iv9fz1f)', 'https://github.com/lshqqytiger/stable-diffusion-webui-directml', '', [], 20, 'DPM++ 2M Karras', 1, 1, 7, 1024, 1024, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', '', '', [], <gradio.routes.Request object at 0x000001E88B524DC0>, 0, False, '', 0.8, -1, False, -1, 0, 0, 0, False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, False) {}
    Traceback (most recent call last):
      File "N:\1.6\stable-diffusion-webui-directml\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "N:\1.6\stable-diffusion-webui-directml\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "N:\1.6\stable-diffusion-webui-directml\modules\txt2img.py", line 64, in txt2img
        processed = processing.process_images(p)
      File "N:\1.6\stable-diffusion-webui-directml\modules\processing.py", line 733, in process_images
        res = process_images_inner(p)
      File "N:\1.6\stable-diffusion-webui-directml\modules\processing.py", line 871, in process_images_inner
        samples_ddim = p.sample(conditioning=p.c, unconditional_conditioning=p.uc, seeds=p.seeds, subseeds=p.subseeds, subseed_strength=p.subseed_strength, prompts=p.prompts)
      File "N:\1.6\stable-diffusion-webui-directml\modules\processing.py", line 1144, in sample
        samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x))
      File "N:\1.6\stable-diffusion-webui-directml\modules\sd_samplers_kdiffusion.py", line 201, in sample
        sigmas = self.get_sigmas(p, steps)
      File "N:\1.6\stable-diffusion-webui-directml\modules\sd_samplers_kdiffusion.py", line 128, in get_sigmas
        self.model_wrap.sigmas.__str__() # DML stringify
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\_tensor.py", line 426, in __repr__
        return torch._tensor_str._str(self, tensor_contents=tensor_contents)
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\_tensor_str.py", line 636, in _str
        return _str_intern(self, tensor_contents=tensor_contents)
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\_tensor_str.py", line 567, in _str_intern
        tensor_str = _tensor_str(self, indent)
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\_tensor_str.py", line 327, in _tensor_str
        formatter = _Formatter(get_summarized_data(self) if summarize else self)
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\_tensor_str.py", line 124, in __init__
        nonzero_finite_abs = tensor_totype(nonzero_finite_vals.abs())
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\_tensor_str.py", line 96, in tensor_totype
        return t.to(dtype=dtype)
    RuntimeError: The GPU device does not support Double (Float64) operations!

---

Additional information

GPU INTEL ARC a770 16 go

lshqqytiger commented 10 months ago

May be fixed in deb4ac6ae92c562492cc7aa1b95aa17e496d1000. But it may occur terminal hang up issue because current known solution requires float64 operation (stringify).

StudioDUzes commented 10 months ago

Thank you, text2img work with update...

remote: Enumerating objects: 9, done. remote: Counting objects: 100% (9/9), done. remote: Compressing objects: 100% (7/7), done. remote: Total 9 (delta 2), reused 8 (delta 2), pack-reused 0 Unpacking objects: 100% (9/9), 9.96 KiB | 510.00 KiB/s, done. From https://github.com/lshqqytiger/stable-diffusion-webui-directml 92849df2..e9afd9ae master -> origin/master Updating 92849df2..e9afd9ae Fast-forward modules/dml/init.py | 2 ++ modules/sysinfo.py | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) venv "N:\1.6\stable-diffusion-webui-directml\venv\Scripts\Python.exe" fatal: No names found, cannot describe anything. Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Version: 1.6.0 Commit hash: e9afd9aed55da48dfc917753e2daa114a515a85b Launching Web UI with arguments: --device-id 1 --port 7861 --medvram --always-batch-cond-uncond --upcast-sampling --precision full --no-half-vae --disable-nan-check --use-cpu interrogate codeformer --api --autolaunch no module 'xformers'. Processing without... no module 'xformers'. Processing without... No module 'xformers'. Proceeding without it. Warning: caught exception 'Something went wrong.', memory monitor disabled Loading weights [31e35c80fc] from N:\1.6\stable-diffusion-webui-directml\models\Stable-diffusion\SDXL\sd_xl_base_1.0.safetensors Running on local URL: http://127.0.0.1:7861

To create a public link, set share=True in launch(). Startup time: 10.8s (prepare environment: 0.4s, import torch: 4.3s, import gradio: 1.6s, setup paths: 1.1s, initialize shared: 1.5s, other imports: 0.4s, load scripts: 0.9s, create ui: 0.4s, gradio launch: 0.1s). Creating model from config: N:\1.6\stable-diffusion-webui-directml\repositories\generative-models\configs\inference\sd_xl_base.yaml Applying attention optimization: sdp... done. Model loaded in 8.4s (load weights from disk: 2.9s, create model: 0.8s, apply weights to model: 1.5s, calculate empty prompt: 3.1s). 100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:46<00:00, 2.34s/it] Downloading: "https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth" to N:\1.6\stable-diffusion-webui-directml\repositories\CodeFormer\weights\facelib\detection_Resnet50_Final.pth

100%|███████████████████████████████████████████████████████████████████████████████| 104M/104M [00:02<00:00, 41.4MB/s] Downloading: "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/parsing_parsenet.pth" to N:\1.6\stable-diffusion-webui-directml\repositories\CodeFormer\weights\facelib\parsing_parsenet.pth

100%|█████████████████████████████████████████████████████████████████████████████| 81.4M/81.4M [00:01<00:00, 50.4MB/s] Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [00:58<00:00, 2.94s/it] 100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [01:29<00:00, 4.50s/it] Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [01:30<00:00, 4.52s/it] 80%|█████████████████████████████████████████████████████████████████▌ | 16/20 [01:12<00:14, 3.69s/it]Reusing loaded model SDXL\sd_xl_base_1.0.safetensors [31e35c80fc] to load SDXL\sd_xl_refiner_1.0.safetensors [7440042bbd] Loading weights [7440042bbd] from N:\1.6\stable-diffusion-webui-directml\models\Stable-diffusion\SDXL\sd_xl_refiner_1.0.safetensors Creating model from config: N:\1.6\stable-diffusion-webui-directml\repositories\generative-models\configs\inference\sd_xl_refiner.yaml Applying attention optimization: sdp... done. Model loaded in 2.7s (create model: 0.1s, apply weights to model: 1.3s, calculate empty prompt: 1.1s). 100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [02:16<00:00, 6.83s/it] Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [02:18<00:00, 6.94s/it] Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [02:18<00:00, 8.88s/it]

StudioDUzes commented 10 months ago

For Intel Arc a770 16go, disabled "Cache cond persistant" is better for inpainting and other operations...