Download src/wrapper_for_mps/__init__.py from windy123321/comfyui_controlnet_aux: direct link, hf CLI and curl.
- Browser
- Download file 239 Bytes
-
https://huggingface.co/windy123321/comfyui_controlnet_aux/resolve/main/src/wrapper_for_mps/__init__.py
- Command line
-
hf download hf://windy123321/comfyui_controlnet_aux/src/wrapper_for_mps/__init__.py
-
curl -L -o __init__.py https://huggingface.co/windy123321/comfyui_controlnet_aux/resolve/main/src/wrapper_for_mps/__init__.py
239 Bytes
| import torch | |
| from comfy.model_management import get_torch_device | |
| device = get_torch_device() | |
| #https://github.com/microsoft/DirectML/issues/414#issuecomment-1541319479 | |
| def sparse_to_dense(sparse_tensor): | |
| return sparse_tensor.to_dense() |