Spaces:
Running on Zero
Running on Zero
Download gpu_runtime.py from jejunepixels/chat-visualiser: direct link, hf CLI and curl.
- Browser
- Download file 302 Bytes
-
https://huggingface.co/spaces/jejunepixels/chat-visualiser/resolve/main/gpu_runtime.py
- Command line
-
hf download hf://spaces/jejunepixels/chat-visualiser/gpu_runtime.py
-
curl -L -o gpu_runtime.py https://huggingface.co/spaces/jejunepixels/chat-visualiser/resolve/main/gpu_runtime.py
302 Bytes
| """ZeroGPU setup must precede model and CUDA imports.""" | |
| import spaces | |
| import os | |
| import multiprocessing | |
| ZERO_GPU = os.environ.get("SPACES_ZERO_GPU", "").lower() in ("1", "true") | |
| _MANAGER = multiprocessing.get_context("fork").Manager() if ZERO_GPU else None | |
| def manager(): | |
| return _MANAGER | |