h3-plan-gate: Step 5 delivery rewritten from verified node pack source (socket vs widget, override rule, one-line plan file)

This commit is contained in:
Z User 2026-10-30 22:03:46 +00:00
parent 7df79bcf09
commit bb72baaa3a

View File

@ -173,14 +173,32 @@ system prompt emits. Report the delivered frames/seconds it prints.
## Step 5 — Deliver (the node makes the multi-clip video)
The user pastes the full contents of `plan.json` into the Plan node's `plan_json_input`
and queues ONCE. The `plan_json_input` field must contain EXACTLY the one JSON object:
first character `{`, last character `}`, nothing before or after. If ComfyUI rejects the
paste with `H3 Chain Plan JSON is invalid: Extra data: line N column M`, the field holds
more than the single JSON object — leftover text from an earlier plan ahead of the paste,
or a duplicated fragment of it. Clear the field completely (select all, delete), paste
once, and check that the field starts with `{` and ends with `}`. If `plan_json_input`
is wired to another node, the paste belongs in that source node's field instead.
Verified against the node pack source (`chain_nodes.py`, `MiniMaxH3ChainPlan` /
`MiniMaxH3ChainPlanModern`): the parser is a plain `json.loads` over the effective
plan string — a non-empty STRING connected to the forced `plan_json_input` socket
wins, otherwise the node uses its internal `plan_json` widget — and any decode
failure is reported as `H3 Chain Plan JSON is invalid: <detail>`. If the effective
string were exactly the delivered `plan.json` bytes, this parse cannot fail; a
reported error always means the field content differs from the file.
Deliver through the external socket, which the visual editor cannot corrupt: add a
multiline STRING node, paste the full contents of `plan.json` into it, wire it into
`plan_json_input`, and queue ONCE. Prefer the single-line variant of the plan file
(`json.dumps(..., separators=(',', ':'), ensure_ascii=True)` — one line, pure ASCII)
so no newline handling, leftover default demo plan, or editor re-serialization can
touch the paste. The internal `plan_json` Raw JSON widget is the fragile path: it
ships with a two-shot demo plan as its default, the visual scene editor serializes
its own edits over it, and a connected `plan_json_input` OVERRIDES it at queue time
(an internal paste into an overridden widget is silently ignored). If that widget is
used anyway: disconnect `plan_json_input` first, select all, delete, confirm the
widget is empty, paste once.
Either way the effective plan string must contain EXACTLY the one JSON object: first
character `{`, last character `}`, nothing before or after. If ComfyUI still reports
`H3 Chain Plan JSON is invalid: Extra data: line N column M`, the effective string
holds more than the single JSON object — leftover demo or earlier plan text ahead of
the paste, or a duplicated fragment of it. The `line N column M` points at the first
byte of the leftover; ask the user for that exact error text when diagnosing.
The node renders each shot as its own clip and chains the clips through
the H3 context loop — scene 2 continues from scene 1's final frames, scene 3 from scene