Nodes/Boyonodes/Boyo Prompt Relay Encode
ComfyUI Node

Boyo Prompt Relay Encode

Different Prompt Every Part of the Video

By DragonDiffusionbyBoyo·Created 2 years ago·Updated 27 days ago· 16
Boyo Prompt Relay Encode
  • model
  • clip
  • latent
  • model
  • positive
global_prompt
local_prompts
segment_lengths
epsilon0.0010

A video prompt is usually one sentence for the whole clip, and the model does its best to make that work. Prompt Relay fixes the actual limitation: it lets different parts of the video be driven by different prompts, with smooth temporal transitions between them. This node is a faithful port of kijai's ComfyUI-PromptRelay into Boyonodes - same logic, attributed, renamed so both packs can coexist - with the classic combo: a global_prompt that anchors the whole video plus local_prompts that take over in sequence.

So if you want a video where a character walks through a forest, then a city, then a desert - without any cuts - you write three local prompts and let the gating blend between them.

How it works

You feed it a model, a clip, and an empty latent video whose dimensions define the temporal budget. The core idea: each local prompt is encoded normally, then masked with a Gaussian curve across time. Prompt A is at full strength for the first segment, fades out as prompt B fades in, and so on. The node then patches the model to apply that temporally-varying conditioning during sampling - that's why it outputs a model as well as the positive conditioning. You take both outputs downstream to your sampler.

The inputs that matter:

  • global_prompt - conditions the entire video. This is where you anchor persistent stuff: character identity, scene context, camera style.
  • local_prompts - ordered, one per segment, separated by |. "walk through a forest|walk through a city|walk through a desert".
  • segment_lengths - comma-separated pixel-space frame counts per segment. Leave empty and it auto-distributes evenly. If you give lengths, they're converted to latent lengths internally (largest-remainder method), so you don't have to do latent math yourself.
  • epsilon - the Gaussian penalty decay. Default 0.001 gives sharp segment boundaries (that's the paper default). Below ~0.1 you get crisp transitions; raise it to 0.5+ for soft, gradual cross-fades. This is the single knob most people actually touch.

Where it fits

Anything where the content of a video changes over its runtime: scene-transition animations, music-video-style cuts, storyboard clips where each scene is its own prompt. The node is model-agnostic at the conditioning level, so it works in Wan and LTX workflows alike - the same temporal-relay idea the LTX Director tooling popularised.

Use a standard CLIPTextEncode for the negative prompt; the relay only handles positives.

Installing it

Ships with Boyonodes:

cd ComfyUI/custom_nodes
git clone https://github.com/DragonDiffusionbyBoyo/Boyonodes

Restart ComfyUI, or install "Boyonodes" via ComfyUI Manager. Requires the pack's prompt_relay.py and patches.py modules, which ship with the pack - no external deps beyond what ComfyUI already has.

Gotchas

  • local_prompts must contain at least one prompt or the node raises. The | separator is mandatory; don't use commas.
  • If your video quality collapses at segment edges, your epsilon is too low - soften it before touching anything else.
  • Because it patches the model, the patched model output is the one you must use in the sampler; plugging the un-patched model in silently ignores the relay.

The most interesting node in the pack for video people. If you've been fighting "one prompt per clip" constraints, this is the lever.

Categoryconditioning/boyo_prompt_relay

Inputs (7)

NameTypeDefaultDescription
modelMODEL
clipCLIP
latentLATENTEmpty latent video — dimensions are read from its shape.
global_promptSTRINGConditions the entire video. Anchors persistent characters, objects, and scene context.
local_promptsSTRINGOrdered prompts for each temporal segment, separated by |
segment_lengthsSTRINGComma-separated pixel space frame counts per segment. Leave empty to auto-distribute evenly.
epsilonFLOAT0.00100.000001–0.99Penalty decay parameter. Values below ~0.1 all produce sharp boundaries (paper default 0.001). For softer transitions, try 0.5 or higher.

Outputs (2)

NameTypeDescription
modelMODEL
positiveCONDITIONING