flowtyone / ComfyUI-Flowty-CRM

This is a custom node that lets you use Convolutional Reconstruction Models right from ComfyUI.
Other
128 stars 7 forks source link

No operator found for `memory_efficient_attention_forward` #19

Closed shodty closed 3 months ago

shodty commented 3 months ago

I get the following error when trying to run either the CUDA or non-CUDA workflows. I'm on Windows 11, ComfyUI Portable. Was able to get your TripoSR build running, but no dice so far on this one.

Error occurred when executing CRMPoseSampler:

No operator found for `memory_efficient_attention_forward` with inputs:
query : shape=(1, 1024, 1, 512) (torch.float32)
key : shape=(1, 1024, 1, 512) (torch.float32)
value : shape=(1, 1024, 1, 512) (torch.float32)
attn_bias :
p : 0.0
`decoderF` is not supported because:
max(query.shape[-1] != value.shape[-1]) > 128
xFormers wasn't build with CUDA support
attn_bias type is
operator wasn't built - see `python -m xformers.info` for more info
`flshattF@0.0.0` is not supported because:
max(query.shape[-1] != value.shape[-1]) > 256
xFormers wasn't build with CUDA support
dtype=torch.float32 (supported: {torch.float16, torch.bfloat16})
operator wasn't built - see `python -m xformers.info` for more info
`tritonflashattF` is not supported because:
max(query.shape[-1] != value.shape[-1]) > 128
xFormers wasn't build with CUDA support
dtype=torch.float32 (supported: {torch.float16, torch.bfloat16})
operator wasn't built - see `python -m xformers.info` for more info
triton is not available
`cutlassF` is not supported because:
xFormers wasn't build with CUDA support
operator wasn't built - see `python -m xformers.info` for more info
`smallkF` is not supported because:
max(query.shape[-1] != value.shape[-1]) > 32
xFormers wasn't build with CUDA support
operator wasn't built - see `python -m xformers.info` for more info
unsupported embed per head: 512

File "I:\_AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "I:\_AI\ComfyUI_windows_portable\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 "I:\_AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "I:\_AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Flowty-CRM\__init__.py", line 102, in sample
stage1_images = self.initialized_poser.i2i(
File "I:\_AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Flowty-CRM\crmlib\libs\sample.py", line 137, in i2i
model.encode_first_stage(ip[None, :, :, :])
File "I:\_AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Flowty-CRM\crmlib\imagedream\ldm\interface.py", line 200, in encode_first_stage
return self.vae_model.encode(x)
File "I:\_AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Flowty-CRM\crmlib\imagedream\ldm\models\autoencoder.py", line 83, in encode
h = self.encoder(x)
File "I:\_AI\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "I:\_AI\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "I:\_AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Flowty-CRM\crmlib\imagedream\ldm\modules\diffusionmodules\model.py", line 573, in forward
h = self.mid.attn_1(h)
File "I:\_AI\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "I:\_AI\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "I:\_AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Flowty-CRM\crmlib\imagedream\ldm\modules\diffusionmodules\model.py", line 241, in forward
out = xformers.ops.memory_efficient_attention(
File "I:\_AI\ComfyUI_windows_portable\python_embeded\lib\site-packages\xformers\ops\fmha\__init__.py", line 223, in memory_efficient_attention
return _memory_efficient_attention(
File "I:\_AI\ComfyUI_windows_portable\python_embeded\lib\site-packages\xformers\ops\fmha\__init__.py", line 321, in _memory_efficient_attention
return _memory_efficient_attention_forward(
File "I:\_AI\ComfyUI_windows_portable\python_embeded\lib\site-packages\xformers\ops\fmha\__init__.py", line 337, in _memory_efficient_attention_forward
op = _dispatch_fw(inp, False)
File "I:\_AI\ComfyUI_windows_portable\python_embeded\lib\site-packages\xformers\ops\fmha\dispatch.py", line 120, in _dispatch_fw
return _run_priority_list(
File "I:\_AI\ComfyUI_windows_portable\python_embeded\lib\site-packages\xformers\ops\fmha\dispatch.py", line 63, in _run_priority_list
raise NotImplementedError(msg)
flowtyone commented 3 months ago

Hi, you can try to run comfyui with --cpu to disable cuda entirely, then the non-cuda workflow should run, also from this error looks like you have issues with your xformers install, try to remove it

shodty commented 3 months ago

Thank you, I deleted all xformers folders out of ~\ComfyUI_windows_portable\python_embeded\Lib\site-packages (I had two xformers folders in there, xformers and xformers-0.0.23.post1+cu118) and it solved my problem. Appreciate it!