Closed Nathan-dm closed 1 year ago
OpenVINO on Windows needs this manual patch to PyTorch.
<conda_env_root>
is the venv
folder.
https://github.com/openvinotoolkit/stable-diffusion-webui/wiki/Installation-on-Intel-Silicon/7b7d191ab321867e27d6224d96ca9a790b008b2c#windows-1
Manual patch is not needed anymore. Pushed a fix for this https://github.com/vladmandic/automatic/commit/77fce3e8c804e1216fc47ffbe03e3b020974d546
i got new error, and it still can't use GPU
```
remote: Enumerating objects: 105, done.
remote: Counting objects: 100% (105/105), done.
remote: Compressing objects: 100% (51/51), done.
Receiving objects: 100% (105/105), 115.78 KiB | 275.00 KiB/s, done.
Resolving deltas: 100% (64/64), completed with 12 local objects.
From https://github.com/vladmandic/automatic
df65df3f..ce0be4a2 master -> origin/master
Fetching submodule extensions-builtin/sd-webui-controlnet
From https://github.com/Mikubill/sd-webui-controlnet
573fb2e..c3b32f2 main -> origin/main
aa397b8..d08b983 sdxl -> origin/sdxl
Updating df65df3f..ce0be4a2
Fast-forward
CHANGELOG.md | 25 ++++++++++++-
README.md | 12 +++---
cli/model-metadata.py | 41 +++++++++++++++++++++
extensions-builtin/Lora/ui_extra_networks_lora.py | 2 +
extensions-builtin/sd-webui-controlnet | 2 +-
javascript/extraNetworks.js | 3 +-
javascript/style.css | 4 +-
modules/images.py | 2 +-
modules/img2img.py | 3 +-
modules/intel/ipex/hijacks.py | 4 +-
modules/intel/openvino/__init__.py | 7 ----
modules/lora_diffusers.py | 5 +--
modules/modelloader.py | 38 ++++++++++++++++++-
modules/processing.py | 8 +++-
modules/processing_diffusers.py | 41 +++++++++++++++------
modules/sd_models.py | 27 +++++++++++---
modules/shared.py | 23 ++++++------
modules/txt2img.py | 5 ++-
modules/ui.py | 45 ++++++++++++++---------
modules/ui_extra_networks.py | 18 +++++----
modules/ui_extra_networks_checkpoints.py | 3 ++
modules/ui_models.py | 33 +++++++++++++++--
22 files changed, 263 insertions(+), 88 deletions(-)
create mode 100755 cli/model-metadata.py
Using VENV: C:\Stable Diffusion 1\automatic\venv
07:09:33-455030 INFO Starting SD.Next
07:09:33-460656 INFO Python 3.10.10 on Windows
07:09:33-504951 INFO Version: ce0be4a2 Thu Aug 31 14:30:44 2023 -0400
07:09:34-159510 INFO Using OpenVINO with Torch Nightly CPU
07:09:34-367746 WARNING Modified files: ['models/.placeholder', 'models/VAE-approx/model.pt',
'models/karlo/ViT-L-14_stats.th']
07:09:34-419095 INFO Verifying requirements
07:09:34-433826 INFO Verifying packages
07:09:34-446930 INFO Verifying repositories
07:09:40-438606 ERROR Error running git: C:\Stable Diffusion 1\automatic\repositories\CodeFormer / checkout 7a584fd
07:09:40-440599 ERROR Local changes detected: check log for details: C:\Stable Diffusion 1\automatic\sdnext.log
07:09:41-596066 INFO Verifying submodules
07:10:15-253637 INFO Extensions enabled: ['clip-interrogator-ext', 'LDSR', 'Lora', 'ScuNET',
'sd-extension-aesthetic-scorer', 'sd-extension-steps-animation', 'sd-extension-system-info',
'sd-webui-agent-scheduler', 'sd-webui-model-converter', 'seed_travel',
'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg', 'SwinIR', 'gif2gif',
'put extensions here.txt', 'sd-webui-roop', 'Stable-Diffusion-Webui-Civitai-Helper',
'ultimate-upscale-for-automatic1111']
07:10:15-257640 INFO Verifying packages
07:10:15-261559 WARNING Setup complete with errors: 1
07:10:15-264035 WARNING See log file for more details: C:\Stable Diffusion 1\automatic\sdnext.log
07:10:15-280841 INFO Extension preload: 0.0s C:\Stable Diffusion 1\automatic\extensions-builtin
07:10:15-510141 INFO Extension preload: 0.0s extensions
07:10:15-533296 INFO Server arguments: ['--use-openvino', '--autolaunch']
07:10:15-536283 INFO Command line args: {'autolaunch': True, 'use_openvino': True}
No module 'xformers'. Proceeding without it.
07:10:23-917710 INFO Engine: backend=Backend.DIFFUSERS
07:10:25-021400 INFO Libraries loaded
07:10:25-023395 INFO Using models path:
07:10:25-025388 ERROR Rollback VAE functionality requires compatible GPU
07:10:25-027381 INFO Available VAEs: C:\Stable Diffusion 1\automatic\models\VAE items=0
07:10:25-031497 INFO Skipping conflicting extension: extensions\multidiffusion-upscaler-for-automatic1111
07:10:25-032495 INFO Skipping conflicting extension: extensions\sd-webui-controlnet
07:10:25-035773 INFO Available models: C:\Stable Diffusion 1\automatic\models\Stable-diffusion items=0
Download the default model? (y/N)
2023-09-01 07:10:30,204 - roop - INFO - roop v0.0.2
2023-09-01 07:10:30,205 - roop - INFO - roop v0.0.2
Civitai Helper: Get Custom Model Folder
Civitai Helper: Load setting from: extensions\Stable-Diffusion-Webui-Civitai-Helper\setting.json
Civitai Helper: No setting file, use default
07:10:30-582019 INFO Loading UI theme: name=black-orange style=Auto
2023-09-01 07:10:30,653 - roop - WARNING - You should at least have one model in models directory, please read the doc here : https://github.com/s0md3v/sd-webui-roop/
2023-09-01 07:10:30,740 - roop - WARNING - You should at least have one model in models directory, please read the doc here : https://github.com/s0md3v/sd-webui-roop/
Running on local URL: http://127.0.0.1:7860
07:10:36-657516 INFO Local URL: http://127.0.0.1:7860/
07:10:36-664382 INFO Initializing middleware
07:10:37-208197 INFO [AgentScheduler] Task queue is empty
07:10:37-213179 INFO [AgentScheduler] Registering APIs
07:10:37-614589 INFO Torch override dtype: no-half set
07:10:37-620578 INFO Torch override VAE dtype: no-half set
07:10:37-625689 INFO Setting Torch parameters: dtype=torch.float32 vae=torch.float32 unet=torch.float32
07:10:37-631286 ERROR Cannot run without a checkpoint
07:10:37-637618 ERROR Use --ckpt
Either disable your iGPU or open a command prompt in the automatic folder and run this:
set OPENVINO_TORCH_BACKEND_DEVICE=GPU.1
./webui.bat --use-openvino
Or run this if you want to use your iGPU instead of the dGPU:
set OPENVINO_TORCH_BACKEND_DEVICE=GPU.0
./webui.bat --use-openvino
And this will use CPU mode:
set OPENVINO_TORCH_BACKEND_DEVICE=CPU
./webui.bat --use-openvino
i encountered several problem
remote: Enumerating objects: 33, done.
remote: Counting objects: 100% (33/33), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 33 (delta 14), reused 25 (delta 12), pack-reused 0
Unpacking objects: 100% (33/33), 43.07 KiB | 222.00 KiB/s, done.
From https://github.com/vladmandic/automatic
161bd6af..106075e6 dev -> origin/dev
Already up to date.
Using VENV: C:\Stable Diffusion 1\automatic\venv
18:56:27-095202 INFO Starting SD.Next
18:56:27-100174 INFO Python 3.10.10 on Windows
18:56:27-136054 INFO Version: ce0be4a2 Thu Aug 31 14:30:44 2023 -0400
18:56:27-912904 INFO Using OpenVINO with Torch Nightly CPU
18:56:28-169048 INFO Verifying requirements
18:56:28-187984 INFO Verifying packages
18:56:28-203931 INFO Verifying repositories
18:56:33-664856 ERROR Error running git: C:\Stable Diffusion 1\automatic\repositories\CodeFormer / checkout 7a584fd
18:56:33-666851 ERROR Local changes detected: check log for details: C:\Stable Diffusion 1\automatic\sdnext.log
18:56:34-794543 INFO Verifying submodules
18:56:53-010601 INFO Extensions enabled: ['clip-interrogator-ext', 'LDSR', 'Lora', 'ScuNET',
'sd-extension-aesthetic-scorer', 'sd-extension-steps-animation', 'sd-extension-system-info',
'sd-webui-agent-scheduler', 'sd-webui-model-converter', 'seed_travel',
'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg', 'SwinIR', 'gif2gif',
'put extensions here.txt', 'sd-webui-roop', 'Stable-Diffusion-Webui-Civitai-Helper',
'ultimate-upscale-for-automatic1111']
18:56:53-012596 INFO Verifying packages
18:56:53-015585 WARNING Setup complete with errors: 1
18:56:53-016582 WARNING See log file for more details: C:\Stable Diffusion 1\automatic\sdnext.log
18:56:53-027545 INFO Extension preload: 0.0s C:\Stable Diffusion 1\automatic\extensions-builtin
18:56:53-028541 INFO Extension preload: 0.0s extensions
18:56:53-044488 INFO Server arguments: ['--use-openvino', '--autolaunch']
18:56:53-046482 INFO Command line args: {'autolaunch': True, 'use_openvino': True}
No module 'xformers'. Proceeding without it.
18:57:01-255279 INFO Engine: backend=Backend.DIFFUSERS
18:57:02-299114 INFO Libraries loaded
18:57:02-301066 INFO Using models path:
18:57:02-303079 ERROR Rollback VAE functionality requires compatible GPU
18:57:02-305907 INFO Available VAEs: C:\Stable Diffusion 1\automatic\models\VAE items=0
18:57:02-308003 INFO Skipping conflicting extension: extensions\multidiffusion-upscaler-for-automatic1111
18:57:02-310330 INFO Skipping conflicting extension: extensions\sd-webui-controlnet
18:57:02-320993 INFO Available models: C:\Stable Diffusion 1\automatic\models\Stable-diffusion items=3
2023-09-01 18:57:06,408 - roop - INFO - roop v0.0.2
2023-09-01 18:57:06,409 - roop - INFO - roop v0.0.2
Civitai Helper: Get Custom Model Folder
Civitai Helper: Load setting from: extensions\Stable-Diffusion-Webui-Civitai-Helper\setting.json
Civitai Helper: No setting file, use default
18:57:07-100667 INFO Loading UI theme: name=black-orange style=Auto
Running on local URL: http://127.0.0.1:7860
18:57:10-026869 INFO Local URL: http://127.0.0.1:7860/
18:57:10-028865 INFO Initializing middleware
18:57:10-180356 INFO [AgentScheduler] Task queue is empty
18:57:10-181351 INFO [AgentScheduler] Registering APIs
18:57:10-307522 INFO Torch override dtype: no-half set
18:57:10-309515 INFO Torch override VAE dtype: no-half set
18:57:10-311508 INFO Setting Torch parameters: dtype=torch.float32 vae=torch.float32 unet=torch.float32
18:57:10-313500 INFO Loading diffuser model: C:\Stable Diffusion
1\automatic\models\Stable-diffusion\dreamshaper_8.safetensors
18:57:16-621857 INFO Compiling pipeline=StableDiffusionPipeline shape=512 mode=openvino_fx
18:57:17-387959 INFO Complilation done.
18:57:20-000219 INFO Embeddings: loaded=10 skipped=1
18:57:20-002212 INFO Model loaded in 9.7s (load=9.7s) native=512
18:57:20-295232 INFO Model load finished: {'ram': {'used': 6.8, 'total': 15.8}}
18:57:20-298222 INFO Startup time: 27.2s (torch=5.3s gradio=1.1s diffusers=1.2s libraries=1.6s codeformer=0.1s
scripts=4.1s onchange=0.6s ui-txt2img=0.1s ui-img2img=0.1s ui-settings=0.1s ui-extensions=2.1s
ui-defaults=0.1s launch=0.4s api=0.1s app-started=0.2s checkpoint=10.0s)
18:57:20-302215 INFO Launching browser
19:03:43-259645 INFO Embeddings: loaded=0 skipped=11
Progress 72.33s/it █████████████████████▍ 65% 13/20 09:28 08:26 BaseTraceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\modules\intel\openvino\__init__.py", line 68, in openvino_fx
compiled_model = core.compile_model(om, device)
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\openvino\runtime\ie_api.py", line 543, in compile_model
super().compile_model(model, device_name, {} if config is None else config),
RuntimeError: Exception from src\inference\src\core.cpp:117:
[ GENERAL_ERROR ] bad allocation
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\fx\passes\shape_prop.py", line 147, in run_node
result = super().run_node(n)
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\fx\interpreter.py", line 177, in run_node
return getattr(self, n.op)(n.target, args, kwargs)
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\fx\interpreter.py", line 294, in call_module
return submod(*args, **kwargs)
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "C:\Stable Diffusion 1\automatic\extensions-builtin\Lora\lora.py", line 418, in lora_Conv2d_forward
return torch.nn.Conv2d_forward_before_lora(self, input)
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\nn\modules\conv.py", line 463, in forward
return self._conv_forward(input, self.weight, self.bias)
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\nn\modules\conv.py", line 459, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\_inductor\overrides.py", line 38, in __torch_function__
return func(*args, **kwargs)
RuntimeError: Given groups=1, weight of size [320, 4, 3, 3], expected input[1, 2, 77, 768] to have 4 channels, but got 2 channels instead
19:13:36-558108 ERROR WON'T CONVERT forward C:\Stable Diffusion
1\automatic\venv\lib\site-packages\diffusers\models\unet_2d_condition.py line 709
due to:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\openvino\runtime\ie_api.py",
line 543, in compile_model
super().compile_model(model, device_name, {} if config is None else config),
RuntimeError: Exception from src\inference\src\core.cpp:117:
[ GENERAL_ERROR ] bad allocation
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\_inductor\overrides.py",
line 38, in __torch_function__
return func(*args, **kwargs)
RuntimeError: Given groups=1, weight of size [320, 4, 3, 3], expected input[1, 2, 77, 768] to
have 4 channels, but got 2 channels instead
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\fx\passes\shape_prop.py",
line 152, in run_node
raise RuntimeError(
RuntimeError: ShapeProp error for: node=%self_conv_in : [#users=3] =
call_module[target=self_conv_in](args = (%sample,), kwargs = {}) with meta={'nn_module_stack':
{'self_conv_in': <class 'torch.nn.modules.conv.Conv2d'>}, 'stack_trace': ' File "C:\\Stable
Diffusion 1\\automatic\\venv\\lib\\site-packages\\diffusers\\models\\unet_2d_condition.py",
line 909, in forward\n sample = self.conv_in(sample)\n'}
While executing %self_conv_in : [#users=3] = call_module[target=self_conv_in](args =
(%sample,), kwargs = {})
Original traceback:
File "C:\Stable Diffusion
1\automatic\venv\lib\site-packages\diffusers\models\unet_2d_condition.py", line 909, in forward
sample = self.conv_in(sample)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\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_conv_in : [#users=3] = call_module[target=self_conv_in](args = (%sample,), kwargs =
{}) with meta={'nn_module_stack': {'self_conv_in': <class 'torch.nn.modules.conv.Conv2d'>},
'stack_trace': ' File "C:\\Stable Diffusion
1\\automatic\\venv\\lib\\site-packages\\diffusers\\models\\unet_2d_condition.py", line 909, in
forward\n sample = self.conv_in(sample)\n'}
While executing %self_conv_in : [#users=3] = call_module[target=self_conv_in](args =
(%sample,), kwargs = {})
Original traceback:
File "C:\Stable Diffusion
1\automatic\venv\lib\site-packages\diffusers\models\unet_2d_condition.py", line 909, in forward
sample = self.conv_in(sample)
Set torch._dynamo.config.verbose=True for more information
19:13:36-558108 ERROR WON'T CONVERT forward C:\Stable Diffusion
1\automatic\venv\lib\site-packages\diffusers\models\unet_2d_condition.py line 709
due to:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\openvino\runtime\ie_api.py",
line 543, in compile_model
super().compile_model(model, device_name, {} if config is None else config),
RuntimeError: Exception from src\inference\src\core.cpp:117:
[ GENERAL_ERROR ] bad allocation
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\_inductor\overrides.py",
line 38, in __torch_function__
return func(*args, **kwargs)
RuntimeError: Given groups=1, weight of size [320, 4, 3, 3], expected input[1, 2, 77, 768] to
have 4 channels, but got 2 channels instead
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\fx\passes\shape_prop.py",
line 152, in run_node
raise RuntimeError(
RuntimeError: ShapeProp error for: node=%self_conv_in : [#users=3] =
call_module[target=self_conv_in](args = (%sample,), kwargs = {}) with meta={'nn_module_stack':
{'self_conv_in': <class 'torch.nn.modules.conv.Conv2d'>}, 'stack_trace': ' File "C:\\Stable
Diffusion 1\\automatic\\venv\\lib\\site-packages\\diffusers\\models\\unet_2d_condition.py",
line 909, in forward\n sample = self.conv_in(sample)\n'}
While executing %self_conv_in : [#users=3] = call_module[target=self_conv_in](args =
(%sample,), kwargs = {})
Original traceback:
File "C:\Stable Diffusion
1\automatic\venv\lib\site-packages\diffusers\models\unet_2d_condition.py", line 909, in forward
sample = self.conv_in(sample)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\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_conv_in : [#users=3] = call_module[target=self_conv_in](args = (%sample,), kwargs =
{}) with meta={'nn_module_stack': {'self_conv_in': <class 'torch.nn.modules.conv.Conv2d'>},
'stack_trace': ' File "C:\\Stable Diffusion
1\\automatic\\venv\\lib\\site-packages\\diffusers\\models\\unet_2d_condition.py", line 909, in
forward\n sample = self.conv_in(sample)\n'}
While executing %self_conv_in : [#users=3] = call_module[target=self_conv_in](args =
(%sample,), kwargs = {})
Original traceback:
File "C:\Stable Diffusion
1\automatic\venv\lib\site-packages\diffusers\models\unet_2d_condition.py", line 909, in forward
sample = self.conv_in(sample)
Set torch._dynamo.config.verbose=True for more information
Progress 89.05s/it ███████████████████████ 70% 14/20 11:35 08:54 Base19:16:51-032804 ERROR WON'T CONVERT forward C:\Stable Diffusion
1\automatic\venv\lib\site-packages\diffusers\models\unet_2d_blocks.py line 2142
due to:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\_prims\__init__.py", line
1866, in _cat_meta
raise RuntimeError(
RuntimeError: Sizes of tensors must match except in dimension 1. Expected 64 but got 16 for
tensor number 1 in the list
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\_dynamo\utils.py", line
1206, in run_node
raise RuntimeError(
RuntimeError: Failed running call_function <built-in method cat of type object at
0x00007FF99EE2C560>(*([FakeTensor(FakeTensor(..., device='meta', size=(2, 1280, 64, 64)), cpu),
FakeTensor(FakeTensor(..., device='meta', size=(2, 640, 16, 16)), cpu)],), **{'dim': 1}):
Sizes of tensors must match except in dimension 1. Expected 64 but got 16 for tensor number 1
in the list
(scroll up for backtrace)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\_dynamo\utils.py", line
1173, in get_fake_value
raise TorchRuntimeError() from e
torch._dynamo.exc.TorchRuntimeError:
from user code:
File "C:\Stable Diffusion
1\automatic\venv\lib\site-packages\diffusers\models\unet_2d_blocks.py", line 2157, in forward
hidden_states = torch.cat([hidden_states, res_hidden_states], dim=1)
Set torch._dynamo.config.verbose=True for more information
19:16:51-032804 ERROR WON'T CONVERT forward C:\Stable Diffusion
1\automatic\venv\lib\site-packages\diffusers\models\unet_2d_blocks.py line 2142
due to:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\_prims\__init__.py", line
1866, in _cat_meta
raise RuntimeError(
RuntimeError: Sizes of tensors must match except in dimension 1. Expected 64 but got 16 for
tensor number 1 in the list
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\_dynamo\utils.py", line
1206, in run_node
raise RuntimeError(
RuntimeError: Failed running call_function <built-in method cat of type object at
0x00007FF99EE2C560>(*([FakeTensor(FakeTensor(..., device='meta', size=(2, 1280, 64, 64)), cpu),
FakeTensor(FakeTensor(..., device='meta', size=(2, 640, 16, 16)), cpu)],), **{'dim': 1}):
Sizes of tensors must match except in dimension 1. Expected 64 but got 16 for tensor number 1
in the list
(scroll up for backtrace)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\_dynamo\utils.py", line
1173, in get_fake_value
raise TorchRuntimeError() from e
torch._dynamo.exc.TorchRuntimeError:
from user code:
File "C:\Stable Diffusion
1\automatic\venv\lib\site-packages\diffusers\models\unet_2d_blocks.py", line 2157, in forward
hidden_states = torch.cat([hidden_states, res_hidden_states], dim=1)
Set torch._dynamo.config.verbose=True for more information
Progress 56.20s/it ███████████████████████ 70% 14/20 13:06 05:37 Base
19:16:51-128495 ERROR Exception: Sizes of tensors must match except in dimension 1. Expected size 64 but got size 16
for tensor number 1 in the list.
19:16:51-131479 ERROR Arguments: args=('task(jg7ck7zcn7ap1lw)', '1 girl', '', [], 20, 5, None, True, False, False, 1,
1, 6, 6, 0.7, 1, -1.0, -1.0, 0, 0, 0, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, 5, 0.8, '',
'', [], 0, False, 'x264', 'blend', 10, 0, 0, False, True, True, True, 'intermediate',
'animation', None, False, '0', 'C:\\Stable Diffusion
1\\automatic\\models\\roop\\inswapper_128.onnx', 'CodeFormer', 1, '', 1, 1, False, True, False,
False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False,
False, False, 0, False, False, 4.0, '', 10.0, 'Linear', 3, False, 30.0, True, False, False, 0,
0.0, 'Lanczos', 1, True, 0, 0, 0.001, 75, 0.0, False, True) kwargs={}
19:16:51-137050 ERROR gradio call: RuntimeError
╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ C:\Stable Diffusion 1\automatic\modules\call_queue.py:34 in f │
│ │
│ 33 │ │ │ try: │
│ ❱ 34 │ │ │ │ res = func(*args, **kwargs) │
│ 35 │ │ │ │ progress.record_results(id_task, res) │
│ │
│ C:\Stable Diffusion 1\automatic\modules\txt2img.py:66 in txt2img │
│ │
│ 65 │ if processed is None: │
│ ❱ 66 │ │ processed = processing.process_images(p) │
│ 67 │ p.close() │
│ │
│ C:\Stable Diffusion 1\automatic\modules\processing.py:573 in process_images │
│ │
│ 572 │ │ else: │
│ ❱ 573 │ │ │ res = process_images_inner(p) │
│ 574 │ finally: │
│ │
│ C:\Stable Diffusion 1\automatic\modules\processing.py:739 in process_images_inner │
│ │
│ 738 │ │ │ │ from modules.processing_diffusers import process_diffusers │
│ ❱ 739 │ │ │ │ x_samples_ddim = process_diffusers(p, p.seeds, p.prompts, p.negative_pro │
│ 740 │
│ │
│ C:\Stable Diffusion 1\automatic\modules\processing_diffusers.py:288 in process_diffusers │
│ │
│ 287 │ try: │
│ ❱ 288 │ │ output = shared.sd_model(**base_args) # pylint: disable=not-callable │
│ 289 │ except AssertionError as e: │
│ │
│ ... 3 frames hidden ... │
│ │
│ C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\_dynamo\eval_frame.py:82 in forward │
│ │
│ 81 │ def forward(self, *args, **kwargs): │
│ ❱ 82 │ │ return self.dynamo_ctx(self._orig_mod.forward)(*args, **kwargs) │
│ 83 │
│ │
│ C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\_dynamo\eval_frame.py:209 in _fn │
│ │
│ 208 │ │ │ try: │
│ ❱ 209 │ │ │ │ return fn(*args, **kwargs) │
│ 210 │ │ │ finally: │
│ │
│ C:\Stable Diffusion 1\automatic\venv\lib\site-packages\diffusers\models\unet_2d_condition.py:985 in forward │
│ │
│ 984 │ │ │ if hasattr(upsample_block, "has_cross_attention") and upsample_block.has_cro │
│ ❱ 985 │ │ │ │ sample = upsample_block( │
│ 986 │ │ │ │ │ hidden_states=sample, │
│ │
│ C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\nn\modules\module.py:1501 in _call_impl │
│ │
│ 1500 │ │ │ │ or _global_forward_hooks or _global_forward_pre_hooks): │
│ ❱ 1501 │ │ │ return forward_call(*args, **kwargs) │
│ 1502 │ │ # Do not call functions when jit is used │
│ │
│ C:\Stable Diffusion 1\automatic\venv\lib\site-packages\diffusers\models\unet_2d_blocks.py:2157 in forward │
│ │
│ 2156 │ │ │ res_hidden_states_tuple = res_hidden_states_tuple[:-1] │
│ ❱ 2157 │ │ │ hidden_states = torch.cat([hidden_states, res_hidden_states], dim=1) │
│ 2158 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 64 but got size 16 for tensor number 1 in
the list.
![14](https://github.com/vladmandic/automatic/assets/65475192/8706ea63-13c7-4b8b-8a95-0ac3c147fc8a)
Already up to date.
Using VENV: C:\Stable Diffusion 1\automatic\venv
19:26:37-164881 INFO Starting SD.Next
19:26:37-168655 INFO Python 3.10.10 on Windows
19:26:37-203873 INFO Version: ce0be4a2 Thu Aug 31 14:30:44 2023 -0400
19:26:37-943965 INFO Using OpenVINO with Torch Nightly CPU
19:26:38-156379 INFO Verifying requirements
19:26:38-169078 INFO Verifying packages
19:26:38-179560 INFO Verifying repositories
19:26:42-953242 ERROR Error running git: C:\Stable Diffusion 1\automatic\repositories\CodeFormer / checkout 7a584fd
19:26:42-954240 ERROR Local changes detected: check log for details: C:\Stable Diffusion 1\automatic\sdnext.log
19:26:44-493477 INFO Verifying submodules
19:27:00-839123 INFO Extensions enabled: ['clip-interrogator-ext', 'LDSR', 'Lora', 'ScuNET',
'sd-extension-aesthetic-scorer', 'sd-extension-steps-animation', 'sd-extension-system-info',
'sd-webui-agent-scheduler', 'sd-webui-model-converter', 'seed_travel',
'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg', 'SwinIR', 'gif2gif',
'put extensions here.txt', 'sd-webui-roop', 'Stable-Diffusion-Webui-Civitai-Helper',
'ultimate-upscale-for-automatic1111']
19:27:00-841249 INFO Verifying packages
19:27:00-844238 WARNING Setup complete with errors: 1
19:27:00-845202 WARNING See log file for more details: C:\Stable Diffusion 1\automatic\sdnext.log
19:27:00-856596 INFO Extension preload: 0.0s C:\Stable Diffusion 1\automatic\extensions-builtin
19:27:00-858393 INFO Extension preload: 0.0s extensions
19:27:00-873137 INFO Server arguments: ['--use-openvino', '--autolaunch']
19:27:00-874134 INFO Command line args: {'autolaunch': True, 'use_openvino': True}
No module 'xformers'. Proceeding without it.
19:27:07-362946 INFO Engine: backend=Backend.DIFFUSERS
19:27:08-548927 INFO Libraries loaded
19:27:08-549936 INFO Using models path:
19:27:08-551925 ERROR Rollback VAE functionality requires compatible GPU
19:27:08-554954 INFO Available VAEs: C:\Stable Diffusion 1\automatic\models\VAE items=0
19:27:08-556911 INFO Skipping conflicting extension: extensions\multidiffusion-upscaler-for-automatic1111
19:27:08-557906 INFO Skipping conflicting extension: extensions\sd-webui-controlnet
19:27:08-569021 INFO Available models: C:\Stable Diffusion 1\automatic\models\Stable-diffusion items=3
2023-09-01 19:27:12,321 - roop - INFO - roop v0.0.2
2023-09-01 19:27:12,321 - roop - INFO - roop v0.0.2
Civitai Helper: Get Custom Model Folder
Civitai Helper: Load setting from: extensions\Stable-Diffusion-Webui-Civitai-Helper\setting.json
Civitai Helper: No setting file, use default
19:27:12-728569 INFO Loading UI theme: name=black-orange style=Auto
Running on local URL: http://127.0.0.1:7860
19:27:15-574250 INFO Local URL: http://127.0.0.1:7860/
19:27:15-575834 INFO Initializing middleware
19:27:15-698476 INFO [AgentScheduler] Task queue is empty
19:27:15-699933 INFO [AgentScheduler] Registering APIs
19:27:15-791993 INFO Torch override dtype: no-half set
19:27:15-794099 INFO Torch override VAE dtype: no-half set
19:27:15-796043 INFO Setting Torch parameters: dtype=torch.float32 vae=torch.float32 unet=torch.float32
19:27:15-798236 INFO Loading diffuser model: C:\Stable Diffusion
1\automatic\models\Stable-diffusion\dreamshaper_8.safetensors
19:27:22-442567 INFO Compiling pipeline=StableDiffusionPipeline shape=512 mode=openvino_fx
19:27:23-072369 INFO Complilation done.
19:27:25-728911 INFO Embeddings: loaded=10 skipped=1
19:27:25-730831 INFO Model loaded in 9.9s (load=9.9s) native=512
19:27:26-012054 INFO Model load finished: {'ram': {'used': 6.8, 'total': 15.8}}
19:27:26-014977 INFO Startup time: 25.1s (torch=4.3s gradio=0.9s diffusers=0.8s libraries=1.6s codeformer=0.1s
scripts=3.8s onchange=0.3s ui-txt2img=0.1s ui-img2img=0.1s ui-settings=0.1s ui-extensions=2.1s
ui-defaults=0.1s launch=0.4s api=0.1s app-started=0.1s checkpoint=10.2s)
19:27:26-019614 INFO Launching browser
19:28:03-279361 INFO Embeddings: loaded=0 skipped=11
Progress 30.82s/it ███▍ 10% 2/20 01:01 09:14 Base
19:29:05-974350 ERROR Exception: Exception from src\inference\src\infer_request.cpp:224:
clWaitForEvents
19:29:05-976343 ERROR Arguments: args=('task(9ewsloh2l4iai5i)', 'cat', '', [], 20, 5, None, True, False, False, 1, 1,
6, 6, 0.7, 1, -1.0, -1.0, 0, 0, 0, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, 5, 0.8, '', '',
[], 0, False, 'x264', 'blend', 10, 0, 0, False, True, True, True, 'intermediate', 'animation',
None, False, '0', 'C:\\Stable Diffusion 1\\automatic\\models\\roop\\inswapper_128.onnx',
'CodeFormer', 1, '', 1, 1, False, True, False, False, 'positive', 'comma', 0, False, False, '',
1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, False, False, 4.0, '', 10.0,
'Linear', 3, False, 30.0, True, False, False, 0, 0.0, 'Lanczos', 1, True, 0, 0, 0.001, 75, 0.0,
False, True) kwargs={}
19:29:05-983320 ERROR gradio call: RuntimeError
╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ C:\Stable Diffusion 1\automatic\modules\call_queue.py:34 in f │
│ │
│ 33 │ │ │ try: │
│ ❱ 34 │ │ │ │ res = func(*args, **kwargs) │
│ 35 │ │ │ │ progress.record_results(id_task, res) │
│ │
│ C:\Stable Diffusion 1\automatic\modules\txt2img.py:66 in txt2img │
│ │
│ 65 │ if processed is None: │
│ ❱ 66 │ │ processed = processing.process_images(p) │
│ 67 │ p.close() │
│ │
│ C:\Stable Diffusion 1\automatic\modules\processing.py:573 in process_images │
│ │
│ 572 │ │ else: │
│ ❱ 573 │ │ │ res = process_images_inner(p) │
│ 574 │ finally: │
│ │
│ C:\Stable Diffusion 1\automatic\modules\processing.py:739 in process_images_inner │
│ │
│ 738 │ │ │ │ from modules.processing_diffusers import process_diffusers │
│ ❱ 739 │ │ │ │ x_samples_ddim = process_diffusers(p, p.seeds, p.prompts, p.negative_pro │
│ 740 │
│ │
│ C:\Stable Diffusion 1\automatic\modules\processing_diffusers.py:288 in process_diffusers │
│ │
│ 287 │ try: │
│ ❱ 288 │ │ output = shared.sd_model(**base_args) # pylint: disable=not-callable │
│ 289 │ except AssertionError as e: │
│ │
│ ... 5 frames hidden ... │
│ │
│ C:\Stable Diffusion 1\automatic\venv\lib\site-packages\diffusers\models\unet_2d_condition.py:709 in forward │
│ │
│ 708 │ │
│ ❱ 709 │ def forward( │
│ 710 │ │ self, │
│ │
│ C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\_dynamo\eval_frame.py:209 in _fn │
│ │
│ 208 │ │ │ try: │
│ ❱ 209 │ │ │ │ return fn(*args, **kwargs) │
│ 210 │ │ │ finally: │
│ │
│ C:\Stable Diffusion 1\automatic\modules\intel\openvino\__init__.py:72 in _call │
│ │
│ 71 │ │ │ │ ov_inputs.reverse() │
│ ❱ 72 │ │ │ │ res = compiled_model(ov_inputs) │
│ 73 │ │ │ │ result = [torch.from_numpy(res[out]) for out in compiled_model.outputs] │
│ │
│ C:\Stable Diffusion 1\automatic\venv\lib\site-packages\openvino\runtime\ie_api.py:384 in __call__ │
│ │
│ 383 │ │ │
│ ❱ 384 │ │ return self._infer_request.infer( │
│ 385 │ │ │ inputs, │
│ │
│ C:\Stable Diffusion 1\automatic\venv\lib\site-packages\openvino\runtime\ie_api.py:143 in infer │
│ │
│ 142 │ │ """ │
│ ❱ 143 │ │ return OVDict(super().infer(_data_dispatch( │
│ 144 │ │ │ self, │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
RuntimeError: Exception from src\inference\src\infer_request.cpp:224:
clWaitForEvents
![12](https://github.com/vladmandic/automatic/assets/65475192/33ea0040-bf09-4dae-b413-aec9140fca23)
```
Already up to date.
Using VENV: C:\Stable Diffusion 1\automatic\venv
19:32:43-734502 INFO Starting SD.Next
19:32:43-738401 INFO Python 3.10.10 on Windows
19:32:43-775582 INFO Version: ce0be4a2 Thu Aug 31 14:30:44 2023 -0400
19:32:44-502489 INFO Using OpenVINO with Torch Nightly CPU
19:32:44-685042 INFO Verifying requirements
19:32:44-696054 INFO Verifying packages
19:32:44-706014 INFO Verifying repositories
19:32:49-583134 ERROR Error running git: C:\Stable Diffusion 1\automatic\repositories\CodeFormer / checkout 7a584fd
19:32:49-584125 ERROR Local changes detected: check log for details: C:\Stable Diffusion 1\automatic\sdnext.log
19:32:50-696347 INFO Verifying submodules
19:33:07-029595 INFO Extensions enabled: ['clip-interrogator-ext', 'LDSR', 'Lora', 'ScuNET',
'sd-extension-aesthetic-scorer', 'sd-extension-steps-animation', 'sd-extension-system-info',
'sd-webui-agent-scheduler', 'sd-webui-model-converter', 'seed_travel',
'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg', 'SwinIR', 'gif2gif',
'put extensions here.txt', 'sd-webui-roop', 'Stable-Diffusion-Webui-Civitai-Helper',
'ultimate-upscale-for-automatic1111']
19:33:07-031587 INFO Verifying packages
19:33:07-033580 WARNING Setup complete with errors: 1
19:33:07-034576 WARNING See log file for more details: C:\Stable Diffusion 1\automatic\sdnext.log
19:33:07-041554 INFO Extension preload: 0.0s C:\Stable Diffusion 1\automatic\extensions-builtin
19:33:07-043547 INFO Extension preload: 0.0s extensions
19:33:07-058535 INFO Server arguments: ['--use-openvino', '--autolaunch']
19:33:07-059533 INFO Command line args: {'autolaunch': True, 'use_openvino': True}
No module 'xformers'. Proceeding without it.
19:33:13-618280 INFO Engine: backend=Backend.DIFFUSERS
19:33:14-420396 INFO Libraries loaded
19:33:14-421946 INFO Using models path:
19:33:14-423842 ERROR Rollback VAE functionality requires compatible GPU
19:33:14-425915 INFO Available VAEs: C:\Stable Diffusion 1\automatic\models\VAE items=0
19:33:14-427841 INFO Skipping conflicting extension: extensions\multidiffusion-upscaler-for-automatic1111
19:33:14-428908 INFO Skipping conflicting extension: extensions\sd-webui-controlnet
19:33:14-438858 INFO Available models: C:\Stable Diffusion 1\automatic\models\Stable-diffusion items=3
2023-09-01 19:33:18,247 - roop - INFO - roop v0.0.2
2023-09-01 19:33:18,248 - roop - INFO - roop v0.0.2
Civitai Helper: Get Custom Model Folder
Civitai Helper: Load setting from: extensions\Stable-Diffusion-Webui-Civitai-Helper\setting.json
Civitai Helper: No setting file, use default
19:33:18-913693 INFO Loading UI theme: name=black-orange style=Auto
Running on local URL: http://127.0.0.1:7860
19:33:21-682338 INFO Local URL: http://127.0.0.1:7860/
19:33:21-684253 INFO Initializing middleware
19:33:21-814861 INFO [AgentScheduler] Task queue is empty
19:33:21-816939 INFO [AgentScheduler] Registering APIs
19:33:21-914011 INFO Torch override dtype: no-half set
19:33:21-916114 INFO Torch override VAE dtype: no-half set
19:33:21-918032 INFO Setting Torch parameters: dtype=torch.float32 vae=torch.float32 unet=torch.float32
19:33:21-920363 INFO Loading diffuser model: C:\Stable Diffusion
1\automatic\models\Stable-diffusion\dreamshaper_8.safetensors
19:33:28-801959 INFO Compiling pipeline=StableDiffusionPipeline shape=512 mode=openvino_fx
19:33:29-370158 INFO Complilation done.
19:33:32-107998 INFO Embeddings: loaded=10 skipped=1
19:33:32-110987 INFO Model loaded in 10.2s (load=10.2s) native=512
19:33:32-379090 INFO Model load finished: {'ram': {'used': 6.8, 'total': 15.8}}
19:33:32-382308 INFO Startup time: 25.3s (torch=4.5s gradio=0.8s diffusers=0.8s libraries=1.2s codeformer=0.1s
scripts=3.8s onchange=0.5s ui-txt2img=0.1s ui-img2img=0.1s ui-settings=0.1s ui-extensions=2.0s
ui-defaults=0.1s launch=0.4s api=0.1s app-started=0.2s checkpoint=10.5s)
19:33:32-386168 INFO Launching browser
19:34:38-462037 INFO Embeddings: loaded=0 skipped=11
Progress 41.93s/it ███████████████▎ 45% 9/20 08:15 07:41 BaseTraceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\modules\intel\openvino\__init__.py", line 68, in openvino_fx
compiled_model = core.compile_model(om, device)
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\openvino\runtime\ie_api.py", line 543, in compile_model
super().compile_model(model, device_name, {} if config is None else config),
RuntimeError: Exception from src\inference\src\core.cpp:117:
[ GENERAL_ERROR ] Exception from src\core\src\runtime\allocator.cpp:90:
bad allocation
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\fx\passes\shape_prop.py", line 147, in run_node
result = super().run_node(n)
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\fx\interpreter.py", line 177, in run_node
return getattr(self, n.op)(n.target, args, kwargs)
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\fx\interpreter.py", line 294, in call_module
return submod(*args, **kwargs)
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "C:\Stable Diffusion 1\automatic\extensions-builtin\Lora\lora.py", line 418, in lora_Conv2d_forward
return torch.nn.Conv2d_forward_before_lora(self, input)
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\nn\modules\conv.py", line 463, in forward
return self._conv_forward(input, self.weight, self.bias)
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\nn\modules\conv.py", line 459, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\_inductor\overrides.py", line 38, in __torch_function__
return func(*args, **kwargs)
RuntimeError: Given groups=1, weight of size [320, 4, 3, 3], expected input[1, 2, 77, 768] to have 4 channels, but got 2 channels instead
19:43:05-689132 ERROR WON'T CONVERT forward C:\Stable Diffusion
1\automatic\venv\lib\site-packages\diffusers\models\unet_2d_condition.py line 709
due to:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\openvino\runtime\ie_api.py",
line 543, in compile_model
super().compile_model(model, device_name, {} if config is None else config),
RuntimeError: Exception from src\inference\src\core.cpp:117:
[ GENERAL_ERROR ] Exception from src\core\src\runtime\allocator.cpp:90:
bad allocation
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\_inductor\overrides.py",
line 38, in __torch_function__
return func(*args, **kwargs)
RuntimeError: Given groups=1, weight of size [320, 4, 3, 3], expected input[1, 2, 77, 768] to
have 4 channels, but got 2 channels instead
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Stable Diffusion 1\automatic\venv\lib\site-packages\torch\fx\passes\shape_prop.py",
line 152, in run_node
raise RuntimeError(
RuntimeError: ShapeProp error for: node=%self_conv_in : [#users=3] =
call_module[target=self_conv_in](args = (%sample,), kwargs = {}) with meta={'nn_module_stack':
{'self_conv_in':
![64](https://github.com/vladmandic/automatic/assets/65475192/03f8d264-4482-490a-9e8d-f8b2d1b36ff1)
OpenVINO compiles and converts models to OpenVINO format and saves them in the cache folder. SD 1.5 model will be 3.4 GB model + 180 MB VAE for each resolution. And OpenVINO will use 12GB of RAM to compile a SD 1.5 model. It will use the cached model after the first compile.
You are running out of RAM in each use case. iGPUs are using RAM as their VRAM and it makes things worse for you.
And dGPU with 4 GB VRAM is too close to OOM. Try setting VAE Upcasting to False from Diffusers settings.
Issue Description
i tried using
--use-openvino
but openvino did not recognize my gpus, it run on cpuVersion Platform Description
System Information: Mozilla Firefox 116.0.3 Laptop: Acer Swift 3X Operating system:Windows 10 64 bit (22H2) Processor: Intel Core I5 1135G7 Graphics card: Intel Xe Graphic (80eu; GPU.0), Intel Xe MAX (DG1; GPU.1) Ram: 16GB LPDDR4X 4267mhz SSD:512Gb M.2 NVME
Relevant log output
Backend
Diffusers
Model
SD 1.5
Acknowledgements