Maximofn commited on
Commit
4fdc33b
·
verified ·
1 Parent(s): d471315

Update app.py

Browse files

Add GPU debug prints

Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -68,6 +68,9 @@ def save_video(video_frames, fps=25):
68
  @spaces.GPU()
69
  def generate_video_pipeline(pipeline, prompt, negative_prompt, num_frames, height, width, num_inference_steps):
70
  """Generate video using the pipeline"""
 
 
 
71
  # Move to appropriate device
72
  print("Moving to device")
73
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
 
68
  @spaces.GPU()
69
  def generate_video_pipeline(pipeline, prompt, negative_prompt, num_frames, height, width, num_inference_steps):
70
  """Generate video using the pipeline"""
71
+ print(f"Is CUDA available: {torch.cuda.is_available()}")
72
+ print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
73
+
74
  # Move to appropriate device
75
  print("Moving to device")
76
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")