AhmadMustafa Claude commited on
Commit
d720b81
·
1 Parent(s): d3080a2

Fix CUDA generator error by moving pipeline to GPU

Browse files

Add pipe.to("cuda") inside GPU-decorated function to ensure
pipeline is on CUDA before using CUDA generator

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -54,7 +54,10 @@ def generate_interpolation(
54
  f"Parameters: frames={num_frames}, steps={num_inference_steps}, guidance={guidance_scale}"
55
  )
56
 
57
- # Generate video - ZeroGPU handles device placement automatically
 
 
 
58
  generator = torch.Generator(device="cuda").manual_seed(seed)
59
 
60
  video = pipe(
 
54
  f"Parameters: frames={num_frames}, steps={num_inference_steps}, guidance={guidance_scale}"
55
  )
56
 
57
+ # Move pipeline to CUDA within the GPU-decorated function
58
+ pipe.to("cuda")
59
+
60
+ # Generate video
61
  generator = torch.Generator(device="cuda").manual_seed(seed)
62
 
63
  video = pipe(