Spaces:
Paused
Paused
Commit
·
c599f41
1
Parent(s):
13e4fa4
Add @spaces.GPU decorator to load_model function
Browse filesFixes CUDA initialization error in main process on HF Spaces
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
app.py
CHANGED
|
@@ -14,6 +14,7 @@ pipe = None
|
|
| 14 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 15 |
|
| 16 |
|
|
|
|
| 17 |
def load_model(model_path):
|
| 18 |
"""Load the CogVideoX-Interpolation model"""
|
| 19 |
global pipe
|
|
|
|
| 14 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 15 |
|
| 16 |
|
| 17 |
+
@spaces.GPU
|
| 18 |
def load_model(model_path):
|
| 19 |
"""Load the CogVideoX-Interpolation model"""
|
| 20 |
global pipe
|