portu-sim / comfyui_bmab

BMAB for ComfyUI
GNU Affero General Public License v3.0
90 stars 7 forks source link

BMAB Openpose Hand Detailer 사용시 해당 에러가 표시됩니다. #15

Closed Neytiri7 closed 5 months ago

Neytiri7 commented 5 months ago

Error occurred when executing BMAB Openpose Hand Detailer:

'NoneType' object has no attribute 'get_providers'

File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_bmab\bmab\nodes\detailers.py", line 742, in process result, bbox_result = self.process_image(bind, bgimg, squeeze, img2img) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_bmab\bmab\nodes\detailers.py", line 696, in process_image bgimg, bounding_box, cbx = self.process_person(bind, bgimg, bounding_box, person, person_hand, squeeze, img2img) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_bmab\bmab\nodes\detailers.py", line 632, in process_person posed = self.process_openpose(resized) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_bmab\bmab\nodes\detailers.py", line 605, in process_openpose out = self.get_pose(tensor) ^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_bmab\bmab\nodes\detailers.py", line 586, in get_pose model = dwpose.DwposeDetector.from_pretrained( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\controlnet_aux\dwpose__init__.py", line 173, in from_pretrained t = Wholebody(det_model_path, None, torchscript_device=torchscript_device) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\controlnet_aux\dwpose\wholebody.py", line 41, in init print(f"Failed to load onnxruntime with {self.det.get_providers()}.\nPlease change EP_list in the config.yaml and restart ComfyUI") ^^^^^^^^^^^^^^^^^^^^^^

Neytiri7 commented 5 months ago

메시지가 바뀌었네요~

