chflame163 / ComfyUI_LayerStyle

A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.
MIT License
1.46k stars 81 forks source link

Intel Arc770 下运行 ComfyUI 报错:Native API failed. Native API returns: -30 (PI_ERROR_INVALID_VALUE) -30 (PI_ERROR_INVALID_VALUE) #209

Open changhr2013 opened 2 months ago

changhr2013 commented 2 months ago

你好,在使用 Intel Arc770 GPU 运行 ComfyUI 时,使用此插件的节点都会报错,因此想问问看是否有办法能够解决此问题,我将同样的问题报告给了 ComfyUI 那边。

关联:https://github.com/comfyanonymous/ComfyUI/pull/4210

在上面这个 PR 合并之前,会报 Unsupport FP64,合并之后报下面的错误。

另外我尝试切换 device 为 cpu 也会报告同样的问题。

目前在 LayerMask: SegmentAnythingUltra V2 节点执行时出现的错误信息如下:

Error occurred when executing LayerMask: SegmentAnythingUltra V2:

Native API failed. Native API returns: -30 (PI_ERROR_INVALID_VALUE) -30 (PI_ERROR_INVALID_VALUE)

File "C:\Users\chang\stablediffusion\comfyui\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chang\stablediffusion\comfyui\ComfyUI\execution.py", line 82, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chang\stablediffusion\comfyui\ComfyUI\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chang\stablediffusion\comfyui\ComfyUI\custom_nodes\ComfyUI_LayerStyle\py\segment_anything_ultra_v2.py", line 73, in segment_anything_ultra_v2
boxes = groundingdino_predict(DINO_MODEL, _image, prompt, threshold)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chang\stablediffusion\comfyui\ComfyUI\custom_nodes\ComfyUI_LayerStyle\py\segment_anything_func.py", line 174, in groundingdino_predict
boxes_filt = get_grounding_output(
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chang\stablediffusion\comfyui\ComfyUI\custom_nodes\ComfyUI_LayerStyle\py\segment_anything_func.py", line 162, in get_grounding_output
outputs = model(image[None], captions=[caption])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\miniconda3\envs\py311\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\miniconda3\envs\py311\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chang\stablediffusion\comfyui\ComfyUI\custom_nodes\ComfyUI_LayerStyle\py\local_groundingdino\models\GroundingDINO\groundingdino.py", line 303, in forward
hs, reference, hs_enc, ref_enc, init_box_proposal = self.transformer(
^^^^^^^^^^^^^^^^^
File "C:\ProgramData\miniconda3\envs\py311\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\miniconda3\envs\py311\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chang\stablediffusion\comfyui\ComfyUI\custom_nodes\ComfyUI_LayerStyle\py\local_groundingdino\models\GroundingDINO\transformer.py", line 258, in forward
memory, memory_text = self.encoder(
^^^^^^^^^^^^^
File "C:\ProgramData\miniconda3\envs\py311\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\miniconda3\envs\py311\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chang\stablediffusion\comfyui\ComfyUI\custom_nodes\ComfyUI_LayerStyle\py\local_groundingdino\models\GroundingDINO\transformer.py", line 576, in forward
output = checkpoint.checkpoint(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\miniconda3\envs\py311\Lib\site-packages\torch\_compile.py", line 24, in inner
return torch._dynamo.disable(fn, recursive)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\miniconda3\envs\py311\Lib\site-packages\torch\_dynamo\eval_frame.py", line 328, in _fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\miniconda3\envs\py311\Lib\site-packages\torch\_dynamo\external_utils.py", line 17, in inner
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\miniconda3\envs\py311\Lib\site-packages\torch\utils\checkpoint.py", line 451, in checkpoint
return CheckpointFunction.apply(function, preserve, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\miniconda3\envs\py311\Lib\site-packages\torch\autograd\function.py", line 539, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\miniconda3\envs\py311\Lib\site-packages\torch\utils\checkpoint.py", line 230, in forward
outputs = run_function(*args)
^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\miniconda3\envs\py311\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\miniconda3\envs\py311\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chang\stablediffusion\comfyui\ComfyUI\custom_nodes\ComfyUI_LayerStyle\py\local_groundingdino\models\GroundingDINO\transformer.py", line 785, in forward
src2 = self.self_attn(
^^^^^^^^^^^^^^^
File "C:\ProgramData\miniconda3\envs\py311\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\miniconda3\envs\py311\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chang\stablediffusion\comfyui\ComfyUI\custom_nodes\ComfyUI_LayerStyle\py\local_groundingdino\models\GroundingDINO\ms_deform_attn.py", line 271, in forward
output = multi_scale_deformable_attn_pytorch(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chang\stablediffusion\comfyui\ComfyUI\custom_nodes\ComfyUI_LayerStyle\py\local_groundingdino\models\GroundingDINO\ms_deform_attn.py", line 59, in multi_scale_deformable_attn_pytorch
sampling_value_l_ = F.grid_sample(
^^^^^^^^^^^^^^
File "C:\ProgramData\miniconda3\envs\py311\Lib\site-packages\torch\nn\functional.py", line 4304, in grid_sample
return torch.grid_sampler(input, grid, mode_enum, padding_mode_enum, align_corners)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
chflame163 commented 2 months ago

节点未在非CUDA设备上测试