Rikan Prompt Relay Multi LoRA Gate
Gate each one to a segment of the timeline
- model
- model
Normal LoRAs are permanent: load one and it shapes every frame of a video the same way. Rikan Prompt Relay Multi LoRA Gate is the exception - it attaches a LoRA to a segment of your timeline, so a style or a character LoRA fades in during one stretch of the clip and fades back out when the scene changes. Think of it as per-scene LoRA switching that you don't have to stitch together from separate renders.
This is the second half of the pack's prompt-relay system, and it's useless without the first half. It reads segment metadata that the Rikan Prompt Relay Encode (Timeline) node stamped into the model, then applies each of your LoRAs with a gaussian gate centered on that segment's frame range. The LoRA's influence ramps up smoothly around its segment's midpoint and decays on either side, so you get a fade rather than a hard cut - which is exactly what makes character or style changes mid-clip look intentional instead of like a jump cut.
How it actually works
The Timeline node stores a list of segments (each with a midpoint, a window, and a sigma) inside the patched model's model_options under the key rikan_pr_segments. This gate walks your LoRA rows, and for each one pulls the matching segment index, computes per-frame gate weights from that segment's gaussian, then wraps the LoRA's linear layers so the LoRA delta is multiplied by the per-frame gate. Loaded LoRAs go through comfy.loras, the same machinery stock loaders use, so compatibility with your existing .safetensors LoRAs is normal. The heavy lifting is done in fp32 on CPU side but applied on the GPU at run time.
Inputs and output
model- this must be the model that came out of the Timeline node (or something downstream of it). It's carrying the segment map; a fresh checkpoint won't have one.lora_data- JSON rows from the UI, one per LoRA, each withenable,name,segment(which segment index it gates to), andmodelStr(strength). The UI gives you a per-row segment picker so you don't hand-edit the JSON.
Output: a single patched model. Wire it into your KSampler's model slot.
The failure mode to know
If you see Prompt Relay metadata not found in the console, the model you fed in isn't the Timeline's output - the gate has no segments to anchor to, and it passes the model through unchanged. The two nodes are designed as a pair: Timeline first, gate after, sampler last.
Other things to keep in mind: segment indices are 0-based, and a row pointing at a segment that doesn't exist is skipped with a warning. Strength works like any LoRA weight - start at 1.0 and tune down. And because the gate reads tokens_per_frame from the model, it's built for the video architectures the Timeline supports (Wan, and LTX in the encode node's patch paths) - this isn't an SDXL-era stills tool.
Installing
Same pack as the rest: ComfyUI Manager → search Rikannodes, or git clone https://github.com/rikanrino/Rikannodes into ComfyUI/custom_nodes, pip install -r Rikannodes/requirements.txt, restart, find it under Rikannodes. It's a young pack with a thin README and no community signal yet, so treat version bumps as possibly breaking - but the gated-LoRA idea is a genuinely useful trick that few packs attempt.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| lora_data | STRING | [] | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |