When you connect reference_image to ComfyUI’s WanVaceToVideo, the node uses its first image, encodes it, and prepends it to the latent sequence. The node’s trim_latent output reports the number of latent frames added; without a reference image, the documented output is 0. This is additional conditioning, not a replacement for control_video. Record the sequence length and trim value so you can check downstream alignment rather than assuming the resulting sequence is ready to join an existing one.
Decide what to record and when
The node documentation gives the control-sequence latent length as ((length - 1) // 4) + 1. For length=81, that calculation is ((81 - 1) // 4) + 1 = 21 latent frames. This is a formula-based estimate for the length-derived sequence, not a claim about the node’s observed output after you connect a reference image. The documentation says the reference adds latent frames, but does not specify a separate formula for the total resulting length. Read the actual trim_latent output in your workflow.
Use this sequence when an extra reference image is needed:
- Set
lengthfor the control-video sequence you intend to generate, and calculate its documented latent frame count. Record both values. - Connect
reference_imageonly when you want its first image used as additional conditioning. Keepcontrol_videoconnected if it is also part of your intended control; the reference input does not stand in for it. - Read the node’s
trim_latentoutput and record the value shown. Do not substitute the example calculation for this node output. - Before decoding, joining, or otherwise aligning sequences downstream, check what sequence interval those operations expect and whether the added latent frames need to be accounted for. Treat alignment as an acceptance check, not an automatic guarantee.
For node connections, follow the actual input and output type labels. A node’s color can be a visual clue, but it is not a substitute for checking the displayed type.
Keep a sequence ledger
This is a hypothetical planning example, not a node run. Suppose a creator sets length=81, connects a control video, and also connects a reference image. The length formula yields 21 latent frames for the length-derived sequence. The example does not predict the trim_latent value: the creator must read it from the node. The ledger keeps the calculation distinct from that reported output and gives the next reviewer an alignment question to resolve.
| Checkpoint | Hypothetical record or observation | Decision |
|---|---|---|
| Requested sequence | length=81 | Compare against the intended control-video interval |
| Formula calculation | 21 latent frames | Record as the length-derived count, not as measured output |
| Reference input | Connected; intended first image noted | Confirm that this is additional conditioning, not a substitute control video |
| Node output | Actual trim_latent value not assumed | Record the displayed output before downstream processing |
| Before decode or join | Target interval and expected sequence alignment not yet verified | Pause and inspect the downstream node’s input requirements |
Limits and what to do if alignment fails
The documentation defines the reference-image behavior and trim_latent output, but it does not guarantee how every downstream decode, concatenation, or custom workflow should use that value. Nor does it provide a universal total-length formula for the prepended result. If a join or decode produces a mismatch, first compare the recorded length, formula-derived count, actual trim_latent, and downstream input expectations. Then inspect the relevant node documentation and revise the workflow’s alignment handling; do not infer that a plausible-looking output proves frame correspondence.
WanVaceToVideo also documents control-video truncation or neutral-gray padding to length, and mask truncation or padding. Those behaviors concern the control sequence and do not establish that a reference image replaces it or that downstream sequences will align automatically. The WanVaceToVideo node documentation describes the inputs, sequence calculation, and output. Its output definitions distinguish the latent tensor from the trim_latent value.
Does the node use every image in `reference_image`?
The documentation says only the first image is used. Do not plan on a batch of reference images being prepended as a sequence.
Is 21 the value `trim_latent` will report for `length=81`?
No. Twenty-one comes from the documented length formula. The actual trim_latent output must be read from the node; the formula alone does not establish that output.
Should I disconnect `control_video` when adding a reference?
Not on the basis of this feature. The reference is documented as additional conditioning. Keep or omit control_video according to the intended control input, and verify downstream alignment separately.
Sources and next step
This guide interprets public documentation and uses explicitly hypothetical acceptance examples, not application tests. Controls and availability can change; verify the cited manual against your installed version.
For work created in Imagild, carry the input requirements and acceptance checklist into the film workspace. The external software controls discussed above belong to their respective products.