- Wan 2.1
- Wan 2.2
- Video LoRA
- musubi-tuner
- diffusion-pipe
- Motion LoRA
- Dataset prep
Train a Wan LoRA With Video Clips
How to prepare video clips for a Wan 2.1 or 2.2 LoRA: clip length, 16 fps, 4N+1 frame buckets, trimming, motion captions and I2V vs T2V dataset rules.
Should You Train a Wan LoRA on Videos or Still Images?
Wan 2.1 and Wan 2.2 learn from video latents, and a still image is simply a clip that is one frame long. That is why a character or style LoRA can be trained from photos alone, as our image-only Wan and HunyuanVideo guide explains. This article picks up where that one stops: what to do when the thing you want the LoRA to learn only exists across time.
Motion, timing and camera behaviour cannot be carried by a single frame. A signature dance, a particular walk, a slow dolly-in, a liquid splash or a hair flip all need several consecutive frames so the model can see how pixels move. If your goal is one of those, clips are not optional. If your goal is a face, an outfit or a look, clips add cost without adding much, and a good still set is the better starting point.
There is one hard rule on top of that choice. diffusion-pipe documents that Wan i2v training must use a dataset of only videos, because the first frame of each clip becomes the image condition and the model learns to predict the rest. An I2V LoRA trained on stills has nothing to predict.
| LoRA goal | Recommended data | Why |
|---|---|---|
| Character identity (T2V) | Still images first, a few clips optional | Appearance is learned from single frames; stills are cheaper to collect and caption |
| Specific motion or action | Short clips of that motion | Movement only exists across consecutive frames |
| Camera move or shot style | Clips that share the camera behaviour | Pans, orbits and push-ins are temporal patterns |
| Visual effect (smoke, melt, glitch) | Clips of the effect unfolding | The effect is defined by how it changes over time |
| Any I2V LoRA | Videos only | The first frame is the condition; the rest is the training target |
| Art or photo style | Mostly stills, clips if the style includes motion | Color, texture and lighting are visible in one frame |
How Long Should Each Clip Be, and What Frame Buckets Work?
Frame counts matter more than seconds. musubi-tuner states that for HunyuanVideo and Wan 2.1 every value in target_frames must be N times 4 plus 1, such as 1, 25 or 45, and other values are truncated to the nearest valid count. The same 4N+1 pattern shows up in diffusion-pipe, whose example frame_buckets are 1 and 33, with 1, 33, 65 and 97 suggested only if you have more than 24GB of VRAM, several GPUs or a lower spatial resolution.
Frame rate decides how many seconds those frames cover. musubi-tuner extracts every frame without resampling and recommends 16 fps footage for Wan 2.1 and 24 fps for HunyuanVideo; if you set source_fps (written as a decimal such as 30.0), it skips frames automatically to reach the model rate. The Wan 2.2 TI2V-5B model is the exception in the family: its README describes it as a 720P model at 24 fps, while the 14B models keep the 16 fps convention used by the trainers.
In practice that makes 2 to 5 seconds the useful clip length for 14B Wan models: long enough to hold one complete action, short enough to fit a frame bucket of 33 to 81 frames. Longer source videos are not wasted, but they should be cut into several shorter clips rather than fed in whole.
| Frames (4N+1) | Seconds at 16 fps (Wan 2.1, Wan 2.2 14B) | Seconds at 24 fps (TI2V-5B, HunyuanVideo) | Typical use |
|---|---|---|---|
| 1 | Single frame | Single frame | Still images in the same run |
| 17 | About 1.1 | About 0.7 | Very short gestures, low VRAM tests |
| 33 | About 2.1 | About 1.4 | diffusion-pipe example bucket; one step or gesture |
| 49 | About 3.1 | About 2.0 | A full walk cycle, a turn, a short camera move |
| 65 | About 4.1 | About 2.7 | Longer actions; needs more VRAM |
| 81 | About 5.1 | About 3.4 | Full 5 second Wan 14B clip length; highest VRAM cost |
Short clips can vanish
How Do You Extract and Trim Clips Without Near-Duplicate Frames?
Good clips are cut, not just downloaded. Each clip should contain one continuous shot and, ideally, one complete action from start to finish. A hard scene cut inside a training clip teaches the model that your subject can teleport, and a clip that stops halfway through a gesture teaches a motion that never resolves.
musubi-tuner gives you several ways to pull frames from each file through frame_extraction. Its docs recommend full when each video is a single complete motion, and the other modes when a video contains repeated actions such as a looped dance. Two practical notes from the same docs: always set max_frames with full to avoid out-of-memory errors, and do not put 1 in target_frames when using chunk, because that extracts every frame as an image.
Near-duplicates are the video version of training on the same photo ten times. Twenty clips cut from one long take of the same person in the same room will overfit the room. Spread clips across scenes, lighting and framings the same way you would vary a still set, using the variety rules in our character LoRA shot list.
- head: takes the first N frames of each video; simple and predictable for pre-trimmed clips.
- chunk: splits a video into back-to-back pieces of N frames; good for long repeated actions.
- slide: takes N frames every frame_stride frames; more samples from one video, with overlap.
- uniform: takes frame_sample evenly spaced windows of N frames across the video.
- full: uses the whole clip trimmed to a 4N+1 count and to max_frames; best for one complete motion per file.
How Should You Caption Motion in a Video LoRA Dataset?
Every clip gets a text file with the same base name, for example walk_01.mp4 and walk_01.txt, in both musubi-tuner and diffusion-pipe. diffusion-pipe warns but still trains with an empty caption when a file is missing, so a quick count of videos against captions before caching saves a wasted run.
Wan reads natural-language sentences through its umT5 text encoder, so write captions as short scene descriptions, not tag lists. The difference from still captions is that a clip caption must describe what happens over time: the action, its direction and speed, and what the camera does. For first drafts, the models in our auto-captioner comparison can help, but check every caption against the actual clip.
The usual captioning rule still applies: leave out the fixed traits you want the LoRA to own, and describe everything you want to stay promptable. If you are training a motion LoRA, give the motion a consistent name or trigger phrase across clips so you can call it at inference, as covered in the captioning guide.
| Element | Still image caption | Video clip caption |
|---|---|---|
| Subject | A woman in a red coat | A woman in a red coat |
| Action | Standing on a city sidewalk | Walks toward the camera, then turns left at the corner |
| Timing | Not applicable | Slow, relaxed pace |
| Camera | Medium shot, eye level | Handheld medium shot that tracks backward with her |
| Scene and light | Overcast street, soft light | Overcast street, soft light, passing cars in the background |
Do I2V and T2V Wan LoRAs Need Different Datasets?
Yes. A T2V LoRA learns to generate the whole clip from text, so it can mix stills and videos, and stills are fine for appearance. An I2V LoRA learns how to continue a given first frame, so every sample must be a video, and the first frame of each clip matters: diffusion-pipe uses the beginning of the clip by default (video_clip_mode single_beginning), with single_middle as the alternative that trims the start and end equally. Make sure the opening frame is clean, sharp and representative of the starting images you will use at inference.
Wan 2.2 adds another layer. Its 14B models split denoising between a high-noise expert and a low-noise expert. musubi-tuner can train a LoRA for both at once, switching at a timestep_boundary that defaults to 0.9 for I2V and 0.875 for T2V, or train one expert with recommended timestep ranges. It also notes that Wan 2.2 I2V does not need the CLIP model that Wan 2.1 I2V training requires, and that Wan 2.2 support covers the 14B models only.
Clip datasets are heavier than still sets. Learning rate and rank choices behave much as they do for image LoRAs, so start from the values in our learning rate guide and judge checkpoints on generated clips, where flicker and drift show up over time.
How Do You Mix Stills and Clips in musubi-tuner?
musubi-tuner accepts several datasets in one TOML file, so the common pattern is two entries: an image dataset with image_directory for appearance, and a video dataset with video_directory, target_frames and frame_extraction for motion. Give each dataset its own cache_directory, keep resolution and bucketing in the general block (the documented example is 960 by 544 with enable_bucket on), and use num_repeats to balance a small clip set against a larger image set.
Before training, cache latents with the --debug_mode video option, which musubi-tuner provides to show exactly which frames will be trained. It is the fastest way to catch a wrong source_fps, a clip that was truncated to fewer frames than you expected, or a bucket that crops away the action.
If you only have one reference image of your character, build the still half of the dataset first with a one-image dataset workflow, then add clips only for the motion you need. For how many stills to aim for, see how many images to train a LoRA.
- 01
Decide what the clips must teach
Write down the motion, camera move or effect; if it is only appearance, use stills instead. - 02
Convert and cut
Convert footage to 16 fps for Wan 14B models, then cut it into single-shot clips of about 2 to 5 seconds with one complete action each. - 03
Remove near-duplicates
Drop clips from the same take that look alike and spread the rest across scenes, framing and light. - 04
Caption the action
Write one sentence-style caption per clip covering action, pace and camera, leaving out traits the LoRA should own. - 05
Set 4N+1 frame buckets
Choose target_frames or frame_buckets such as 1, 33 and 49 that your VRAM can handle and that your shortest clip can fill. - 06
Preview, then train
Run latent caching with debug_mode video, fix any wrong frames, then train and compare checkpoints on generated clips.
Frequently asked questions
Can I train a Wan LoRA on videos and images together?
Yes for T2V. musubi-tuner and diffusion-pipe both accept images and videos in one run, with images trained as 1-frame samples. Use images for appearance and clips for motion. I2V training in diffusion-pipe requires videos only.
What fps should video clips be for Wan LoRA training?
musubi-tuner recommends 16 fps for Wan 2.1, and the Wan 2.2 14B models follow the same 16 fps convention. You can also set source_fps so frames are skipped automatically. The Wan 2.2 TI2V-5B model is a 24 fps model.
Why do frame counts like 33, 49 or 81 keep coming up?
Wan and HunyuanVideo trainers require frame counts of 4N+1, because the video VAE compresses time in steps of four frames plus the first frame. musubi-tuner truncates other values to the nearest valid count.
How many clips do I need for a motion LoRA?
There is no official number. Community practice is a small set of varied, well-trimmed clips rather than many near-identical ones; variety across scenes, subjects and framing matters more than raw clip count. Start small, check generated clips, and add footage where the motion fails.
Why was one of my clips skipped during training?
In diffusion-pipe a video is assigned to the longest frame bucket it can fill and is never placed in the 1-frame image bucket, so a clip shorter than your smallest video bucket is dropped. Also check that every clip has a matching caption and is not in WebP format.