Comfy-Org / Comfy-Org/ComfyUI

convolution_overrideable not implemented when executing VAEEncode

Open
#4,208 5 comments 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Expected Behavior

Use Inpaint Preprocessor with Load Checkpoint (Realistic Vision V5.1 Inpainting) and ControlNet Model (control_v11p_sd15_inpaint) to inpaint a masked area of a loaded image based on a text prompt.
Screenshot 2024-08-04 at 23 24 15

### Actual Behavior

Whenever the process reaches VAE Encode node, the error message emerges.
Screenshot 2024-08-04 at 23 24 26

### Steps to Reproduce

1. Launch ComfyUI on MacBook Air M3.
2. Select Realistic Vision model v5.1 model in the Load Checkpoint node.
3. Select ControlNet inpaint model in the Load ControlNet Model node.
4. Load an image and create a mask in MaskEditor.
5. Queue prompt.

### Debug Logs

```powershell
"!!! Exception during processing!!! convolution_overrideable not implemented. You are likely triggering this with tensor backend other than CPU/CUDA/MKLDNN, if this is intended, please use TORCH_LIBRARY_IMPL to override this function
Traceback (most recent call last):
File "/Users/yegorartyukh/ComfyUI/execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yegorartyukh/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 "/Users/yegorartyukh/ComfyUI/execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yegorartyukh/ComfyUI/nodes.py", line 296, in encode
t = vae.encode(pixels[:,:,:,:3])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yegorartyukh/ComfyUI/comfy/sd.py", line 346, in encode
samples[x:x+batch_number] = self.first_stage_model.encode(pixels_in).to(self.output_device).float()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yegorartyukh/ComfyUI/comfy/ldm/models/autoencoder.py", line 179, in encode
z = self.encoder(x)
^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yegorartyukh/ComfyUI/comfy/ldm/modules/diffusionmodules/model.py", line 520, in forward
h = self.conv_in(x)
^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yegorartyukh/ComfyUI/comfy/ops.py", line 93, in forward
return super().forward(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/torch/nn/modules/conv.py", line 549, in forward
return self._conv_forward(input, self.weight, self.bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/torch/nn/modules/conv.py", line 544, in _conv_forward
return F.conv2d(
^^^^^^^^^
NotImplementedError: convolution_overrideable not implemented. You are likely triggering this with tensor backend other than CPU/CUDA/MKLDNN, if this is intended, please use TORCH_LIBRARY_IMPL to override this function"
```

### Other

I was trying different solutions:
1. Python versions 3.10, 3.11, 3.12.
2. Different PyTorch versions.
3. Setting a device explicitly to mps and/or CPU in the main script.

MacBook Air M3 2024, 16GB, macOS Sonoma 14.3, Python 3.11, PyTorch 2.5 Preview (Nightly).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.