Prompt Relay Restore (Kijai)
The cleanup node that undoes a Prompt Relay patch
- model
- model
Most ComfyUI nodes are one-way doors: they take something in, hand you something out, and the only cleanup is deleting them. Prompt Relay Restore (Kijai) is the exception - its entire job is to undo the damage a Prompt Relay encode does, by restoring the original cross_attn.forward on a patched model. If you're using the kijai backend of the Prompt Relay family, this node is your fire escape.
Why it exists
Why does this exist? The Prompt Relay technique works by patching a model's cross-attention - temporarily replacing the forward pass so that per-segment prompts relay across the video's frames. A patched model object in ComfyUI is a cloned model, but the patch can linger if you chain encodes, re-run workflows, or hold the model across executions in a complex graph. Prompt Relay Restore takes the WANVIDEOMODEL and hands back a clean one with the original cross_attn.forward restored, so the next thing that touches that model isn't inheriting relay logic it never asked for.
The whole interface
The inputs and outputs are the whole node: one required model (WANVIDEOMODEL) in, one model (WANVIDEOMODEL) out. That's it. It slots into the kijai pipeline - the WanVideoWrapper path - which is why it says Kijai in the name: the kijai encoder patches the WanVideoWrapper model, and this node restores it. It's deliberately narrow and that's the point; a restore node that touched anything else would be a bug.
Do you actually need it?
Honest assessment: most users of PromptRelayEncodeC2C with backend=kijai will never need this. ComfyUI's model clone semantics usually keep the patch contained to the clone, and the unified encoder is careful about that. You reach for it when you're doing something unusual - reusing a patched model for a second encode, building a workflow that passes the same model object through multiple patching stages, or debugging a graph where a relay seems to bleed into a render that shouldn't have it. If you've ever seen a non-relay render behaving like it has segment prompts, that's the symptom this fixes.
Install
It's also a nice illustration of how the pack treats the Prompt Relay suite as production plumbing rather than a hack: encoder, tuning bundle, and a restore node to close the loop. Install is the shared pack - clone Code2Collapse/ComfyUI-CustomNodePacks into ComfyUI/custom_nodes or ComfyUI Manager → "CustomNodePacks". No models, no deps, no settings to get wrong. If you don't recognize the failure it fixes, you can safely ignore it and move on with your life; if you do recognize it, you'll be glad it's there.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model | WANVIDEOMODEL | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | WANVIDEOMODEL | — |