Spaces:
Sleeping
Sleeping
Freddy Boulton
commited on
Commit
·
ec1a89f
1
Parent(s):
374f68b
Code
Browse files
app.py
CHANGED
@@ -34,6 +34,7 @@ from tqdm import tqdm
|
|
34 |
import imageio
|
35 |
import av
|
36 |
import uuid
|
|
|
37 |
|
38 |
from pipeline import CausalInferencePipeline
|
39 |
from demo_utils.constant import ZERO_VAE_CACHE
|
@@ -293,6 +294,7 @@ def video_generation_handler_streaming(prompt, seed=42, fps=15):
|
|
293 |
# Generation loop
|
294 |
for idx, current_num_frames in enumerate(all_num_frames):
|
295 |
print(f"📦 Processing block {idx+1}/{num_blocks}")
|
|
|
296 |
|
297 |
noisy_input = noise[:, current_start_frame : current_start_frame + current_num_frames]
|
298 |
|
@@ -390,7 +392,8 @@ def video_generation_handler_streaming(prompt, seed=42, fps=15):
|
|
390 |
|
391 |
# Calculate final progress for this block
|
392 |
total_progress = (idx + 1) / num_blocks * 100
|
393 |
-
|
|
|
394 |
# Yield the actual video chunk
|
395 |
yield ts_path, gr.update()
|
396 |
|
|
|
34 |
import imageio
|
35 |
import av
|
36 |
import uuid
|
37 |
+
import time
|
38 |
|
39 |
from pipeline import CausalInferencePipeline
|
40 |
from demo_utils.constant import ZERO_VAE_CACHE
|
|
|
294 |
# Generation loop
|
295 |
for idx, current_num_frames in enumerate(all_num_frames):
|
296 |
print(f"📦 Processing block {idx+1}/{num_blocks}")
|
297 |
+
start = time.monotonic()
|
298 |
|
299 |
noisy_input = noise[:, current_start_frame : current_start_frame + current_num_frames]
|
300 |
|
|
|
392 |
|
393 |
# Calculate final progress for this block
|
394 |
total_progress = (idx + 1) / num_blocks * 100
|
395 |
+
frame_time = time.monotonic() - start
|
396 |
+
print(f"🔍 DEBUG Block {idx} frame time: {frame_time:.2f}s")
|
397 |
# Yield the actual video chunk
|
398 |
yield ts_path, gr.update()
|
399 |
|