Vantage Prompt Scene Router
One node that swaps prompts and LoRAs per scene
- model
- clip
- model
- conditioning
- total_scenes
Prompt Scene Router is the one genuinely workflow-shaped node in Vantage Nodes: a single node that holds a whole set of scenes - each with its own prompt and its own set of enabled LoRAs - and, depending on an index you feed it, outputs the right model and the right conditioning. Think of it as a prompt book for your graph. Instead of a dozen text encoders and LoRA loaders scattered across the canvas, you get one node and a switch.
It's aimed squarely at video and storyboard-style work: scene 1 is "sunset over a harbor," scene 2 is "crowded night market," and the same sampler pipeline renders them in sequence as the index advances. It slots into the "switch / fallback control" culture of ComfyUI utility packs - the whole point is fewer wires and a graph you can still read when it's ten scenes deep.
How it works
The backend is deliberately stateless: all the scene data lives in a JSON blob (scene_data) that the node's JavaScript widget builds and maintains, so the Python side stays dumb. Each scene is an object with a prompt, a source, and an enable_loras list. On each run:
- It parses the JSON and reads the scene list.
- It clamps
execute_indexto[0, total_scenes - 1]and picks that scene. - It walks your eight LoRA slots; for any slot whose index appears in the scene's
enable_loraslist, it loads that LoRA from yourlorasfolder and merges it at full strength (1.0). - It encodes the scene's prompt with the CLIP you passed in, and returns the patched model plus the conditioning.
Inputs:
model(MODEL) - the checkpoint's model to patch LoRAs onto.clip(CLIP) - the text encoder used for the scene prompts.execute_index(INT, default 0) - which scene to render. Drive it from a stepper or frame counter for per-scene video.lora_1…lora_8(STRING, optional) - LoRA filenames for the pool. A scene only applies a LoRA if its index is in that scene'senable_loras.
Outputs: model (MODEL), conditioning (CONDITIONING), and total_scenes (INT) - the count, handy for loop bounds. Note there's no separate negative conditioning output; encode your negative once outside and leave this node to the positive side.
The honest caveat: check the shipped code
This node is a case where you should trust the source over the README. As shipped in the current code, run() references a variable named lora_names that was never defined - the method actually receives the LoRA slots as **loras. The practical result is a NameError: name 'lora_names' is not defined on execution, even with no LoRAs configured. If you hit exactly that error, the fix is a one-line edit in prompt_scene_router.py:
# change this line:
for i, name in enumerate(lora_names.values()):
# to:
for i, name in enumerate(loras.values()):
Keep an eye on the repo - this is the kind of thing that gets patched quickly once it's reported, so re-pull before you assume it's still broken.
Where you'd reach for it
- Multi-scene video where each shot needs its own prompt and character/style LoRAs.
- A/B scene testing from one graph: flip
execute_indexand compare outputs without touching a wire. - Keeping a "final cut" workflow shareable - collaborators get one node instead of a tangle of switches.
Installation
Part of Vantage Nodes. ComfyUI Manager: search "Vantage Nodes." Or:
cd ComfyUI/custom_nodes
git clone https://github.com/vantagewithai/Vantage-Nodes.git
pip install -r requirements.txt
Restart ComfyUI. The heavy requirements.txt is mostly for the pack's GGUF and Qwen TTS nodes; the router itself needs only a working install and your LoRAs in the usual folder.
Troubleshooting
NameError: lora_names: the known bug above - apply the one-line fix or update the pack.ValueError: No scenes defined: the scene list in the node's widget is empty; add a scene in the panel before queueing.FileNotFoundError: LoRA not found: the LoRA filename in a scene'senable_lorasdoesn't resolve in yourComfyUI/models/lorasfolder - check the exact filename (extensions are added automatically, sofoo→foo.safetensors).
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| execute_index | INT | 0 | — |
| lora_1opt | STRING | — | |
| lora_2opt | STRING | — | |
| lora_3opt | STRING | — | |
| lora_4opt | STRING | — | |
| lora_5opt | STRING | — | |
| lora_6opt | STRING | — | |
| lora_7opt | STRING | — | |
| lora_8opt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| conditioning | CONDITIONING | — |
| total_scenes | INT | — |