Nodes/IAMCCS-nodes/IAMCCS Cine PromptRelay Safe Encode
ComfyUI Node

IAMCCS Cine PromptRelay Safe Encode

One encode node that works whether or not PromptRelay is installed

By IAMCCS·Created 11 months ago·Updated 8 days ago· 113
IAMCCS Cine PromptRelay Safe Encode
  • model
  • clip
  • latent
  • relay_options
  • model
  • positive
  • promptrelay_enabled
  • report
global_prompt
local_prompts
segment_lengths
epsilon0.0010
promptrelay_enabledtrue

IAMCCS Cine PromptRelay Safe Encode is the node that refuses to be the reason your workflow dies. Its whole reason for existing: when PromptRelay is installed and you've fed it local prompts, it calls PromptRelay's real _encode_relay and you get segmented temporal conditioning. When it's not installed, or you haven't supplied local prompts, it falls back to a plain global CLIPTextEncode - no crash, no "missing node" wall, just a less fancy result. The docstring says it best: "This node exists to keep one workflow usable for both modes."

That's a genuinely thoughtful design for a pack whose workflows get shared around and re-opened on machines missing half the stack. It's also why the pack's big Shotboard backends (see IAMCCS Cine Shotboard Backend Pro) lean on the same idea with a safety budget on top.

How it works

You feed it the usual suspects: model, clip, latent, a global_prompt, local_prompts (pipe-separated), segment_lengths (comma-separated), and epsilon (the PromptRelay merge tolerance, default 0.001). The optional relay_options and promptrelay_enabled toggle let you force the decision.

The logic is:

  1. If there are local prompts present and PromptRelay can be loaded, it runs the real _encode_relay - model patched, segmented conditioning built.
  2. Otherwise it runs ComfyUI's stock CLIPTextEncode on the global prompt only and passes the model through unchanged (1:1).

Crucially, it loads PromptRelay's own nodes.py dynamically from custom_nodes/ComfyUI-PromptRelay - so there's no import-time dependency. If the folder is missing, you just get basic mode. The report output tells you which branch ran, complete with hashes of the prompts and the latent shape, which is a gift when you're debugging why conditioning looks different between two machines.

The outputs that matter

  • model - the (possibly patched) model, ready for the sampler.
  • positive - the conditioning.
  • promptrelay_enabled - the boolean that tells you which mode actually ran.
  • report - the diagnostics.

Install

In IAMCCS-nodes:

cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git

or Manager → search IAMCCS. README floor: ComfyUI ≥ 0.3.0, Python ≥ 3.12, Torch ≥ 2.8. For the full experience, install ComfyUI-PromptRelay as a separate pack - the fallback works without it, but then this node is just a dressed-up CLIPTextEncode.

Where people get burned

  • It silently degrades. That's the feature, but it's also the trap: your friend's workflow "works" with this node while actually producing global-only conditioning, and nobody notices until the video lacks the segmented behavior they were promised. Always check the promptrelay_enabled output or the report.
  • Loading PromptRelay from a path. It looks for ComfyUI-PromptRelay by exact folder name. A renamed or versioned folder (e.g. ComfyUI-PromptRelay-main) breaks the dynamic import and silently sends you to basic mode.
  • Latent shape matters. PromptRelay conditions per segment against the latent's frame count. Feed it the right full-length latent or the segment math drifts - this is exactly the shape-sync problem the pack's LatentShapeSync node exists to fix.
  • Zero search impressions, one-author tooling - but this is one of the more robustly designed nodes in the pack, and its fail-open behavior makes it safe to include in shared workflows.
CategoryIAMCCS/Cine/00 Utilities

Inputs (9)

NameTypeDefaultDescription
modelMODEL
clipCLIP
latentLATENT
global_promptSTRING
local_promptsSTRING
segment_lengthsSTRING
epsilonFLOAT0.00100.000001–0.99
relay_optionsoptRELAY_OPTIONS
promptrelay_enabledoptBOOLEANtrue

Outputs (4)

NameTypeDescription
modelMODEL
positiveCONDITIONING
promptrelay_enabledBOOLEAN
reportSTRING