MAC STUDIO M1MAX Torch not compiled with CUDA enabled
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 155
Description
### Your question
MAC STUDIO M1MAX run CogVideoX-5b-1.5 with ComfyUI,
Use python3 main.py --force-fp16 --use-split-cross-attentio --cpu to start ComfyUI.
But always throw exception -- AssertionError: Torch not compiled with CUDA enabled.
I was use CPU to run is model ,
and check pip3 install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpu to reinstall torch with Mac . it is not work.
if you has this bug , and you fixed it ,please tell me how to fix this bug.
### Logs
```powershell
!!! Exception during processing !!! Torch not compiled with CUDA enabled
Traceback (most recent call last):
File "/Users/qinyi/Downloads/ComfyUI-0.3.10/execution.py", line 328, 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/qinyi/Downloads/ComfyUI-0.3.10/execution.py", line 203, 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/qinyi/Downloads/ComfyUI-0.3.10/execution.py", line 174, in _map_node_over_list
process_inputs(input_dict, i)
File "/Users/qinyi/Downloads/ComfyUI-0.3.10/execution.py", line 163, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "/Users/qinyi/Downloads/ComfyUI-0.3.10/custom_nodes/ComfyUI-CogVideoXWrapper/nodes.py", line 722, in process
latents = model["pipe"](
File "/Users/qinyi/Downloads/ComfyUI-0.3.10/.venv/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/Users/qinyi/Downloads/ComfyUI-0.3.10/custom_nodes/ComfyUI-CogVideoXWrapper/pipeline_cogvideox.py", line 778, in __call__
noise_pred = self.transformer(
File "/Users/qinyi/Downloads/ComfyUI-0.3.10/.venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/Users/qinyi/Downloads/ComfyUI-0.3.10/.venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/qinyi/Downloads/ComfyUI-0.3.10/.venv/lib/python3.9/site-packages/accelerate/hooks.py", line 170, in new_forward
output = module._old_forward(*args, **kwargs)
File "/Users/qinyi/Downloads/ComfyUI-0.3.10/custom_nodes/ComfyUI-CogVideoXWrapper/custom_cogvideox_transformer_3d.py", line 569, in forward
emb = self.time_embedding(t_emb, timestep_cond)
File "/Users/qinyi/Downloads/ComfyUI-0.3.10/.venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/Users/qinyi/Downloads/ComfyUI-0.3.10/.venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/qinyi/Downloads/ComfyUI-0.3.10/.venv/lib/python3.9/site-packages/diffusers/models/embeddings.py", line 1304, in forward
sample = self.linear_1(sample)
File "/Users/qinyi/Downloads/ComfyUI-0.3.10/.venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/Users/qinyi/Downloads/ComfyUI-0.3.10/.venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/qinyi/Downloads/ComfyUI-0.3.10/.venv/lib/python3.9/site-packages/accelerate/hooks.py", line 165, in new_forward
args, kwargs = module._hf_hook.pre_forward(module, *args, **kwargs)
File "/Users/qinyi/Downloads/ComfyUI-0.3.10/.venv/lib/python3.9/site-packages/accelerate/hooks.py", line 355, in pre_forward
set_module_tensor_to_device(
File "/Users/qinyi/Downloads/ComfyUI-0.3.10/.venv/lib/python3.9/site-packages/accelerate/utils/modeling.py", line 329, in set_module_tensor_to_device
new_value = value.to(device)
File "/Users/qinyi/Downloads/ComfyUI-0.3.10/.venv/lib/python3.9/site-packages/torch/cuda/__init__.py", line 310, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
```
### Other
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.