Spaces:
Configuration error
Configuration error
Download wrapper_for_mps/__init__.py from JasonSmithSO/FooocusEnhanced: direct link, hf CLI and curl.
- Browser
- Download file 239 Bytes
-
https://huggingface.co/spaces/JasonSmithSO/FooocusEnhanced/resolve/main/wrapper_for_mps/__init__.py
- Command line
-
hf download hf://spaces/JasonSmithSO/FooocusEnhanced/wrapper_for_mps/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/JasonSmithSO/FooocusEnhanced/resolve/main/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() |