stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: Instructions for Linux install are incorrect
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
There are numerous errors in the instructions for Linux install.
- On Linux, python is called "python3" not "python".
- Executing "python -m venv sd_env" gives an error. Whereas "python3 -m venv sd_env" returns with nothing shown on the screen. It does generate a subdirectory called sd_env.
- Running the following commands seems to generate no errors: a) source sd_env/bin/activate b) git clone https://github.com/openvinotoolkit/stable-diffusion-webui.git c) cd stable-diffusion-webui d) export PYTORCH_TRACING_MODE=TORCHFX e) export COMMANDLINE_ARGS="--skip-torch-cuda-test --precision full --no-half"
- When running "./webui.sh" the first error is "Cannot locate TCMalloc (improves CPU memory usage) fatal: No names found, cannot describe anything."
- After a long download, it starts the web interface. The script "accelerate with openvino" is selected. "v1-interference.yaml" is selected. "v1-5-pruned-emaonly.safetensors" is selected. The text prompt "flower with a bee on it" is entered in the prompt box and Generate is clicked.
- At this point numerous errors are printed in konsole. Starting with: "[2023-11-24 16:51:21,717] torch._dynamo.symbolic_convert: [WARNING] /home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/linear.py <function Linear.forward at 0x7f0e5ab09a60> [UserDefinedObjectVariable(LoraPatches), NNModuleVariable(), TensorVariable()] {} too many positional arguments"
"list index out of range Traceback (most recent call last): File "/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/scripts/openvino_accelerate.py", line 200, in openvino_fx compiled_model = openvino_compile_cached_model(maybe_fs_cached_name, *example_inputs) File "/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/scripts/openvino_accelerate.py", line 426, in openvino_compile_cached_model om.inputs[idx].get_node().set_element_type(dtype_mapping[input_data.dtype]) IndexError: list index out of range"
- From there it snowballs out of control and errors on top of other errors are displayed.
Steps to reproduce the problem
On mx linux, open konsole and enter the commands below as given in the instructions: "# Make sure Python version is 3.10+ python3 -m venv sd_env source sd_env/bin/activate git clone https://github.com/openvinotoolkit/stable-diffusion-webui.git cd stable-diffusion-webui
export PYTORCH_TRACING_MODE=TORCHFX export COMMANDLINE_ARGS="--skip-torch-cuda-test --precision full --no-half"
Launch the WebUI
./webui.sh "
Once the UI opens in the web page, select openvino from the scripts menu.
Enter a prompt like "flower with a bee on it".
SD crashes.
What should have happened?
I think this bug is related to incorrect or incomplete instructions.
Sysinfo
{
"Platform": "Linux-6.0.0-6mx-amd64-x86_64-with-glibc2.31",
"Python": "3.9.2",
"Version": "1.6.0",
"Commit": "44006297e03a07f28505d54d6ba5fd55e0c1292d",
"Script path": "/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui",
"Data path": "/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui",
"Extensions dir": "/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/extensions",
"Checksum": "9ad46f4d60c8a6c171a72e111c583061aaf3a02638b19d17638614e2cd7bfcf4",
"Commandline": [
"launch.py",
"--skip-torch-cuda-test",
"--precision",
"full",
"--no-half"
],
"Torch env info": {
"torch_version": "2.0.1+cu118",
"is_debug_build": "False",
"cuda_compiled_version": "11.8",
"gcc_version": null,
"clang_version": null,
"cmake_version": "version 3.27.7",
"os": "Debian GNU/Linux 11 (bullseye) (x86_64)",
"libc_version": "glibc-2.31",
"python_version": "3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] (64-bit runtime)",
"python_platform": "Linux-6.0.0-6mx-amd64-x86_64-with-glibc2.31",
"is_cuda_available": "False",
"cuda_runtime_version": null,
"cuda_module_loading": "N/A",
"nvidia_driver_version": null,
"nvidia_gpu_models": null,
"cudnn_version": null,
"pip_version": "pip3",
"pip_packages": [
"numpy==1.23.5",
"open-clip-torch==2.20.0",
"pytorch-lightning==1.9.4",
"torch==2.0.1+cu118",
"torchdiffeq==0.2.3",
"torchmetrics==1.2.0",
"torchsde==0.2.5",
"torchvision==0.15.2+cu118"
],
"conda_packages": null,
"hip_compiled_version": "N/A",
"hip_runtime_version": "N/A",
"miopen_runtime_version": "N/A",
"caching_allocator_config": "",
"is_xnnpack_available": "True",
"cpu_info": [
"Architecture: x86_64",
"CPU op-mode(s): 32-bit, 64-bit",
"Byte Order: Little Endian",
"Address sizes: 39 bits physical, 48 bits virtual",
"CPU(s): 8",
"On-line CPU(s) list: 0-7",
"Thread(s) per core: 2",
"Core(s) per socket: 4",
"Socket(s): 1",
"NUMA node(s): 1",
"Vendor ID: GenuineIntel",
"CPU family: 6",
"Model: 140",
"Model name: 11th Gen Intel(R) Core(TM) i5-11320H @ 3.20GHz",
"Stepping: 2",
"CPU MHz: 400.000",
"CPU max MHz: 4500.0000",
"CPU min MHz: 400.0000",
"BogoMIPS: 6374.40",
"Virtualization: VT-x",
"L1d cache: 192 KiB",
"L1i cache: 128 KiB",
"L2 cache: 5 MiB",
"L3 cache: 8 MiB",
"NUMA node0 CPU(s): 0-7",
"Vulnerability Itlb multihit: Not affected",
"Vulnerability L1tf: Not affected",
"Vulnerability Mds: Not affected",
"Vulnerability Meltdown: Not affected",
"Vulnerability Mmio stale data: Not affected",
"Vulnerability Retbleed: Not affected",
"Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl",
"Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization",
"Vulnerability Spectre v2: Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence",
"Vulnerability Srbds: Not affected",
"Vulnerability Tsx async abort: Not affected",
"Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l2 invpcid_single cdp_l2 ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves split_lock_detect dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid movdiri movdir64b fsrm avx512_vp2intersect md_clear ibt flush_l1d arch_capabilities"
]
},
"Exceptions": [
{
"exception": "openvino_fx raised RuntimeError: ShapeProp error for: node=%self_norm1 : [#users=1] = call_module[target=self_norm1](args = (%input_tensor,), kwargs = {}) with meta={'nn_module_stack': {'self_norm1': <class 'torch.nn.modules.normalization.GroupNorm'>}, 'stack_trace': ' File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/diffusers/models/resnet.py", line 691, in forward\n hidden_states = self.norm1(hidden_states)\n'}\n\nWhile executing %self_norm1 : [#users=1] = call_module[target=self_norm1](args = (%input_tensor,), kwargs = {})\nOriginal traceback:\n File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/diffusers/models/resnet.py", line 691, in forward\n hidden_states = self.norm1(hidden_states)\n\n\nSet torch._dynamo.config.verbose=True for more information\n\n\nYou can suppress this exception and fall back to eager by setting:\n torch._dynamo.config.suppress_errors = True\n",
"traceback": [
[
"/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/modules/call_queue.py, line 57, f",
"res = list(func(*args, **kwargs))"
],
[
"/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/modules/call_queue.py, line 36, f",
"res = func(*args, **kwargs)"
],
[
"/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/modules/txt2img.py, line 52, txt2img",
"processed = modules.scripts.scripts_txt2img.run(p, *args)"
],
[
"/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/modules/scripts.py, line 601, run",
"processed = script.run(p, *script_args)"
],
[
"/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/scripts/openvino_accelerate.py, line 1228, run",
"processed = process_images_openvino(p, model_config, vae_ckpt, p.sampler_name, enable_caching, openvino_device, mode, is_xl_ckpt, refiner_ckpt, refiner_frac)"
],
[
"/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/scripts/openvino_accelerate.py, line 979, process_images_openvino",
"output = shared.sd_diffusers_model("
],
[
"/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/utils/_contextlib.py, line 115, decorate_context",
"return func(*args, **kwargs)"
],
[
"/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py, line 840, call",
"noise_pred = self.unet("
],
[
"/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/module.py, line 1501, _call_impl",
"return forward_call(*args, **kwargs)"
],
[
"/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/eval_frame.py, line 82, forward",
"return self.dynamo_ctx(self._orig_mod.forward)(*args, **kwargs)"
],
[
"/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/eval_frame.py, line 209, _fn",
"return fn(*args, **kwargs)"
],
[
"/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/diffusers/models/unet_2d_condition.py, line 932, forward",
"emb = self.time_embedding(t_emb, timestep_cond)"
],
[
"/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/diffusers/models/unet_2d_condition.py, line 1066,
What browsers do you use to access the UI ?
No response
Console logs
(sd_env) dennis@mx:~/Downloads/stable-diffusion-webui/stable-diffusion-webui$ ./webui.sh
################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################
################################################################
Running on dennis user
################################################################
################################################################
Repo already cloned, using it as install directory
################################################################
################################################################
python venv already activate or run without venv: /home/dennis/Downloads/stable-diffusion-webui/sd_env
################################################################
################################################################
Launching launch.py...
################################################################
Cannot locate TCMalloc (improves CPU memory usage)
fatal: No names found, cannot describe anything.
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110]
Version: 1.6.0
Commit hash: 44006297e03a07f28505d54d6ba5fd55e0c1292d
Launching Web UI with arguments: --skip-torch-cuda-test --precision full --no-half
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
Warning: caught exception 'Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx', memory monitor disabled
Loading weights [6ce0161689] from /home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned-emaonly.safetensors
Running on local URL: http://127.0.0.1:7860
To create a public link, set `share=True` in `launch()`.
Creating model from config: /home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/configs/v1-inference.yaml
Startup time: 10.9s (prepare environment: 0.2s, import torch: 4.7s, import gradio: 0.9s, setup paths: 1.0s, initialize shared: 0.1s, other imports: 0.8s, setup codeformer: 0.1s, load scripts: 2.4s, create ui: 0.4s, gradio launch: 0.3s).
Applying attention optimization: InvokeAI... done.
Model loaded in 6.8s (load weights from disk: 0.6s, create model: 0.5s, apply weights to model: 5.5s).
{}
Loading weights [6ce0161689] from /home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned-emaonly.safetensors
OpenVINO Script: created model from config : /home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/configs/v1-inference.yaml
0%| | 0/20 [00:00<?, ?it/s][2023-11-24 16:51:21,717] torch._dynamo.symbolic_convert: [WARNING] /home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/linear.py <function Linear.forward at 0x7f0e5ab09a60> [UserDefinedObjectVariable(LoraPatches), NNModuleVariable(), TensorVariable()] {} too many positional arguments
[2023-11-24 16:51:21,788] torch._dynamo.symbolic_convert: [WARNING] /home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/linear.py <function Linear.forward at 0x7f0e5ab09a60> [UserDefinedObjectVariable(LoraPatches), NNModuleVariable(), TensorVariable()] {} too many positional arguments
[2023-11-24 16:51:21,819] torch._dynamo.symbolic_convert: [WARNING] /home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/linear.py <function Linear.forward at 0x7f0e5ab09a60> [UserDefinedObjectVariable(LoraPatches), NNModuleVariable(), TensorVariable()] {} too many positional arguments
[2023-11-24 16:51:21,847] torch._dynamo.symbolic_convert: [WARNING] /home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/linear.py <function Linear.forward at 0x7f0e5ab09a60> [UserDefinedObjectVariable(LoraPatches), NNModuleVariable(), TensorVariable()] {} too many positional arguments
[2023-11-24 16:51:21,915] torch._dynamo.symbolic_convert: [WARNING] /home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/linear.py <function Linear.forward at 0x7f0e5ab09a60> [UserDefinedObjectVariable(LoraPatches), NNModuleVariable(), TensorVariable()] {} too many positional arguments
[2023-11-24 16:51:21,956] torch._dynamo.symbolic_convert: [WARNING] /home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/linear.py <function Linear.forward at 0x7f0e5ab09a60> [UserDefinedObjectVariable(LoraPatches), NNModuleVariable(), TensorVariable()] {} too many positional arguments
[2023-11-24 16:51:21,983] torch._dynamo.symbolic_convert: [WARNING] /home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/linear.py <function Linear.forward at 0x7f0e5ab09a60> [UserDefinedObjectVariable(LoraPatches), NNModuleVariable(), TensorVariable()] {} too many positional arguments
[2023-11-24 16:51:22,079] torch._dynamo.symbolic_convert: [WARNING] /home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/linear.py <function Linear.forward at 0x7f0e5ab09a60> [UserDefinedObjectVariable(LoraPatches), NNModuleVariable(), TensorVariable()] {} too many positional arguments
[2023-11-24 16:51:22,106] torch._dynamo.symbolic_convert: [WARNING] /home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/conv.py <function Conv2d.forward at 0x7f0e5ab16280> [UserDefinedObjectVariable(LoraPatches), NNModuleVariable(), TensorVariable()] {} too many positional arguments
[2023-11-24 16:51:22,190] torch._dynamo.symbolic_convert: [WARNING] /home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/linear.py <function Linear.forward at 0x7f0e5ab09a60> [UserDefinedObjectVariable(LoraPatches), NNModuleVariable(), TensorVariable()] {} too many positional arguments
[2023-11-24 16:51:22,232] torch._dynamo.symbolic_convert: [WARNING] /home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/linear.py <function Linear.forward at 0x7f0e5ab09a60> [UserDefinedObjectVariable(LoraPatches), NNModuleVariable(), TensorVariable()] {} too many positional arguments
list index out of range
Traceback (most recent call last):
File "/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/scripts/openvino_accelerate.py", line 200, in openvino_fx
compiled_model = openvino_compile_cached_model(maybe_fs_cached_name, *example_inputs)
File "/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/scripts/openvino_accelerate.py", line 426, in openvino_compile_cached_model
om.inputs[idx].get_node().set_element_type(dtype_mapping[input_data.dtype])
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/fx/passes/shape_prop.py", line 147, in run_node
result = super().run_node(n)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/fx/interpreter.py", line 177, in run_node
return getattr(self, n.op)(n.target, args, kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/fx/interpreter.py", line 294, in call_module
return submod(*args, **kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/extensions-builtin/Lora/networks.py", line 459, in network_GroupNorm_forward
return originals.GroupNorm_forward(self, input)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/normalization.py", line 273, in forward
return F.group_norm(
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/functional.py", line 2526, in group_norm
return handle_torch_function(group_norm, (input, weight, bias,), input, num_groups, weight=weight, bias=bias, eps=eps)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/overrides.py", line 1534, in handle_torch_function
result = mode.__torch_function__(public_api, types, args, kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_inductor/overrides.py", line 38, in __torch_function__
return func(*args, **kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/functional.py", line 2530, in group_norm
return torch.group_norm(input, num_groups, weight, bias, eps, torch.backends.cudnn.enabled)
RuntimeError: Expected weight to be a vector of size equal to the number of channels in input, but got weight of shape [320] and input of shape [2, 1280]
0%| | 0/20 [00:00<?, ?it/s]
*** Error completing request
*** Arguments: ('task(kdx0qhgm2xob8co)', 'flower with bee on it', '', [], 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 0x7f0e20bf3d60>, 1, False, '', 0.8, -1, False, -1, 0, 0, 0, 'None', 'None', 'CPU', True, 'Euler a', True, False, 'None', 0.8, False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, False) {}
Traceback (most recent call last):
File "/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/scripts/openvino_accelerate.py", line 200, in openvino_fx
compiled_model = openvino_compile_cached_model(maybe_fs_cached_name, *example_inputs)
File "/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/scripts/openvino_accelerate.py", line 426, in openvino_compile_cached_model
om.inputs[idx].get_node().set_element_type(dtype_mapping[input_data.dtype])
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/fx/passes/shape_prop.py", line 147, in run_node
result = super().run_node(n)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/fx/interpreter.py", line 177, in run_node
return getattr(self, n.op)(n.target, args, kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/fx/interpreter.py", line 294, in call_module
return submod(*args, **kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/extensions-builtin/Lora/networks.py", line 459, in network_GroupNorm_forward
return originals.GroupNorm_forward(self, input)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/normalization.py", line 273, in forward
return F.group_norm(
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/functional.py", line 2526, in group_norm
return handle_torch_function(group_norm, (input, weight, bias,), input, num_groups, weight=weight, bias=bias, eps=eps)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/overrides.py", line 1534, in handle_torch_function
result = mode.__torch_function__(public_api, types, args, kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_inductor/overrides.py", line 38, in __torch_function__
return func(*args, **kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/functional.py", line 2530, in group_norm
return torch.group_norm(input, num_groups, weight, bias, eps, torch.backends.cudnn.enabled)
RuntimeError: Expected weight to be a vector of size equal to the number of channels in input, but got weight of shape [320] and input of shape [2, 1280]
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/output_graph.py", line 670, in call_user_compiler
compiled_fn = compiler_fn(gm, self.fake_example_inputs())
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/debug_utils.py", line 1055, in debug_wrapper
compiled_gm = compiler_fn(gm, example_inputs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/backends/common.py", line 107, in wrapper
return fn(model, inputs, **kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/scripts/openvino_accelerate.py", line 233, in openvino_fx
return compile_fx(subgraph, example_inputs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_inductor/compile_fx.py", line 415, in compile_fx
model_ = overrides.fuse_fx(model_, example_inputs_)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_inductor/overrides.py", line 96, in fuse_fx
gm = mkldnn_fuse_fx(gm, example_inputs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_inductor/mkldnn.py", line 509, in mkldnn_fuse_fx
ShapeProp(gm, fake_mode=fake_mode).propagate(*example_inputs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/fx/passes/shape_prop.py", line 185, in propagate
return super().run(*args)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/fx/interpreter.py", line 136, in run
self.env[node] = self.run_node(node)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/fx/passes/shape_prop.py", line 152, in run_node
raise RuntimeError(
RuntimeError: ShapeProp error for: node=%self_norm1 : [#users=1] = call_module[target=self_norm1](args = (%input_tensor,), kwargs = {}) with meta={'nn_module_stack': {'self_norm1': <class 'torch.nn.modules.normalization.GroupNorm'>}, 'stack_trace': ' File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/diffusers/models/resnet.py", line 691, in forward\n hidden_states = self.norm1(hidden_states)\n'}
While executing %self_norm1 : [#users=1] = call_module[target=self_norm1](args = (%input_tensor,), kwargs = {})
Original traceback:
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/diffusers/models/resnet.py", line 691, in forward
hidden_states = self.norm1(hidden_states)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/modules/call_queue.py", line 57, in f
res = list(func(*args, **kwargs))
File "/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/modules/call_queue.py", line 36, in f
res = func(*args, **kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/modules/txt2img.py", line 52, in txt2img
processed = modules.scripts.scripts_txt2img.run(p, *args)
File "/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/modules/scripts.py", line 601, in run
processed = script.run(p, *script_args)
File "/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/scripts/openvino_accelerate.py", line 1228, in run
processed = process_images_openvino(p, model_config, vae_ckpt, p.sampler_name, enable_caching, openvino_device, mode, is_xl_ckpt, refiner_ckpt, refiner_frac)
File "/home/dennis/Downloads/stable-diffusion-webui/stable-diffusion-webui/scripts/openvino_accelerate.py", line 979, in process_images_openvino
output = shared.sd_diffusers_model(
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py", line 840, in __call__
noise_pred = self.unet(
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/eval_frame.py", line 82, in forward
return self.dynamo_ctx(self._orig_mod.forward)(*args, **kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/eval_frame.py", line 209, in _fn
return fn(*args, **kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/diffusers/models/unet_2d_condition.py", line 932, in forward
emb = self.time_embedding(t_emb, timestep_cond)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/diffusers/models/unet_2d_condition.py", line 1066, in <graph break in forward>
sample, res_samples = downsample_block(
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/diffusers/models/unet_2d_blocks.py", line 1159, in forward
hidden_states = resnet(hidden_states, temb, scale=lora_scale)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/eval_frame.py", line 337, in catch_errors
return callback(frame, cache_size, hooks)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/convert_frame.py", line 404, in _convert_frame
result = inner_convert(frame, cache_size, hooks)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/convert_frame.py", line 104, in _fn
return fn(*args, **kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/convert_frame.py", line 262, in _convert_frame_assert
return _compile(
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/utils.py", line 163, in time_wrapper
r = func(*args, **kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/convert_frame.py", line 324, in _compile
out_code = transform_code_object(code, transform)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/bytecode_transformation.py", line 445, in transform_code_object
transformations(instructions, code_options)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/convert_frame.py", line 311, in transform
tracer.run()
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/symbolic_convert.py", line 1726, in run
super().run()
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/symbolic_convert.py", line 576, in run
and self.step()
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/symbolic_convert.py", line 540, in step
getattr(self, inst.opname)(inst)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/symbolic_convert.py", line 372, in wrapper
self.output.compile_subgraph(self, reason=reason)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/output_graph.py", line 541, in compile_subgraph
self.compile_and_call_fx_graph(tx, pass2.graph_output_vars(), root)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/output_graph.py", line 588, in compile_and_call_fx_graph
compiled_fn = self.call_user_compiler(gm)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/utils.py", line 163, in time_wrapper
r = func(*args, **kwargs)
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/torch/_dynamo/output_graph.py", line 675, in call_user_compiler
raise BackendCompilerFailed(self.compiler_fn, e) from e
torch._dynamo.exc.BackendCompilerFailed: openvino_fx raised RuntimeError: ShapeProp error for: node=%self_norm1 : [#users=1] = call_module[target=self_norm1](args = (%input_tensor,), kwargs = {}) with meta={'nn_module_stack': {'self_norm1': <class 'torch.nn.modules.normalization.GroupNorm'>}, 'stack_trace': ' File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/diffusers/models/resnet.py", line 691, in forward\n hidden_states = self.norm1(hidden_states)\n'}
While executing %self_norm1 : [#users=1] = call_module[target=self_norm1](args = (%input_tensor,), kwargs = {})
Original traceback:
File "/home/dennis/Downloads/stable-diffusion-webui/sd_env/lib/python3.9/site-packages/diffusers/models/resnet.py", line 691, in forward
hidden_states = self.norm1(hidden_states)
Set torch._dynamo.config.verbose=True for more information
You can suppress this exception and fall back to eager by setting:
torch._dynamo.config.suppress_errors = True
---
Additional information
Something is incorrect in the install instructions. The program seems to install ok, but crashes as soon as you try to use it.
I ran into the same issue.
I managed to get it working by running these two commands:
export USE_OPENVINO=1
pip install torch==2.1.0 torchvision==0.16.0
I think the installation instructions need to be updated to reflect the latest commit 4400629
I ran into the same issue.
I managed to get it working by running these two commands:
export USE_OPENVINO=1 pip install torch==2.1.0 torchvision==0.16.0I think the installation instructions need to be updated to reflect the latest commit 4400629
I found this solution useful with python3.10.6. But python3.9 may still throw errors.
Thanks fo your all, finally it works now, A770 16G in WSL2 w/ubuntu 22.04 works fine BUT pretty slow 512*512 5 it/s takes 1min 48 sec -what I install sudo apt install libtcmalloc-minimal4 >> Cannot locate TCMalloc (improves CPU memory usage) pip install opencv-python-headless >> ImportError: libGL.so export USE_OPENVINO=1 pip install torch==2.1.0 torchvision==0.16.0