PainterFLF2V
Pin the first and last frame, let the middle move
- positive
- negative
- vae
- clip_vision_start_image
- clip_vision_end_image
- start_image
- end_image
- positive
- negative
- latent
First-frame/last-frame (FLF) generation is the workhorse trick of local video: you hand the model a start frame and an end frame and it invents the motion between them. It's how people build loops, match cuts, and shots where the ending has to land somewhere specific. PainterFLF2V is a compact conditioning-and-latent builder for exactly that job - one node that takes your start/end images plus your prompt, and produces the positive/negative conditioning and latent you feed straight into a sampler.
What it is
A prep node in the conditioning/video_models category. It doesn't sample anything; it packages everything a video sampler needs for an FLF2V pass into three clean outputs: positive, negative, and latent. Drop it between your CLIP encode and your KSampler and the whole "build empty latent, anchor start frame, anchor end frame" dance collapses into one node.
How it works
The node takes your prompt conditioning (positive/negative), a vae, your target width/height/length, and - the important part - a start_image and end_image. It encodes those frames into the latent and positions them at the beginning and end of the timeline, then writes the motion setting into the conditioning. motion_amplitude (default 1.0, range 1–2, stepped 0.05) is the dial for how much the model is allowed to move between your anchors; crank it toward 2 and the middle gets adventurous, keep it near 1 and the shot stays conservative.
There's also a pair of optional clip_vision_start_image / clip_vision_end_image inputs - if your workflow is already running CLIP Vision on the anchors, feed the outputs here rather than re-passing raw images.
The inputs that matter
- start_image / end_image - your two anchors. No anchors, no FLF; the node degrades to a plain empty-latent builder.
- length - frame count, default 81 (the classic Wan-ish
4n+1length), stepped by 4. - motion_amplitude - how much the model moves between the frames.
- positive / negative - wire through from your text encoder as usual.
Outputs: positive and negative conditioning into the sampler's conditioning ports, latent into its latent port.
Install
It's one of ~forty nodes in the PainterNodes pack, so you're installing the pack. ComfyUI Manager: search "PainterNodes", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/princepainter/ComfyUI-PainterNodes
cd ComfyUI-PainterNodes
pip install -r requirements.txt
Dependencies are trivial (soundfile, numpy); the actual video model - typically Wan 2.2 or a Bernini-style build - is loaded separately.
Common issues
- FLF not doing anything - if you see motion ignore your anchors, check that the images actually connect and that
lengthis within the model's trained range. A too-long timeline lets the model drift back to its default motion habits. - Frames not matching the model's VAE - keep
lengthon the step (4) so you land on valid frame counts; the node snaps sensibly, but wildly off values are the usual cause of "latent shape" errors. - Wired to a model that has no FLF support - Bernini famously has no first/last-frame conditioning. This node is for Wan-family and other FLF-capable models; if your output ignores the end frame, you're feeding the wrong backend.
The author's README is Chinese-first and updates fast, but the node itself is straightforward: pin the ends, set how wild the middle gets, sample. For anyone chaining loops or landing shots, it's the node that makes the two ends agree.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| vae | VAE | — | |
| width | INT | 83216–4096 | — |
| height | INT | 48016–4096 | — |
| length | INT | 811–4096 | — |
| batch_size | INT | 11–4096 | — |
| motion_amplitude | FLOAT | 1.001–2 | — |
| clip_vision_start_imageopt | CLIP_VISION_OUTPUT | — | |
| clip_vision_end_imageopt | CLIP_VISION_OUTPUT | — | |
| start_imageopt | IMAGE | — | |
| end_imageopt | IMAGE | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| latent | LATENT | — |