CineSpatial · ValidateArtifact
The only CineSpatial node that doesn't call home (and its valid output is always True)
- normalized_json
- valid
Every other node in this pack is a thin client for a local AI runner on 127.0.0.1:8199. This one is a pure local JSON checker - no network, no models, no runner. Which makes it the only node in CineSpatial you can use with the entire backend shut down, and the only one whose valid output you should look at sideways.
Here's the thing the brief won't tell you: when this node returns at all, valid is always True. Invalid input doesn't come back as False - it raises an error and the node goes red. So don't wire valid into a branch expecting it to flip. It's a gate that fails loudly, not a switch.
What it's for
The worker nodes (BanditSeparate, TranscribeAlignDialogue, and the rest) all emit artifact_json - a JSON string describing the files and evidence they produced. This node takes that string, checks it's a real CineSpatial 0.1 artifact object, and hands you a normalized copy: minified, with keys sorted.
That normalization sounds boring until you need it. Two runs that produce equivalent artifacts will now compare or hash identically, because the key order is canonical. It's the right tool before you log an artifact, store it, or compare it against a previous run. And because it verifies the schema_version matches the pack's 0.1, it's a cheap way to catch an artifact from an older or newer runner before it flows into a node that expects a specific shape - like DetectActiveSpeaker, which demands a real dialogue_alignment artifact on its input.
Inputs and outputs
artifact_json- required STRING (multiline). Paste the output of another CineSpatial node here, or wire the STRING socket straight across.- Outputs:
normalized_json(STRING) andvalid(BOOLEAN).
Note that it's not an output node, so you're expected to wire normalized_json onward or into a display, not just run it and look at the canvas.
How it fails
Read the source and the design becomes obvious. It parses the JSON, requires a dict whose schema_version is "0.1", and raises ValueError - with the message "Expected a CineSpatial 0.1 JSON object" - on anything else. Invalid JSON parse, non-dict, wrong version: all raise. In ComfyUI, a raised error marks the node red and halts the graph. That halt is your "False" signal; it just isn't a boolean on a socket.
It's a deliberate safety posture - the pack's README says missing or invalid artifacts "fail explicitly" - but it's easy to trip over if you're new. If you genuinely need a False value to branch on, you'll have to parse and check the JSON yourself rather than trusting the socket.
Install and troubleshooting
Installs like the rest of the pack (ComfyUI Manager Git URL installer, or git clone https://github.com/Vighneshjs/ComfyUI-CineSpatial into custom_nodes, then restart). No dependencies, no models, and - uniquely in this pack - no runner required.
Two things to remember: if valid never seems to go False, that's the design, not a bug. And if you run this on a snippet that was truncated or copy-pasted from a chat window, you'll get the red error rather than a polite "no" - that's it working as intended.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| artifact_json | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| normalized_json | STRING | — |
| valid | BOOLEAN | — |