Nodes/Rikannodes/Rikan Prompt Relay Encode (Timeline)
ComfyUI Node

Rikan Prompt Relay Encode (Timeline)

Drag segments on a timeline and each one gets its own prompt, smoothly

By rikanrino·Created 4 months ago·Updated 4 months ago· 1
Rikan Prompt Relay Encode (Timeline)
  • model
  • clip
  • latent
  • model
  • positive
  • fps_out
  • max_frames_out
global_prompt
max_frames129
timeline_data
local_prompts
segment_lengths
epsilon0.0010
fps24.00
seconds5.4
time_unitsframes

Here's the problem this solves: a video model gets one prompt, so a 5-second clip is one idea. But a real shot changes - the light shifts, the camera pulls back, the subject walks into a new scene. The community trick that went around in 2026 is "prompt relay": split the clip into segments and give each one its own prompt, letting the model transition between them smoothly instead of you cutting two renders together. Rikan Prompt Relay Encode (Timeline) is that idea done natively in ComfyUI, with a visual timeline editor instead of a script.

The node's headline feature is the timeline UI. Instead of typing JSON, you get a colored bar per segment that you drag and resize on a ruler, each segment with its own prompt box. The max_frames (default 129) ruler shows seconds at your fps (default 24), an Equalize button snaps all segments to the same length, and everything serializes into hidden widgets (timeline_data, local_prompts, segment_lengths) that you never have to touch. If the JSON format changes under you, the editor just rebuilds a default two-segment timeline and moves on.

How the smoothing works

This is the part that's actually clever. The full prompt is your global_prompt followed by each local_prompts block (separated by |). The node tokenizes the whole thing, works out which token ranges belong to which segment, and then patches the model's cross-attention with a per-frame penalty matrix: each segment's text tokens are allowed to attend strongly to frames near their segment's midpoint, and their influence falls off with a gaussian window into neighboring frames. The epsilon control (default 0.001) sets how wide that falloff is - smaller = tighter, sharper boundaries; larger = blurrier, more blended transitions. Soft gating is what makes a prompt change feel like a drift instead of a hard cut.

It detects the model architecture and patches accordingly - Wan and LTX are the two it handles. The output model is a clone with those attention patches baked in, positive is the full-prompt conditioning, and fps_out / max_frames_out just pass your values through for whatever consumes them.

The inputs that matter

  • model, clip, latent - your video model, its CLIP, and the empty latent (Wan's, typically).
  • global_prompt - the always-on prompt shared by every segment.
  • local_prompts - segment prompts, |-separated. In practice the timeline UI writes this for you.
  • max_frames (129), fps (24), seconds (5.375), time_units (frames or seconds) - the ruler.
  • timeline_data, segment_lengths - hidden widgets the UI manages; you can also paste prebuilt JSON in if you're scripting.

Beyond the outputs, the node stashes the segment map inside the patched model's options (rikan_pr_segments, latent frame count, tokens per frame). That metadata is the handshake the pack's Prompt Relay Multi LoRA Gate relies on - so the intended graph is Timeline → (optionally) gate → KSampler.

Honest notes and install

The seconds/max_frames widgets are linked - edit one, the other recalculates - which can surprise you if you're used to set-and-forget. And because this patches attention, it needs a model that supports the patch (Wan and LTX) and a reasonably current ComfyUI. Install via ComfyUI Manager (search Rikannodes) or git clone https://github.com/rikanrino/Rikannodes into custom_nodes, pip install -r Rikannodes/requirements.txt, restart. It's under the Rikannodes category. It's a young pack - treat version bumps as potentially breaking, and test on a short clip first, because attention-patch nodes either work beautifully or don't register at all.

CategoryRikannodes

Inputs (12)

NameTypeDefaultDescription
modelMODEL
clipCLIP
latentLATENT
global_promptSTRING
max_framesINT1291–10000
timeline_dataSTRING
local_promptsSTRING
segment_lengthsSTRING
epsilonFLOAT0.00100.000001–0.99
fpsoptFLOAT24.000.1–240
secondsoptFLOAT5.40.1–1000
time_unitsoptCOMBOframes2 options: frames, seconds

Outputs (4)

NameTypeDescription
modelMODEL
positiveCONDITIONING
fps_outFLOAT
max_frames_outINT