Skip to content

Commit 072982c

Browse files
committed
added timing
1 parent 0577d3e commit 072982c

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

src/maxdiffusion/configs/ltx_video.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pipeline_type: multi-scale
2424
prompt: "A woman with light skin, wearing a blue jacket and a black hat with a veil, looks down and to her right, then back up as she speaks; she has brown hair styled in an updo, light brown eyebrows, and is wearing a white collared shirt under her jacket; the camera remains stationary on her face as she speaks; the background is out of focus, but shows trees and people in period clothing; the scene is captured in real-life footage."
2525
height: 512
2626
width: 512
27-
num_frames: 344 #344
27+
num_frames: 88 #344
2828
flow_shift: 5.0
2929
fps: 24
3030
downscale_factor: 0.6666666

src/maxdiffusion/generate_ltx_video.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import os
1313
import torch
14+
import time
1415
from pathlib import Path
1516

1617

@@ -93,6 +94,7 @@ def run(config):
9394
pipeline = LTXVideoPipeline.from_pretrained(config, enhance_prompt=enhance_prompt)
9495
if config.pipeline_type == "multi-scale":
9596
pipeline = LTXMultiScalePipeline(pipeline)
97+
s0 = time.perf_counter()
9698
images = pipeline(
9799
height=height_padded,
98100
width=width_padded,
@@ -102,6 +104,19 @@ def run(config):
102104
config=config,
103105
enhance_prompt = False
104106
)
107+
print("compile time: ", (time.perf_counter() - s0))
108+
s0 = time.perf_counter()
109+
images = pipeline(
110+
height=height_padded,
111+
width=width_padded,
112+
num_frames=num_frames_padded,
113+
is_video=True,
114+
output_type="pt",
115+
config=config,
116+
enhance_prompt = False
117+
)
118+
print("generation time: ", (time.perf_counter() - s0))
119+
105120
(pad_left, pad_right, pad_top, pad_bottom) = padding
106121
pad_bottom = -pad_bottom
107122
pad_right = -pad_right

src/maxdiffusion/pipelines/ltx_video/ltx_video_pipeline.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,6 @@ def __call__(
561561
skip_block_list: Optional[Union[List[List[int]], List[int]]] = None,
562562
**kwargs,
563563
):
564-
import pdb; pdb.set_trace()
565564
prompt = self.config.prompt
566565
is_video = kwargs.get("is_video", False)
567566
if prompt is not None and isinstance(prompt, str):

0 commit comments

Comments
 (0)