LinePrompt_MasterLoad_JSON
Scene prompts from JSON, with a name to match
- json_input
- prompt
- Scene Name
Storyboard work in ComfyUI has an identity problem: every scene is just another prompt, and once you've generated scene 12 for the fifth time you have no clean way to say "this one's scene 12." LinePrompt_MasterLoad_JSON is the node that gives scene-based generation a spine. It reads a JSON file of scene prompts, walks through them one at a time, and - the part nothing else in the pack does - outputs a Scene Name alongside the prompt. Wire that into Antimatter Text File Appender's scene_name input and rework stops creating duplicates: regenerating scene 12 overwrites scene 12's saved entry instead of stacking a sixth copy.
How it works
The node accepts JSON from three places: a connected json_input (which takes priority), a json_file path, or pasted json_text. It's forgiving about the shape - it flattens a list of objects with prompt/image_prompt/positive/text/description keys, a dict of name → prompt, a list of [name, prompt] pairs, or even a plain list of strings. Scene IDs are pulled from scene, scene_id, id, name, or title, and missing ones get auto-numbered as scene-001, scene-002, and so on. You don't have to conform to a rigid schema - this is what makes it practical instead of a spec-compliance exercise.
Selection modes:
sequential- walks scenes in order, honoringrepeat_each_scene(how many queue runs per scene) andafter_last_scene(stop_emptyreturns empty strings at the end,loopwraps around).manual- jump straight tomanual_scene, for "I'm only fixing scene 35 today."row- direct 1-based row selection, when your JSON order is the ground truth.
There are also Previous/Next buttons via the pack's web extension, backed by the hidden nav counter - same navigation pattern as LinePrompt_MasterLoad. The node forces execution every queue run (IS_CHANGED returns NaN) so sequential mode actually advances, and the preview shows the current scene plus a N/total status.
Inputs that matter
scene_mode, manual_scene (for manual mode), repeat_each_scene, and after_last_scene are the ones you'll set. enabled is the master switch - off, and both outputs return empty strings, which downstream nodes generally treat as "skip."
Outputs
prompt- the current scene's prompt, straight into CLIPTextEncode.Scene Name- the scene ID (scene-035, or whatever your JSON called it). Use it for output filenames and, as above, feed it to the Text File Appender for scene-aware replacement. The pair is clearly designed to be used together, and it works.
Installing it
Part of AntiMatter Nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/AntiMatterComfy/antimatter-nodes.git
Restart ComfyUI. No extra Python dependencies, no model files - the whole pack is deliberately lightweight, which keeps it out of the dependency-hell that sinks heavier node collections.
Troubleshooting
If the outputs come back empty, the node is telling you via its status preview - check for json_parse_error (paste a snippet into a JSON validator) or file_not_found (path is relative to ComfyUI's working directory). And a reminder on stop_empty: when it hits the end of the list, it returns empty strings rather than looping, so a long batch run will quietly produce blank prompts once the scenes run out. If that surprises you, switch to loop.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | BOOLEAN | true | — |
| json_text | STRING | — | |
| json_file | STRING | — | |
| scene_mode | COMBO | sequential | 3 options: sequential, manual, row |
| manual_scene | INT | 11–100000 | — |
| repeat_each_scene | INT | 11–100000 | — |
| after_last_scene | COMBO | stop_empty | 2 options: stop_empty, loop |
| nav | INT | 0-2147483648–2147483647 | — |
| row | INT | 11–100000 | — |
| json_inputopt | * | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| Scene Name | STRING | — |