lllyasviel / ControlNet

Let us control diffusion models!
Apache License 2.0
29.75k stars 2.69k forks source link

Issue with openpose #432

Open AnaMancera opened 1 year ago

AnaMancera commented 1 year ago

Hi, I'm having an issue using openpose in controlNet, other models work well but that one throws an error whenever I try to load any of the openpose annotators

2023-06-07 19:29:51,330 - ControlNet - INFO - Loading model: control_v11p_sd15_openpose [cab727d4] 2023-06-07 19:29:52,033 - ControlNet - INFO - Loaded state_dict from [C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\models\control_v11p_sd15_openpose.pth] 2023-06-07 19:29:52,034 - ControlNet - INFO - Loading config: C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\models\control_v11p_sd15_openpose.yaml 2023-06-07 19:29:55,878 - ControlNet - INFO - ControlNet model control_v11p_sd15_openpose [cab727d4] loaded. 2023-06-07 19:29:56,034 - ControlNet - INFO - Loading preprocessor: openpose_full 2023-06-07 19:29:56,035 - ControlNet - INFO - preprocessor resolution = 512 Error running process: C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py Traceback (most recent call last): File "C:\Users\flow workstation 2\stable-diffusion-webui\modules\scripts.py", line 451, in process script.process(p, *script_args) File "C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 786, in process detected_map, is_image = preprocessor(input_image, res=preprocessor_resolution, thr_a=unit.threshold_a, thr_b=unit.threshold_b) File "C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\utils.py", line 76, in decorated_func return cached_func(*args, **kwargs) File "C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\utils.py", line 64, in cached_func return func(*args, **kwargs) File "C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\global_state.py", line 35, in unified_preprocessor return preprocessor_modules[preprocessor_name](*args, **kwargs) File "C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\processor.py", line 251, in run_model return remove_pad(self.model_openpose( File "C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\openpose\__init__.py", line 324, in __call__ poses = self.detect_poses(oriImg, include_hand, include_face) File "C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\openpose\__init__.py", line 268, in detect_poses self.load_model() File "C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\openpose\__init__.py", line 203, in load_model self.hand_estimation = Hand(hand_modelpath) File "C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\openpose\hand.py", line 21, in __init__ model_dict = util.transfer(self.model, torch.load(model_path)) File "C:\Users\flow workstation 2\stable-diffusion-webui\modules\safe.py", line 107, in load return load_with_extra(filename, *args, extra_handler=global_extra_handler, **kwargs) File "C:\Users\flow workstation 2\stable-diffusion-webui\modules\safe.py", line 152, in load_with_extra return unsafe_torch_load(filename, *args, **kwargs) File "C:\Users\flow workstation 2\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 795, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "C:\Users\flow workstation 2\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 1020, in _legacy_load typed_storage._storage._set_from_file( RuntimeError: unexpected EOF, expected 15718 more bytes. The file might be corrupted.

Any idea what I cando to correct the issue?

Thanks in advance

jvp18ob commented 1 year ago

Damn ive got the same issue. Im working with Nvidia and its werid there is still no fix for this. Ive redownloaded the PTH and YAML file. but still does not work

preprocessor: depth_midas, model: control_v11f1p_sd15_depth [cfd03158], weight: 1, starting/ending: (0, 1), resize mode: Resize and Fill, pixel perfect: True, control mode: My prompt is more important, preprocessor params: (512, 64, 64) 2023-08-26 11:13:02,505 - ControlNet - INFO - Preview Resolution = 512 Traceback (most recent call last): File "C:\Stable Diffusion\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 414, in run_predict output = await app.get_blocks().process_api( File "C:\Stable Diffusion\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1323, in process_api result = await self.call_function( File "C:\Stable Diffusion\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1051, in call_function prediction = await anyio.to_thread.run_sync( File "C:\Stable Diffusion\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Stable Diffusion\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "C:\Stable Diffusion\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, args) File "C:\Stable Diffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet_ui\controlnet_ui_group.py", line 629, in run_annotator result, is_image = preprocessor( File "C:\Stable Diffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\utils.py", line 79, in decorated_func return cached_func(args, kwargs) File "C:\Stable Diffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\utils.py", line 67, in cached_func return func(*args, *kwargs) File "C:\Stable Diffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\global_state.py", line 35, in unified_preprocessor return preprocessor_modules[preprocessor_name](args, kwargs) File "C:\Stable Diffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\processor.py", line 252, in run_model return remove_pad(self.model_openpose( File "C:\Stable Diffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\openpose__init.py", line 352, in call poses = self.detect_poses(oriImg, include_hand, include_face) File "C:\Stable Diffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\openpose__init.py", line 272, in detect_poses self.load_model() File "C:\Stable Diffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\openpose\init__.py", line 193, in load_model self.face_estimation = Face(face_modelpath) File "C:\Stable Diffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\openpose\face.py", line 325, in init__ self.model.load_state_dict(torch.load(face_model_path)) File "C:\Stable Diffusion\stable-diffusion-webui\modules\safe.py", line 107, in load return load_with_extra(filename, *args, extra_handler=global_extra_handler, *kwargs) File "C:\Stable Diffusion\stable-diffusion-webui\modules\safe.py", line 152, in load_with_extra return unsafe_torch_load(filename, args, kwargs) File "C:\Stable Diffusion\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 815, in load return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args) File "C:\Stable Diffusion\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 1051, in _legacy_load typed_storage._untyped_storage._set_from_file( RuntimeError: unexpected EOF, expected 213786 more bytes. The file might be corrupted.