Video¶

Real AnimateDiff-Lightning output (4 steps, SD1.5 base) — "a robot arm picking up a red cube".
Text to video with LTX, Wan, CogVideoX, HunyuanVideo, Mochi, and more. Output
frames are exported to .mp4 automatically (imageio fallback, gif last resort).
from strands_diffusers import use_diffusers
use_diffusers(
action="run",
pipeline="LTXPipeline",
model="Lightricks/LTX-Video",
parameters={"prompt": "a robot arm moving a cube", "num_frames": 81},
fps=16,
)
# -> artifacts: ['/tmp/strands_diffusers/video_*.mp4']
The serializer normalizes whatever shape the pipeline returns - list[PIL],
[T, H, W, C], [T, C, H, W], or batched [B, T, H, W, C] - into a clean mp4.
Image to video¶
use_diffusers(
action="run",
pipeline="WanImageToVideoPipeline",
model="Wan-AI/Wan2.1-I2V-14B",
parameters={"image": "first_frame.png", "prompt": "camera pans right",
"num_frames": 81},
fps=16,
)