!!! Exception during processing!!! name '_C' is not defined Traceback (most recent call last): File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_bmab\bmab\nodes\detailers.py", line 742, in process result, bbox_result = self.process_image(bind, bgimg, squeeze, img2img) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_bmab\bmab\nodes\detailers.py", line 680, in process_image boxes, logits, phrases = grdino.dino_predict(bgimg, text_prompt, 0.35, 0.25) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_bmab\bmab\utils\grdino.py", line 38, in dino_predict boxes, logits, phrases = predict( ^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\groundingdino\util\inference.py", line 68, in predict outputs = model(image[None], captions=[caption]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl return forward_call(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\groundingdino\models\GroundingDINO\groundingdino.py", line 327, in forward hs, reference, hs_enc, ref_enc, init_box_proposal = self.transformer( ^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\groundingdino\models\GroundingDINO\transformer.py", line 258, in forward memory, memory_text = self.encoder( ^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl return self._call_impl(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl return forward_call(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\groundingdino\models\GroundingDINO\transformer.py", line 576, in forward output = checkpoint.checkpoint( ^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\torch_compile.py", line 24, in inner return torch._dynamo.disable(fn, recursive)(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\torch_dynamo\eval_frame.py", line 328, in _fn return fn(args, kwargs) ^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\torch_dynamo\external_utils.py", line 17, in inner return fn(*args, kwargs) ^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\torch\utils\checkpoint.py", line 451, in checkpoint return CheckpointFunction.apply(function, preserve, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\torch\autograd\function.py", line 539, in apply return super().apply(args, kwargs) # type: ignore[misc] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\torch\utils\checkpoint.py", line 230, in forward outputs = run_function(args) ^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl return self._call_impl(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\groundingdino\models\GroundingDINO\transformer.py", line 785, in forward src2 = self.self_attn( ^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl return self._call_impl(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\groundingdino\models\GroundingDINO\ms_deform_attn.py", line 338, in forward output = MultiScaleDeformableAttnFunction.apply( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\torch\autograd\function.py", line 539, in apply return super().apply(args, **kwargs) # type: ignore[misc] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\groundingdino\models\GroundingDINO\ms_deform_attn.py", line 53, in forward output = _C.ms_deform_attn_forward( ^^ NameError: name '_C' is not defined

portu-sim commented 5 months ago

GroundingDINO가 정상 설치 되지 않아서 발생하는 문제입니다.

Neytiri7 commented 5 months ago

2.3.0+cu121 맞춰서 업데이트 해서, 그라디오도 다시 설치 했는데... 아래 오류가 뜹니다.

Neytiri7 commented 5 months ago

initialize grounding dino. final text_encoder_type: bert-base-uncased Person 1 Hand 1 box in box result True (802, 784, 1134, 982) (344, 95, 1440, 1279) model_path is A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_controlnet_aux\ckpts\yzd-v/DWPose\yolox_l.onnx model_path is A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_controlnet_aux\ckpts\yzd-v/DWPose\dw-ll_ucoco_384.onnx

DWPose: Using yolox_l.onnx for bbox detection and dw-ll_ucoco_384.onnx for pose estimation DWPose: Caching ONNXRuntime session yolox_l.onnx... 2024-05-25 04:11:38.4408034 [E:onnxruntime:Default, provider_bridge_ort.cc:1548 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1209 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

EP Error EP Error D:\a_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:857 onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasnt able to be loaded. Please install the correct version of CUDA andcuDNN as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported. when using ['CUDAExecutionProvider', 'CPUExecutionProvider'] Falling back to ['CUDAExecutionProvider', 'CPUExecutionProvider'] and retrying.


2024-05-25 04:11:38.5257521 [E:onnxruntime:Default, provider_bridge_ort.cc:1548 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1209 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

!!! Exception during processing!!! 'NoneType' object has no attribute 'get_providers' Traceback (most recent call last): File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 419, in init self._create_inference_session(providers, provider_options, disabled_optimizers) File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 483, in _create_inference_session sess.initialize_session(providers, provider_options, disabled_optimizers) RuntimeError: D:\a_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:857 onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasnt able to be loaded. Please install the correct version of CUDA andcuDNN as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\controlnet_aux\dwpose\wholebody.py", line 39, in init self.det = ort.InferenceSession(det_model_path, providers=ort_providers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 432, in init raise fallback_error from e File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 427, in init self._create_inference_session(self._fallback_providers, None) File "A:\SynologyDrive\ComfyUI-webui\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 483, in _create_inference_session sess.initialize_session(providers, provider_options, disabled_optimizers) RuntimeError: D:\a_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:857 onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasnt able to be loaded. Please install the correct version of CUDA andcuDNN as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_bmab\bmab\nodes\detailers.py", line 742, in process result, bbox_result = self.process_image(bind, bgimg, squeeze, img2img) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_bmab\bmab\nodes\detailers.py", line 696, in process_image bgimg, bounding_box, cbx = self.process_person(bind, bgimg, bounding_box, person, person_hand, squeeze, img2img) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_bmab\bmab\nodes\detailers.py", line 632, in process_person posed = self.process_openpose(resized) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_bmab\bmab\nodes\detailers.py", line 605, in process_openpose out = self.get_pose(tensor) ^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_bmab\bmab\nodes\detailers.py", line 586, in get_pose model = dwpose.DwposeDetector.from_pretrained( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\controlnet_aux\dwpose__init__.py", line 173, in from_pretrained t = Wholebody(det_model_path, None, torchscript_device=torchscript_device) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\controlnet_aux\dwpose\wholebody.py", line 41, in init print(f"Failed to load onnxruntime with {self.det.get_providers()}.\nPlease change EP_list in the config.yaml and restart ComfyUI") ^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'get_providers'

portu-sim commented 5 months ago

DW Pose 에서 onnx를 사용하는데, CUDA_PATH가 없다고 나오는 것입니다. GPU가 nvidia가 아니면 사용할 수 없고, nvidia라면 CUDA 12.1을 재설치 해보시기 바랍니다.

Neytiri7 commented 5 months ago

재설치 했더니, 정상으로 동작합니다. 고맙습니다.