Video generation
The video command makes a video clip with its sound from a text prompt, using a video generation model. It writes the clip to disk and exits: there is no server and no HTTP route for it.
What you need
- One CUDA GPU, datacenter Hopper or datacenter Blackwell, with the memory the clip needs free (see the table below).
- A folder on the host for the output, mounted writable.
Models
| Model | Hugging Face repo | Download | Default clip | GPU memory |
|---|---|---|---|---|
| MiniMax H3 | MiniMaxAI/MiniMax-H3 |
144 GB | 1344x768, 5 s | 50 GB |
| LTX-2.5 | Lightricks/LTX-2.5 |
71 GB | 768x512, 5 s | 40 GB |
--model takes the model’s Hugging Face repo id. The command downloads what it reads into the Hugging Face cache on the first run and loads it from there afterwards, so mount the cache from the host. A local folder of the same layout works too.
A gated repo needs its license accepted on Hugging Face and a login on the host (hf auth login) before the first run. Each model’s license sets its own terms of use.
The GPU memory column is what the default clip needs; a larger or longer clip needs more. Before it downloads or loads anything, the command checks the request and works out what the clip needs, then reserves that much of the GPU for the whole run. A clip that does not fit beside whatever else runs on the GPU is refused at once, with what it needs and what is free.
MiniMax H3
- Size: both sides multiples of 32.
- Length: 1 to 14 seconds.
- Steps: 8 by default;
--stepstakes any count. - Pictures: a clip can start on a picture, end on one, or both.
LTX-2.5
- The repo is gated.
- Size: both sides multiples of 32. From 1536x1024 pixels, a clip is made in two stages and both sides are multiples of 64, so full HD is
1920x1088. - Detail: a clip with a side past 2048 pixels is detailed. A 5-second 4K clip takes about six minutes and 69 GB of GPU memory on an H100 NVL.
- Length: up to 600 seconds, as far as the GPU memory holds.
- Steps: a fixed schedule of 8, and 3 more at full size for a two-stage clip.
- Pictures: a clip can start on a picture, end on one, or both, at every size.
Make a clip
mkdir -p /data/clips
docker run --rm --gpus all \ -v ~/.cache/huggingface:/root/.cache/huggingface \ -v /data/clips:/out \ layerscale/layerscale:latest \ --model MiniMaxAI/MiniMax-H3 \ video --out /out/fox \ --prompt "A red fox trots through fresh snow at dawn"This writes /data/clips/fox.mp4, H.264 video with AAC sound, at the model’s default size and length. --out is a path inside the container without an extension, so it must sit under a writable mount.
Options
| Option | Default | Meaning |
|---|---|---|
--prompt <TEXT> |
required | What the clip shows. Describe the sound in the prompt too. |
--out <STEM> |
required | Output path without an extension. |
--format mp4|y4m |
mp4 |
mp4 writes <STEM>.mp4. y4m writes the uncompressed frames as <STEM>.y4m and the sound as <STEM>.wav instead. |
--size <WxH> |
the model’s | Frame size, width by height. |
--seconds <S> |
the model’s | Clip length. |
--steps <N> |
the model’s | Denoising steps. |
--seed <N> |
0 |
The same seed, prompt and options give the same clip. |
--first <PICTURE> |
none | A picture the clip starts on, PNG or JPEG. |
--last <PICTURE> |
none | A picture the clip ends on. |
A longer clip
Fourteen seconds at 1344x768, with a fixed seed:
docker run --rm --gpus all \ -v ~/.cache/huggingface:/root/.cache/huggingface \ -v /data/clips:/out \ layerscale/layerscale:latest \ --model MiniMaxAI/MiniMax-H3 \ video --out /out/fox-14s \ --size 1344x768 --seconds 14 --seed 7 \ --prompt "A red fox trots through fresh snow at dawn"A larger clip
Some models make a large clip in two stages: the whole clip at half the width and height first, then a second pass that refines it at full size. The command picks this from --size alone; the model’s section above gives the size it starts at. A full HD clip:
docker run --rm --gpus all \ -v ~/.cache/huggingface:/root/.cache/huggingface \ -v /data/clips:/out \ layerscale/layerscale:latest \ --model Lightricks/LTX-2.5 \ video --out /out/fox-hd \ --size 1920x1088 --seconds 5 \ --prompt "A red fox trots through fresh snow at dawn, its paws crunching in the snow"A 4K clip
Some models detail a large clip: past the side their section gives, the second stage draws the detail at the clip’s own size, with the first stage’s clip beside it as a reference, so the picture is sharp at full zoom where a refined enlargement is soft. The command picks this from --size alone. 4K is 3840x2176:
docker run --rm --gpus all \ -v ~/.cache/huggingface:/root/.cache/huggingface \ -v /data/clips:/out \ layerscale/layerscale:latest \ --model Lightricks/LTX-2.5 \ video --out /out/fox-4k \ --size 3840x2176 --seconds 5 \ --prompt "A red fox trots through fresh snow at dawn, its paws crunching in the snow"A detailed clip takes longer than a two-stage clip and needs more GPU memory.
A clip from a picture
--first gives the picture the clip starts on and --last the picture it ends on; give one or both, and the prompt says what happens. Pictures are PNG or JPEG files. A picture of another size or shape is not refused: it is scaled to cover the clip and cropped at the centre. The sound comes from the prompt, as in a clip without a picture.
Mount the picture’s folder and give its path inside the container:
docker run --rm --gpus all \ -v ~/.cache/huggingface:/root/.cache/huggingface \ -v /data/clips:/out \ -v /data/pictures:/in \ layerscale/layerscale:latest \ --model Lightricks/LTX-2.5 \ video --out /out/fox-start \ --first /in/fox.jpg \ --prompt "A red fox trots through fresh snow at dawn, its paws crunching in the snow"Add --last /in/fox-end.jpg to end the clip on a second picture.
Progress
The command logs a JSON line as each stage starts (video_stage: encode, denoise, decode, write), one a denoising step (video_step, with step and steps; a two-stage clip counts both stages’ steps together), then a video_complete line with the frame count and the time taken. A clip that fails ends with a video_failed line that says why.
Limits
The command does not take a clip as input yet (no video-to-video), reference conditioning is not served, and there is no negative prompt.