AhmadMustafa Claude commited on
Commit
c599f41
·
1 Parent(s): 13e4fa4

Add @spaces.GPU decorator to load_model function

Browse files

Fixes 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>

Files changed (1) hide show
  1. app.py +1 -0
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