Unblend Scene Book (JSON prompts)
Your whole prompt collection, one JSON file away
- prefix
- prompt
- full_prompt
- char_points
- name
- count
- horizontal
- info
Once you've got the Unblend two-character pipeline working, the next thought is always "now I want forty of these." Copy-pasting tagged prompts into the Dynamic Sampler and re-clicking char_points by hand for every scene is a great way to spend a day. UnblendSceneBook is the node that makes that a data problem instead of a clicking problem: your whole prompt collection lives in one JSON file, and the node hands you a scene by index.
How it works
The file is a scene book: one shared prefix (your [QUALITY]/[STYLE] block, the constant you don't want to retype) plus a list of scenes. Each scene is a body prompt, its own char_points, and an orientation hint:
{
"prefix": "[QUALITY] masterpiece, best quality, very aesthetic\n[STYLE] detailed hair, very aesthetic",
"prompts": [
{ "name": "beach midday",
"prompt": "[SCENE] beach under a parasol\n[CHAR1] ningguang...\n[CHAR2] shenhe...\n[INTERACT] resting head on shoulder",
"char_points": "0.3,0.45; 0.7,0.45",
"horizontal": true }
]
}
The node reads it, pulls out the scene at index, and returns the pieces separately: prefix, prompt (scene body only), full_prompt (ready to feed a sampler), char_points, name, count, and horizontal - a boolean for whether the scene is meant to be landscape (true) or portrait (false). That last one is the nice touch: wire it into a latent-size switch and the composition node changes aspect ratio per scene automatically.
You don't have to keep everything in a file, either. The inline_json input lets you paste the JSON straight into the node, which is great for testing a scene before committing it to disk. And the file parser is forgiving about naming - prompts/scenes, prompt/body, horizontal/landscape, or a "16:9"/"9:16" ratio string all work, so you can generate the book with a script without fighting the schema.
The inputs that matter
json_path- the file path (or leave it and paste intoinline_json).index- which scene, 1-based. This is where the Line Counter plugs in: put itsline_numberhere withwrapon and every run advances to the next scene, wrapping around when the book ends.wrap- true wraps the index by the book's length (for an incrementing counter); false clamps to the first/last scene.default_horizontal- the fallback orientation for scenes that don't set one.
Install
Same pack, same two options:
cd ComfyUI/custom_nodes
git clone https://github.com/LatentDesireAI/ComfyUI-Unblend
pip install -r ComfyUI-Unblend/requirements.txt
Or ComfyUI Manager, search "Unblend", Install, restart.
When things go wrong
The info output is a tidy i/N: scene name [horiz|vert] line - if it doesn't say what you expected, your index is wrong, not the book. An empty book throws "no prompts in the JSON", which usually means a typo in the key or a missing prompts array. And remember index is 1-based while the Line Counter starts at 0 by default - misalign those and you'll perpetually be one scene off. If a scene comes back with no char_points, that scene's entry is a plain string (allowed, but it leaves the anchors empty) or you forgot to set them on that dict.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| json_path | STRING | scenes.json | — |
| index | INT | 11–99999 | — |
| wrap | BOOLEAN | true | — |
| default_horizontal | BOOLEAN | false | — |
| inline_jsonopt | STRING | — |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| prefix | STRING | prefix only [QUALITY]/[STYLE] |
| prompt | STRING | scene body only (no prefix) |
| full_prompt | STRING | prefix + body (ready prompt) |
| char_points | STRING | this scene's char_points |
| name | STRING | scene name |
| count | INT | total scenes |
| horizontal | BOOLEAN | recommended format: True = horizontal, False = vertical |
| info | STRING | log: i/N: name |