Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -364,15 +364,12 @@ def generate_video(prompt, negative_prompt, height, width, num_frames, guidance_
|
|
364 |
num_frames=num_frames,
|
365 |
guidance_scale=float(guidance_scale),
|
366 |
num_inference_steps=steps
|
367 |
-
).frames
|
368 |
-
|
369 |
-
if not output_frames_list or not output_frames_list[0]:
|
370 |
-
raise gr.Error("Model returned empty frames. Check parameters or try a different prompt.")
|
371 |
-
output_frames = output_frames_list[0]
|
372 |
|
373 |
with tempfile.NamedTemporaryFile(suffix=".mp4", delete=False) as tmpfile:
|
374 |
video_path = tmpfile.name
|
375 |
-
|
|
|
376 |
logger.info(f"Video successfully generated and saved to {video_path}")
|
377 |
return video_path
|
378 |
|
|
|
364 |
num_frames=num_frames,
|
365 |
guidance_scale=float(guidance_scale),
|
366 |
num_inference_steps=steps
|
367 |
+
).frames[0]
|
|
|
|
|
|
|
|
|
368 |
|
369 |
with tempfile.NamedTemporaryFile(suffix=".mp4", delete=False) as tmpfile:
|
370 |
video_path = tmpfile.name
|
371 |
+
|
372 |
+
export_to_video(output_frames_list, video_path, fps=fps)
|
373 |
logger.info(f"Video successfully generated and saved to {video_path}")
|
374 |
return video_path
|
375 |
|