Prompt Relay Encode
Give a video different prompts for different moments
- model
- clip
- latent
- relay_options
- model
- positive
If you've ever tried to make a video model do "she runs, then she trips, then the zombies catch up" in one continuous shot, you already know the problem: cram it all into one prompt and the model forgets the first thing you said by the time it gets to the third. Character changes clothes, the room turns into a different room, everyone's positions reset like a bad video game respawn. Prompt Relay Encode is kijai's answer to that specific pain, and it's worth knowing that kijai isn't some rando pushing out untested nodes - he's the person behind WanVideoWrapper, KJNodes, and a stack of day-one fixes for LTX releases. When his name is on a pack, people install first and ask questions later, and the community literally lists him as one of the handful of devs behind the tools everyone actually uses.
What it's actually doing
The node splits your prompt into two layers instead of one. global_prompt is the stuff that has to stay true the whole clip - your character, the lighting, the setting, the overall vibe. local_prompts is an ordered list of what happens when, separated by |. Under the hood, Prompt Relay patches the model so each local segment's conditioning has real influence over its own slice of the timeline and tapers off outside it, instead of every prompt token fighting for attention across the whole clip equally. That tapering is controlled by epsilon, and it's not a made-up magic number - the README ties it to a paper's default (0.001), which gives you hard, sharp cuts between segments. Push it up toward 0.5+ and the boundaries get soft, prompts bleed into their neighbors a bit. Reddit's own stress test of this - a deliberately chaotic zombie-chase scene with running, multiple zombies, and a messy store background - held together noticeably better than a single giant prompt would, which is the whole pitch of this node in one example.
Inputs and outputs that matter
model,clip,latent- your usual pipeline.latentshould be an empty latent video; the node reads its frame count straight from the shape, so this has to run after your empty-latent node, not before.global_prompt- the anchor. Character, setting, style, lighting. Leave it thin and let the local prompts do the storytelling.local_prompts- your beats,|-separated:"Woman runs through store | Hits the shelf | Chip bags scatter".segment_lengths- comma-separated pixel-space frame counts, one per segment. Leave it empty and the segments split evenly; fill it in if you want, say, the middle beat to run twice as long as the others. Keep the count here matched to the count of|-separated segments inlocal_prompts, or you're asking for a mismatch.epsilon- the boundary sharpness dial described above.relay_options(optional) - plug in a Prompt Relay Advanced Options node here for per-stream tuning; skip it and you get sane defaults.
Outputs are the patched model and a positive conditioning. Both need to go where they normally would - model into your sampler, positive into the sampler's positive slot. You still build your negative prompt the normal way with a plain CLIPTextEncode; this node only touches positive.
Installing it
Search "ComfyUI-PromptRelay" in ComfyUI Manager, install, restart. Or manually: cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-PromptRelay, then restart. No model downloads, no heavy dependencies for this node specifically - it's pure conditioning logic, so it's a light install compared to most of kijai's other packs.
Common issues
Forgot the negative prompt. This node only produces positive. If your negative slot is empty or wired to something stale, you'll get weird results that look like a Prompt Relay bug but aren't.
Wired the old model past this node. Since this node's whole job is patching the model for temporal conditioning, if your sampler is still pointed at the original unpatched model output instead of this node's model output, none of the segmenting applies - you'll just get a normal single-prompt run and wonder why nothing changed.
It's marked "work in progress" for a reason. The pack's own README says so up front. If a run behaves oddly after an update, check the GitHub repo before assuming you did something wrong - this is genuinely early software, and people online already describe the setup as "seems so complicated" if you're new to it. Start with two or three segments and a short clip before you try a five-beat action sequence.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| latent | LATENT | Empty latent video — dimensions are read from its shape. | |
| global_prompt | STRING | Conditions the entire video. Anchors persistent characters, objects, and scene context. | |
| local_prompts | STRING | Ordered prompts for each temporal segment, separated by | | |
| segment_lengths | STRING | Comma-separated pixel space frame counts per segment. Leave empty to auto-distribute evenly. | |
| epsilon | FLOAT | 0.00100.000001–0.99 | Penalty decay parameter. Values below ~0.1 all produce sharp boundaries (paper default 0.001). For softer transitions, try 0.5 or higher. |
| relay_optionsopt | RELAY_OPTIONS | Optional advanced per-stream tuning. Connect a Prompt Relay Advanced Options node. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| positive | CONDITIONING | — |