Skip to content

Commit acc90ee

Browse files
committed
ltx2 pipeline
1 parent 9779222 commit acc90ee

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

src/maxdiffusion/tests/ltx2_pipeline_test.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,5 +172,38 @@ def test_pipeline_call(self):
172172
# Let's inspect output shape in actual running test
173173
print(f"Output shape: {output.shape}")
174174

175+
def test_pipeline_call_i2v(self):
176+
pipeline = LTX2Pipeline(
177+
tokenizer=self.tokenizer,
178+
text_encoder=self.text_encoder,
179+
text_encoder_connector=self.text_encoder_connector,
180+
transformer=self.transformer,
181+
vae=self.vae,
182+
scheduler=self.scheduler,
183+
scheduler_state=self.scheduler_state,
184+
devices_array=self.devices_array,
185+
mesh=self.mesh,
186+
config=self.config
187+
)
188+
189+
# Create dummy image
190+
batch = 1
191+
height = 32
192+
width = 32
193+
# Image shape: (B, H, W, C)
194+
image = np.random.rand(batch, height, width, 3).astype(np.float32)
195+
196+
output = pipeline(
197+
prompt="A cat dancing",
198+
image=image,
199+
height=32,
200+
width=32,
201+
num_frames=9,
202+
num_inference_steps=1,
203+
num_videos_per_prompt=1
204+
)
205+
self.assertIsNotNone(output)
206+
print(f"I2V Output shape: {output.shape}")
207+
175208
if __name__ == '__main__':
176209
unittest.main()

0 commit comments

Comments
 (0)