Nodes/arkennemasis Nodes/arkennemasis Prompt Audit (assert constants identical)
ComfyUI Node

arkennemasis Prompt Audit (assert constants identical)

A checksum for the part of the prompt that must never change

By Hishamahmer·Created 2 months ago·Updated 8 days ago· 9
arkennemasis Prompt Audit (assert constants identical)
    • report
    • all_identical
    • distinct_constants
    audit_dir
    expected_hash
    stricttrue

    Every prompt in the arkennemasis variation pipeline is built as two parts: a varying change instruction, and a constant block - the product invariants plus the two locks - that is supposed to be byte-identical across the whole run. ArkPromptAudit is the node that proves it. It reads the hash log, checks that every prompt in the run shares one identical constant block, and fails loudly if any doesn't.

    Why does this matter enough to warrant its own node? Because a single differing hash means one cell was built against a different lock or a different invariant list - the exact silent drift that substitution was designed to prevent. One cell rebuilt against an older recipe, one cell with a stale plate, and you're about to pay for a full batch of images where one comes back framed wrong. The audit costs nothing and catches that whole class of failure before a single image is generated.

    How it works

    When ArkPromptBuild gets an audit_dir, it appends a line to constants.log for every prompt it builds: the hash of the constant block, then the cell key. This node reads that file, groups the prompts by hash, and reports how many distinct constant blocks exist. One group = pass. More than one = the set will drift.

    The defaults reflect the stakes. strict is on by default, and on a mismatch the node raises - the tooltip spells out why: the images are already paid for by the time you'd read a warning, so a warning isn't good enough. This is one of the rare ComfyUI nodes that is allowed to be annoying on purpose.

    Inputs and outputs

    • audit_dir - the same folder Prompt Build wrote constants.log into. The only required input.
    • expected_hash - optional. A constant_hash from Prompt Build; every line in the log must match it. Wire it if you want to pin the audit to a specific known-good run.
    • strict - on: mismatch raises; off: just reports.
    • report - a readable breakdown: how many prompts, how many distinct constant blocks, which keys differ.
    • all_identical - the boolean you can wire somewhere that cares.
    • distinct_constants - the count, so a multi-block run is visible even if you don't read the report.

    Install and troubleshooting

    It 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 "failure" is not a failure at all: "No constants.log at …" means you never set audit_dir on Prompt Build. That's the fix - it's a wire, not a bug. The second one is real: expected_hash wired in but missing from the log, which means the current run's constant block doesn't match the pinned run, and something upstream changed between them. That's exactly what the node exists to surface.

    One honest caveat: the audit only covers the constant block, not the change instruction. If your template itself drifts, the audit won't see it - but that's a recipe problem, and the recipe is what Recipe Gate makes a human read.

    Categoryarkennemasis/Variation

    Inputs (3)

    NameTypeDefaultDescription
    audit_dirSTRINGThe same folder Prompt Build wrote constants.log into.
    expected_hashoptSTRINGOptional. A constant_hash from Prompt Build; every line in the log must match it.
    strictoptBOOLEANtrueOn: a mismatch raises. That is the right default — the images are already paid for by the time you read a warning.

    Outputs (3)

    NameTypeDescription
    reportSTRING
    all_identicalBOOLEAN
    distinct_constantsINT