Open Wing13 opened 1 year ago
1.find scripts/openvino_accelerate.py,find "def process_images_openvino(" method 2.add script below:
if p.scripts is not None: p.scripts.before_process(p)
3.have a try
Thank you! It seems to be working now, but it throws a different error. It seems to be related to memory, so the problem is probably with the hardware.
Error: RuntimeError: Exception from src\inference\src\core.cpp:116: [ GENERAL_ERROR ] [CL ext] Can not allocate nullptr for USM type.
Full error text:
*** Error completing request *** Arguments: ('task(snue670neuxy19k)', 'cat', '', [], 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 0x000002A84D1AABF0>, 1, False, '', 0.8, -1, False, -1, 0, 0, 0, False, 7, 100, 'Constant', 0, 'Constant', 0, 4, True, 'MEAN', 'AD', 1, <scripts.animatediff_ui.AnimateDiffProcess object at 0x000002A84D1BAFB0>, <scripts.controlnet_ui.controlnet_ui_group.UiControlNetUnit object at 0x000002A84D1B8EE0>, <scripts.controlnet_ui.controlnet_ui_group.UiControlNetUnit object at 0x000002A84D2337C0>, <scripts.controlnet_ui.controlnet_ui_group.UiControlNetUnit object at 0x000002A84D214790>, 'None', 'None', 'GPU', True, 'Euler a', True, False, 'None', 0.8, False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, False, None, None, False, None, None, False, None, None, False, 50) {} Traceback (most recent call last): File "D:\StableDiffusion\stable-diffusion-webui\modules\call_queue.py", line 57, in f res = list(func(*args, **kwargs)) File "D:\StableDiffusion\stable-diffusion-webui\modules\call_queue.py", line 36, in f res = func(*args, **kwargs) File "D:\StableDiffusion\stable-diffusion-webui\modules\txt2img.py", line 52, in txt2img processed = modules.scripts.scripts_txt2img.run(p, *args) File "D:\StableDiffusion\stable-diffusion-webui\modules\scripts.py", line 601, in run processed = script.run(p, *script_args) File "D:\StableDiffusion\stable-diffusion-webui\scripts\openvino_accelerate.py", line 1135, 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 "D:\StableDiffusion\stable-diffusion-webui\scripts\openvino_accelerate.py", line 885, in process_images_openvino output = shared.sd_diffusers_model( File "D:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "D:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\diffusers\pipelines\stable_diffusion\pipeline_stable_diffusion.py", line 680, in __call__ noise_pred = self.unet( File "D:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "D:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl return forward_call(*args, **kwargs) File "D:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\torch\_dynamo\eval_frame.py", line 328, in _fn return fn(*args, **kwargs) File "D:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "D:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl return forward_call(*args, **kwargs) File "D:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\diffusers\models\unet_2d_condition.py", line 734, in forward def forward( File "D:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\torch\_dynamo\eval_frame.py", line 328, in _fn return fn(*args, **kwargs) File "D:\StableDiffusion\stable-diffusion-webui\scripts\openvino_accelerate.py", line 188, in _call res = execute(compiled_model, *args, executor="openvino", File "D:\StableDiffusion\stable-diffusion-webui\scripts\openvino_accelerate.py", line 217, in execute return openvino_execute_partitioned(gm, *args, executor_parameters=executor_parameters, file_name=file_name) File "D:\StableDiffusion\stable-diffusion-webui\scripts\openvino_accelerate.py", line 319, in openvino_execute_partitioned return partitioned_modules[signature](*args) File "D:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\torch\fx\graph_module.py", line 678, in call_wrapped return self._wrapped_call(self, *args, **kwargs) File "D:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\torch\fx\graph_module.py", line 284, in __call__ raise e File "D:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\torch\fx\graph_module.py", line 274, in __call__ return super(self.cls, obj).__call__(*args, **kwargs) # type: ignore[misc] File "D:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "D:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl return forward_call(*args, **kwargs) File "<eval_with_key>.3", line 5, in forward fused_0 = self.fused_0(arg2_1, arg1_1, arg0_1); arg2_1 = arg1_1 = arg0_1 = None File "D:\StableDiffusion\stable-diffusion-webui\scripts\openvino_accelerate.py", line 240, in __call__ result = openvino_execute(self.gm, *args, executor_parameters=self.executor_parameters, partition_id=self.partition_id, file_name=self.file_name) File "D:\StableDiffusion\stable-diffusion-webui\scripts\openvino_accelerate.py", line 284, in openvino_execute compiled = openvino_compile(gm, *args, model_hash_str=model_hash_str, file_name=file_name) File "D:\StableDiffusion\stable-diffusion-webui\scripts\openvino_accelerate.py", line 449, in openvino_compile compiled = core.compile_model(om, device) File "D:\StableDiffusion\stable-diffusion-webui\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:116: [ GENERAL_ERROR ] [CL ext] Can not allocate nullptr for USM type.
It's because there's not enough memory left. https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/OpenVINO-cannot-run-on-gpu-device-stable-diffusion-Script/m-p/1551331
Is there an existing issue for this?
What happened?
I'd like to use Animatediff extention: https://github.com/continue-revolution/sd-webui-animatediff
But when I press "Generate", an error is thrown after the picture is generated:
*** Error running postprocess: D:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts\animatediff.py Traceback (most recent call last): File "D:\StableDiffusion\stable-diffusion-webui\modules\scripts.py", line 651, in postprocess script.postprocess(p, processed, *script_args) File "D:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts\animatediff.py", line 77, in postprocess self.prompt_scheduler.save_infotext_txt(res) AttributeError: 'NoneType' object has no attribute 'save_infotext_txt'
Steps to reproduce the problem
What should have happened?
A video should be generated
Sysinfo
sysinfo-2023-10-21-21-54.txt
What browsers do you use to access the UI ?
Mozilla Firefox
Console logs
Additional information
No response