Spaces:
Paused
Paused
Update inference/flovd_demo.py
Browse files- inference/flovd_demo.py +3 -0
inference/flovd_demo.py
CHANGED
@@ -396,6 +396,7 @@ def generate_video(
|
|
396 |
"""
|
397 |
# Inference time
|
398 |
"""
|
|
|
399 |
image = rearrange((torch.tensor(np.array(image)).to(torch.float) / 255. * 2. - 1.).unsqueeze(0), 'b h w c -> b c h w')
|
400 |
image = image.to(local_rank)
|
401 |
prompt_short = prompt[:30].strip().replace(" ", "_")
|
@@ -452,7 +453,9 @@ def generate_video(
|
|
452 |
).frames[0]
|
453 |
|
454 |
# Save Result
|
|
|
455 |
save_path = os.path.join(output_video_path, f"{prompt_short}_{cam_name}.mp4")
|
|
|
456 |
export_to_video(video_generate, save_path, fps=fps)
|
457 |
|
458 |
|
|
|
396 |
"""
|
397 |
# Inference time
|
398 |
"""
|
399 |
+
print("Inference time from image to video.")
|
400 |
image = rearrange((torch.tensor(np.array(image)).to(torch.float) / 255. * 2. - 1.).unsqueeze(0), 'b h w c -> b c h w')
|
401 |
image = image.to(local_rank)
|
402 |
prompt_short = prompt[:30].strip().replace(" ", "_")
|
|
|
453 |
).frames[0]
|
454 |
|
455 |
# Save Result
|
456 |
+
print("video content : ", video_generate)
|
457 |
save_path = os.path.join(output_video_path, f"{prompt_short}_{cam_name}.mp4")
|
458 |
+
print("video generated successfully")
|
459 |
export_to_video(video_generate, save_path, fps=fps)
|
460 |
|
461 |
|