Spaces:
Running
Running
track and log execution time
Browse files
app_df.py
CHANGED
@@ -43,6 +43,8 @@ def generate_diffusion_forced_video(
|
|
43 |
teacache_thresh=0.2,
|
44 |
use_ret_steps=True,
|
45 |
):
|
|
|
|
|
46 |
model_id = download_model(model_id)
|
47 |
|
48 |
if resolution == "540P":
|
@@ -129,6 +131,11 @@ def generate_diffusion_forced_video(
|
|
129 |
timestamp = time.strftime("%Y%m%d_%H%M%S")
|
130 |
output_path = f"gradio_df_videos/{prompt[:50].replace('/', '')}_{seed}_{timestamp}.mp4"
|
131 |
imageio.mimwrite(output_path, video_frames, fps=fps, quality=8, output_params=["-loglevel", "error"])
|
|
|
|
|
|
|
|
|
|
|
132 |
return output_path
|
133 |
|
134 |
|
|
|
43 |
teacache_thresh=0.2,
|
44 |
use_ret_steps=True,
|
45 |
):
|
46 |
+
|
47 |
+
start_time = time.perf_counter()
|
48 |
model_id = download_model(model_id)
|
49 |
|
50 |
if resolution == "540P":
|
|
|
131 |
timestamp = time.strftime("%Y%m%d_%H%M%S")
|
132 |
output_path = f"gradio_df_videos/{prompt[:50].replace('/', '')}_{seed}_{timestamp}.mp4"
|
133 |
imageio.mimwrite(output_path, video_frames, fps=fps, quality=8, output_params=["-loglevel", "error"])
|
134 |
+
|
135 |
+
end_time = time.perf_counter()
|
136 |
+
elapsed = end_time - start_time
|
137 |
+
print(f"[LOG] Execution time: {elapsed:.4f} seconds")
|
138 |
+
|
139 |
return output_path
|
140 |
|
141 |
|