Spaces:
aiqtech
/
Paused

multimodalart HF Staff Claude Opus 4.6 commited on
Commit
d3bb466
·
1 Parent(s): 5907c41

Make _get_device() ZeroGPU-aware so models target CUDA

Browse files

On ZeroGPU Spaces torch.cuda.is_available() returns False at
module-load time because the GPU is only attached inside @spaces.GPU.
Check spaces.config.Config.zero_gpu as a fallback so all models are
placed on CUDA and work correctly once the GPU is attached.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

1 file changed +15 -2
webui.py+15-2