quangnhat commited on
Commit
e8a0463
·
1 Parent(s): 3de6666
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -32,12 +32,18 @@ def generate_video(prompt):
32
  print("Starting video generation...")
33
  start_time = time.time()
34
 
35
- # Generate video
36
  output = pipe(prompt)
37
 
38
- # Save the generated video
 
 
 
 
 
 
39
  output_path = "generated_video.mp4"
40
- output.save_to_file(output_path)
41
 
42
  end_time = time.time()
43
  print(f"Video saved to {output_path} in {end_time - start_time:.2f} seconds")
 
32
  print("Starting video generation...")
33
  start_time = time.time()
34
 
35
+ # Generate video output
36
  output = pipe(prompt)
37
 
38
+ # Debug: Print the output object to check its attributes
39
+ print("Output:", output)
40
+
41
+ # Assuming the output is a video tensor
42
+ video_tensor = output['video'] # Adjust according to the correct output keys
43
+
44
+ # Save the generated video file
45
  output_path = "generated_video.mp4"
46
+ video_tensor.save(output_path) # Replace with correct save method if necessary
47
 
48
  end_time = time.time()
49
  print(f"Video saved to {output_path} in {end_time - start_time:.2f} seconds")