Comfy-Org / Comfy-Org/ComfyUI

NotImplementedError

Open
#6,041 0 comments 1 reaction 0 assignees View on GitHub
MacOS
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

Description

### Expected Behavior

Runtime error

### Actual Behavior

Runtime error
The operator 'aten::grid_sampler_3d' is not currently implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this feature, please comment on https://github.com/pytorch/pytorch/issues/77764. As a temporary fix, you can set the environment variable `PYTORCH_ENABLE_MPS_FALLBACK=1` to use the CPU as a fallback for this op. WARNING: this will be slower than running natively on MPS.

### Steps to Reproduce

Runtime error

### Debug Logs

```powershell
!!! Exception during processing !!! The operator 'aten::grid_sampler_3d' is not currently implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this feature, please comment on https://github.com/pytorch/pytorch/issues/77764. As a temporary fix, you can set the environment variable `PYTORCH_ENABLE_MPS_FALLBACK=1` to use the CPU as a fallback for this op. WARNING: this will be slower than running natively on MPS.
Traceback (most recent call last):
File "/Users/renjixiang/Desktop/ComfyUI/execution.py", line 324, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "/Users/renjixiang/Desktop/ComfyUI/execution.py", line 199, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "/Users/renjixiang/Desktop/ComfyUI/execution.py", line 170, in _map_node_over_list
process_inputs(input_dict, i)
File "/Users/renjixiang/Desktop/ComfyUI/execution.py", line 159, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "/Users/renjixiang/Desktop/ComfyUI/custom_nodes/ComfyUI-AdvancedLivePortrait/nodes.py", line 947, in run
crop_out = pipeline.warp_decode(psi.f_s_user, psi.x_s_user, x_d_new)
File "/Users/renjixiang/Desktop/ComfyUI/custom_nodes/ComfyUI-AdvancedLivePortrait/LivePortrait/live_portrait_wrapper.py", line 130, in warp_decode
ret_dct = self.warping_module(feature_3d, kp_source=kp_source, kp_driving=kp_driving)
File "/Users/renjixiang/Desktop/ComfyUI/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/Users/renjixiang/Desktop/ComfyUI/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/renjixiang/Desktop/ComfyUI/custom_nodes/ComfyUI-AdvancedLivePortrait/LivePortrait/modules/warping_network.py", line 52, in forward
dense_motion = self.dense_motion_network(
File "/Users/renjixiang/Desktop/ComfyUI/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/Users/renjixiang/Desktop/ComfyUI/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/renjixiang/Desktop/ComfyUI/custom_nodes/ComfyUI-AdvancedLivePortrait/LivePortrait/modules/dense_motion.py", line 78, in forward
deformed_feature = self.create_deformed_feature(feature, sparse_motion) # (bs, 1+num_kp, c=4, d=16, h=64, w=64)
File "/Users/renjixiang/Desktop/ComfyUI/custom_nodes/ComfyUI-AdvancedLivePortrait/LivePortrait/modules/dense_motion.py", line 50, in create_deformed_feature
sparse_deformed = F.grid_sample(feature_repeat, sparse_motions, align_corners=False)
File "/Users/renjixiang/Desktop/ComfyUI/venv/lib/python3.10/site-packages/torch/nn/functional.py", line 4910, in grid_sample
return torch.grid_sampler(input, grid, mode_enum, padding_mode_enum, align_corners)
NotImplementedError: The operator 'aten::grid_sampler_3d' is not currently implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this feature, please comment on https://github.com/pytorch/pytorch/issues/77764. As a temporary fix, you can set the environment variable `PYTORCH_ENABLE_MPS_FALLBACK=1` to use the CPU as a fallback for this op. WARNING: this will be slower than running natively on MPS.
```

### Other

_No response_

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.