Nodes/SDXL Auto Prompter/APNext H3 Scenes Review (edit before render)
ComfyUI Node

APNext H3 Scenes Review (edit before render)

Read the prompt before you pay for the render

By dagthomas·Created 3 years ago·Updated about 18 hours ago· 289
APNext H3 Scenes Review (edit before render)
    • scenes
    • scene_count
    scenes
    modeReview (stop here and edit)
    edited

    The multi-scene H3 writers hand you 1–10 full prompts in one go, and the render side of that is slow, expensive, and unforgiving. Render ten scenes only to discover shot 3 says "she enters a dive bar" when you asked for a cathedral, and you've burned a lot of GPU time (and LLM tokens) on a mistake you could have caught in thirty seconds of reading. H3ScenesReview is the checkpoint between writer and render - a gate that makes you look at the scenes before anything gets committed. It sits in every example workflow in the pack for a reason.

    How it works

    Three modes, and the default is the one that saves you:

    • Review (stop here and edit) - the run fills the node's editor with the incoming scenes and stops cleanly, before anything renders. The editor shows the same colour-coded H3 tags as the Prompt Preview (shots, subjects, dialogue, camera vocabulary) but it's fully editable - all scenes at once or one scene at a time. Edit, queue again, and the mode has already flipped itself to Continue.
    • Continue (render the editor text) - parses the === SCENE NN === envelopes back into the scene list and sends exactly that to the render. An empty editor just passes the incoming scenes through.
    • Bypass - transparent pass-through for when you don't want the gate at all.

    Under the hood it's neat: in Review mode the node pushes the serialized text to the editor over a websocket message, then raises an interrupt so the queue halts right there. Nothing downstream executes. The editor header carries a source-fingerprint line that ties your edits to the scenes they came from - change the cast, direction, lyrics or seed upstream and the next run detects the mismatch and re-reviews with the fresh scenes instead of silently rendering stale text. That one feature prevents the classic "I edited scene 3, then changed the whole cast, and it rendered the old plan" footgun.

    The inputs are minimal: scenes (the writer's list, or a single h3_prompt), mode (the three-way enum), and edited (the multiline editor text). Outputs: scenes (the list for the video node) and scene_count. It's an output node - that's how it's allowed to stop the queue.

    Installing it

    Part of the dagthomas/comfyui_dagthomas pack ("SDXL Auto Prompter"). Via ComfyUI Manager (search "comfyui_dagthomas") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/dagthomas/comfyui_dagthomas
    cd comfyui_dagthomas
    pip install -r requirements.txt
    

    Restart ComfyUI. No API key, no model download - this node shuffles text between the writer and the render.

    Where people get burned

    Give the writer a fixed seed before you start reviewing. Review itself costs nothing, but a Continue run with a non-fixed writer seed can re-invoke the LLM and hand you new scenes instead of the ones you just edited - the node warns that Continue reuses the cached answer only when the seed is stable. Keep the === SCENE NN === markers and the scene count intact: the writer's durations and audio_segments stay aligned to the incoming count, and a mismatch gets padded or trimmed with a console warning. And don't fight the fingerprint: if you changed the cast or direction after reviewing, it re-reviews on purpose - your old edits belonged to data that no longer exists.

    Categorycomfyui_dagthomas/H3

    Inputs (3)

    NameTypeDefaultDescription
    scenesSTRINGThe writer's `scenes` list (or a single `h3_prompt`). In Review mode these fill the editor; in Continue mode the editor text is what gets rendered.
    modeCOMBOReview (stop here and edit)Review: fill the editor with the incoming scenes and stop the run before the render (the editor flips this to Continue for you). Continue: render the editor text. Bypass: pass through untouched. Give the writer a fixed seed so Continue runs reuse its cached answer instead of writing new scenes.
    editedSTRINGThe reviewed scene text, one === SCENE NN === envelope per scene. Filled automatically by a Review run; edit freely. Empty = pass the incoming scenes through unchanged. The source-fingerprint line in the header lets the node detect when the writer's scenes changed upstream (new cast / direction / seed) - it then re-reviews with the fresh scenes instead of rendering the stale editor text.

    Outputs (2)

    NameTypeDescription
    scenesSTRING
    scene_countINT