Nodes/arkennemasis Nodes/arkennemasis QC Verdict (pass/fail + corrected prompt)
ComfyUI Node

arkennemasis QC Verdict (pass/fail + corrected prompt)

Turn the critic's 'looks wrong' into a rewritten prompt

By Hishamahmer·Created 2 months ago·Updated 8 days ago· 9
arkennemasis QC Verdict (pass/fail + corrected prompt)
    • passed
    • corrected_prompt
    • diagnosis
    • report
    • confidence
    critic_json{}
    original_prompt
    cell_json
    min_confidence0.00
    enabledtrue
    strict_jsonfalse

    ArkQCRequest builds the critic's question; ArkQCVerdict reads the answer. It parses the critic's JSON, decides pass or fail, and on a fail hands back a rewritten prompt aimed at the specific defect. That last part is the actual insight of the whole QC stage: retrying with the identical prompt mostly reproduces the identical failure. The critic's corrected_prompt is the one thing that breaks the loop.

    Two design decisions make this node interesting, and both are about not wasting money.

    The lazy input is the point

    critic_json is marked lazy. When enabled is off, the node never even requests that input - and because ComfyUI evaluates a node's inputs before it runs, an enabled flag checked inside the node would still pay for everything upstream: the request node and the vision call itself. The pack measured it: switching the critic off the lazy way left 2 model calls in a five-cell run where the naive way left 11. If you're skipping the critic, you want to skip the call, not just the verdict.

    That matters because this is the most expensive stage in the pipeline - one vision call per cell, 80–110 seconds each. enabled is the single biggest speed and cost saving available, and the default is on, so it's on you to turn it off for iteration and on for the final pass.

    The inputs that matter

    • critic_json - the critic's answer. Lazy, as above.
    • original_prompt - returned unchanged when the critic passes, or when it fails without offering a rewrite, so this output is always safe to feed straight back to the generator.
    • min_confidence (0) - treat a fail below this confidence as a pass. 0 trusts the critic completely. Raise it only after you've seen it reject images you would have accepted.
    • enabled (true) - the cost switch.
    • strict_json (false) - on: unparseable output raises. Off: treated as a pass with a warning, so one malformed answer can't block a long run.

    Outputs

    • passed - BOOLEAN.
    • corrected_prompt - the rewrite, ready to feed back into generation.
    • diagnosis, report, confidence - the reasoning, if you want to see why.

    Install and troubleshooting

    Ships in the arkennemasis pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Hishamahmer/comfyui-arkennemasis
    pip install -r ComfyUI/custom_nodes/comfyui-arkennemasis/requirements.txt
    

    Restart, or install via ComfyUI Manager by repo URL.

    The most common message is "The critic did not return valid JSON - turn json_only ON for its LLM node." That's almost always the fix. If you're running strict_json on and a single bad answer is killing whole runs, the default-off lenient mode exists precisely so one malformed reply can't block delivery - it logs the warning and passes, because a pass you can inspect beats a run you can't finish.

    Categoryarkennemasis/Variation

    Inputs (6)

    NameTypeDefaultDescription
    critic_jsonoptSTRING{}The critic's answer. LAZY: when `enabled` is off this input is never requested, so the vision model upstream of it is never called at all.
    original_promptoptSTRINGReturned unchanged when the critic passes it, or when it fails without offering a rewrite — so this output is always safe to feed straight back to the generator.
    cell_jsonoptSTRING
    min_confidenceoptFLOAT0.000–1Treat a fail below this confidence as a pass. 0 trusts the critic completely. Raise it only after you have seen it reject images you would have accepted.
    enabledoptBOOLEANtrueOff: skip the critic and pass. It is the most expensive stage here - one vision call per cell, 80-110s each - so this is the single biggest speed and cost saving available.
    strict_jsonoptBOOLEANfalseOn: unparseable output raises. Off: it is treated as a pass with a warning, so one malformed answer cannot block a long run.

    Outputs (5)

    NameTypeDescription
    passedBOOLEAN
    corrected_promptSTRING
    diagnosisSTRING
    reportSTRING
    confidenceFLOAT