Nodes/Difforum/Difforum · Travel Conditioning (prompt per frame)
ComfyUI Node

Difforum · Travel Conditioning (prompt per frame)

A prompt per frame, as one conditioning — how you get prompt travel out of AnimateDiff

By chillithebillis·Created 4 months ago·Updated 17 days ago· 10
Difforum · Travel Conditioning (prompt per frame)
  • direction
  • prompts
  • images
  • latent
  • positive
  • frames
  • info

The problem it solves

AnimateDiff renders a whole clip in one sampler call, so it takes one conditioning. The classic Deforum trick - a prompt schedule, where frame 40 is dreamed with the words of frame 40 and frame 41 with slightly different words - has nowhere to go in that shape. People work around it with a dozen crossfaded ConditioningAverage branches.

Travel Conditioning does it in one node. It takes the Director's scene prompts, blends them across the clip, and stacks the result into a single CONDITIONING whose batch length equals the clip length, so frame f carries the prompt that belongs at frame f.

Is AnimateDiff worth starting a new project on in 2026? Honestly, no - the KB's verdict is superseded, and Wan-based tooling took the general case. But the morph-and-boil look it produces is a look people still want, and templates 20 and 21 exist to put that look on your own stills with a prompt per frame. If you're in that niche, this is the node.

How it works

The mechanism is unglamorous and that's the point:

  1. It takes a prompt track - either the Director's direction wire (which requires a CLIP connected to the Director, since the scene prompts need encoding) or a Prompt Travel node's prompts output.
  2. It works out how many frames it's actually feeding: your images batch if you gave it one, otherwise the latent batch's length, otherwise the Director's clip length.
  3. It resamples the track to that frame count. Same length as the clip means frame-for-frame; a mismatch means the travel is stretched across it.
  4. Each prompt's token tensor is padded up to the longest in the set, so a short prompt and a long one can share a batch, and - when every entry carries pooled output, as the video models do - the pooled embeddings are stacked too.
  5. Everything goes back out as a single conditioning with a per-frame batch.

Because the batch is length-matched to what you sample, the same node works over a rendered clip of any length: hand it the images you're about to restyle, or the latent your sampler will chew on, and the prompts land on the right frames.

Inputs and outputs

Everything here is optional, which makes the node easy to wire wrong:

  • direction - a Director with a CLIP connected. This is the normal source: your scenes become one prompt per frame.
  • prompts - or the output of a Prompt Travel node, if you'd rather use the classic 0: prompt schedule syntax.
  • images - the frames that will be sampled. Use it when the clip you're sampling isn't the Director's length.
  • latent - same idea for a latent batch.

Outputs: positive (the per-frame conditioning, into your sampler's positive slot), frames (an INT - the count it produced; useful when you're building the noise/latent batch and need them to agree), and info (a STRING listing the prompts per frame).

Connect neither and you get a clear "connect a CLIP to the Director" error, which is more than most nodes manage.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/chillithebillis/Difforum.git difforum

Restart, or search Difforum in ComfyUI Manager. The pack declares numpy only - no compile step, nothing to break in your existing environment. AnimateDiff itself is a different pack (AnimateDiff-Evolved) and this node doesn't ship it; template 21 also wants Advanced-ControlNet, an SD1.5 checkpoint and SparseCtrl RGB, which is where the real setup time goes.

Where people get burned

  • The batch length and the sampled clip disagree. If you hand AnimateDiff 48 frames' worth of context but images says 96, the travel won't line up with what you see. Wire images or latent, or check the frames output against your latent batch.
  • It looks like the prompts aren't all there. With a mismatch, the track is stretched, not truncated - so a 3-scene timeline over a 60-frame clip gives you slow, continuous drift rather than clean scene cuts. Scene cuts come from your timeline having keyframes close together, or from the sampler's own cadence.
  • Prompt blending inside AnimateDiff is not free. Blended prompts average in conditioning space; if your two scenes are wildly different subjects you get a mush in the middle frames rather than a cut. Keep adjacent scenes describable in the same words, changing one thing at a time.
  • Short prompts in a long batch. The node pads the shorter prompts to a common token length so the batch doesn't blow up, but remember your underlying stack still has a real ceiling - SD 1.5's CLIP is a 77-token hard limit per prompt. Keep scene prompts roughly similar in length and well under it.

If you're using this to put a painted look on H3 footage instead, look at Restyle and Look Mix rather than fighting AnimateDiff's 16-frame context. Travel Conditioning is for the case where the sampler itself should read different words at different frames.

CategoryDifforum/2 · Direction

Inputs (4)

NameTypeDefaultDescription
directionoptDIFFORUM_DIRECTIONA Director with a CLIP connected: its scene prompts become one prompt per frame.
promptsoptDIFFORUM_PROMPTOr the output of a Prompt Travel node.
imagesoptIMAGEOptional: the frames that will be sampled; the travel is stretched to their count.
latentoptLATENTOptional: the latent batch that will be sampled; the travel is stretched to its count.

Outputs (3)

NameTypeDescription
positiveCONDITIONING—
framesINT—
infoSTRING—