Load Spatial Continuity
Hand-Edit Your Spatial Plan, Then Load It Back — No LM Studio Required
- consolidated_references
- spatial_continuity
- spatial_json
- summary
Every LLM node in this pack is a slot machine with a queue button. Feed it a chapter of prose, get back JSON that's 90% right with one wrong assumption baked in - a character on the wrong side of a room, a dropped torch still in someone's hand. You know the fix. You open the file and type the right answer.
Load Spatial Continuity lets you keep that fix. It reads a spatial plan you edited by hand, checks it against the consolidation it came from, and hands it to Generate H3 Prompts. No model calls anywhere in it - LM Studio can be off, which is the entire point.
Where it sits in the pipeline
The pack turns a novel into H3 scene prompts in stages: cinematic adaptation, extraction, consolidation, spatial planning, generation. Spatial planning is the expensive middle step - the model stages every character, prop and camera across a whole chapter, citing which sequence justifies each placement. H3 renders what you hand it, so a bad plan becomes a bad clip.
Normally you wire Consolidate References → Spatial Continuity → Generate H3 Prompts. This node replaces the middle of that chain: same registry in, same plan type out, except the plan came off your keyboard. The file lives under a timestamped run in output/minimax_h3_novel, and Spatial Continuity leaves spatial_continuity.schema.json beside it with a relative $schema link, so your editor autocompletes while you work. Keep the two together if you rename the plan.
The two inputs, and the gauntlet they run
spatial_path is a plain string - the file, or the folder that contains it. Paths are confined to output/minimax_h3_novel; relative paths resolve from there, and anything with .. or an absolute path outside that root is rejected. Point it at a directory and it looks for spatial_continuity.json; point it at a renamed copy and it reads that.
consolidated_references is the same registry you feed Generate - from Consolidate References or Load Consolidated References. Not decoration; the node checks your edits against it:
schema_versionmust still beminimax-spatial-continuity.v2, and the document is validated against the bundled JSON Schema - extra keys are rejected, not ignored.source_digestmust match the registry's. Edit freely and it doesn't care. Re-consolidate and the plan is stale, and the node says so.- The chapter set must match the registry's
chapter_timelinesexactly, and every chapter must list every sequence once, in order. You can't delete the scenes you found boring. - Each entity's
canonical_namemust match the consolidated entity whoseglobal_idis itsentity_id- or be empty when nothing matches. - An entity marked
evidence: "explicit"can't cite asource_sequencelater than its own. The anti-teleport rule: placement inferred from a future fact has to stay labeledinferred.
What you can safely edit is what you came to fix - world_position, relative_to, orientation, state, screen_position, the four camera fields, warnings.
Three outputs: spatial_continuity, which wires into Generate H3 Prompts' optional spatial_continuity input; spatial_json, the plan re-serialized as pretty text (dump it into a Show Text node to eyeball what loaded); and summary, a line like Loaded spatial continuity: 14 sequences from /…/spatial_continuity.json. That count is your sanity check that it read the file you meant.
Connecting this node flips Generate's spatial continuity pass on by itself, toggle or no toggle - the loader is free, but the pass it enables costs LM Studio requests.
Install
Python 3.10+, and the whole repo checked out - the root __init__.py, src/ and web/ are all load-bearing:
cd ComfyUI/custom_nodes
git clone https://github.com/yuyuki/minimax_h3_novel_pipeline.git minimax_h3_novel_pipeline
python -m pip install -r minimax_h3_novel_pipeline/requirements.txt
Use the Python that actually runs ComfyUI - the embedded one on a portable build. Or search "MiniMax H3 Novel Pipeline" in ComfyUI Manager and restart. Deps are openai>=1.0,<3, httpx>=0.27,<1, pypdf and jsonschema>=4.18,<5; only the first two matter for talking to LM Studio. Nothing to download for this node.
Common issues
"Spatial continuity is stale; rerun it with the current consolidation." Something upstream changed - a re-consolidation, a re-extraction - so source_digest no longer matches. Hand-editing the digest to match is possible and pointless: the plan then describes entities the registry doesn't have. Rerun Spatial Continuity, reapply your edits, and rerun the whole chain rather than just Generate - a stale extraction feeds observations into the plan you just corrected.
"Path must stay inside …" You pointed at a file outside output/minimax_h3_novel. Move it in, use a relative path.
"invalid JSON at line X, column Y" A real parser position, which is more than most nodes give you. A UTF-8 BOM is fine - the file's read as utf-8-sig - but a trailing comma isn't.
It didn't reload after your edit. It should: the cache check hashes file content, not timestamps, because editors like preserving both. If you still see old values, read the path in summary - a folder holding a stale spatial_continuity.json next to your corrected copy will load the original.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| spatial_path | STRING | JSON file (including renamed copies), or folder containing spatial_continuity.json. Must be inside output/minimax_h3_novel; relative paths start there. Saved edits are detected on the next workflow execution. | |
| consolidated_references | MINIMAX_REGISTRY | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| spatial_continuity | MINIMAX_SPATIAL_CONTINUITY | — |
| spatial_json | STRING | — |
| summary | STRING | — |