STARFlow-V Image Encode (Official I2V)
Turning your first frame into STARFlow-V's start signal
- vae
- image
- first_frame_latent
The display name says it all: "STARFlow-V Image Encode (Official I2V)". This is the node that turns image-to-video from a promise into a graph - you give it a starting image and it produces the first_frame_latent that tells the sampler where the video begins. It's the exact path the pack's own starflow_v_i2v.json example uses, and it's the most specialized node in the suite, because it has to talk to a Wan2.2 VAE in a very specific way.
Why it's not just a VAEEncode
A plain VAE encode would give you a latent, sure, but STARFlow-V needs more than that. The model is causal - the first frame anchors everything after it, and the sampler builds its KV caches from that anchor. STARFlowVImageEncode does the STARFlow-faithful version: it resizes and center-crops your image to the target canvas, then runs the Wan2.2 TI2V VAE's posterior sampling on it - mu + exp(0.5 * logvar) * noise - instead of a deterministic encode. That stochasticity matters; Apple's reference pipeline does exactly this, and the node is careful to reproduce it (including chunking the temporal encoding, because the Wan2.2 encoder is stateful across frames).
It's also strict about what VAE you give it. The node checks vae.latent_dim == 3 and that it's not marked as image-only, and throws a TypeError otherwise. Feed it a normal SD VAE and it will refuse, loudly.
The inputs
vae- must be a video VAE: a Wan2.2 TI2V VAE from the coreVAELoader. Non-negotiable, and the check happens up front.image- your starting frame, as anIMAGE.width/height- the output canvas, both defaulting to848×480and stepping in multiples of 16. Your image gets resized + center-cropped to match.seed- seeds the posterior sampling noise. Same seed = same encode = more reproducible videos.
Output is first_frame_latent, a single-frame (B, C, 1, H, W) LATENT that plugs into STARFlowVSampler's first_frame_latent input.
Installation
Shared pack install (one per pack, not per node):
cd ComfyUI/custom_nodes
git clone https://github.com/RyukoMatoiFan/ComfyUI-STARFlow
pip install -r ComfyUI-STARFlow/requirements.txt
# restart ComfyUI
You'll also need the Wan2.2 TI2V VAE file in ComfyUI/models/vae/ for the VAELoader to offer it.
Gotchas
The sampler will accept a first_frame_latent from anywhere - it doesn't verify provenance - but the node warns you if you resize it after the fact. If your source image's aspect ratio doesn't match the canvas, the sampler handles the crop/resample itself and prints a "use STARFlow-V Image Encode for best quality" warning. The fix is to let this node do the cropping at encode time with your final width/height set, which is what it's designed for. Also: I2V requires cfg > 0 in the sampler, or it raises. Keep the default 3.5 and you're fine.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| vae | VAE | — | |
| image | IMAGE | — | |
| width | INT | 84816–2048 | — |
| height | INT | 48016–2048 | — |
| seed | INT | 00–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| first_frame_latent | LATENT | — |