Nodes/☁️BizyAir Nodes/Tools_ImagesTest
ComfyUI Node

Tools_ImagesTest

An SSIM regression gate, for people building pipelines, not art

By siliconflow·Created 2 years ago·Updated 11 months ago· 855
Tools_ImagesTest
  • images1
  • images2
    ssim_threshold0.9
    raise_if_diff
    image_idComfyUI

    Set expectations up front: this isn't a creative node, and it doesn't produce an image. It's a terminal assertion node - no outputs at all, is_output_node is true, and it sits in the same images_test category as its sibling Tools_ImageEncodeDecodeTest. Both are internal QA utilities bundled with the pack. If you're building a normal generation workflow, you almost certainly don't need this one; it's for people who are building or maintaining automated ComfyUI pipelines and want a pass/fail check baked into the graph itself.

    What it does

    It compares two image batches and tells you how similar they are, using SSIM - Structural Similarity Index, a standard way of scoring how close two images are perceptually rather than just diffing raw pixel values. A score of 1.0 means identical; it drops as the images diverge. The practical use case is regression testing: run a workflow, save its output as a known-good reference, and later - after updating a node pack, a model, or a workflow - feed the new output and the old reference into this node to catch a change you didn't intend.

    Inputs and outputs that matter

    • images1 / images2 - the two image batches being compared.
    • ssim_threshold (default "0.9") - worth noting this is typed as a STRING, not a FLOAT. You're typing a number into a text field rather than dragging a slider, which is a minor but real quirk if you're used to numeric widgets elsewhere in ComfyUI.
    • raise_if_diff - enable or disable. With enable, a comparison that falls below the threshold presumably stops the workflow with an error; disable likely just reports the result without halting anything. The schema doesn't spell out the exact non-raising behavior beyond that, so if you're relying on this for automated gating, test both settings against a known-mismatched pair before trusting it in a pipeline.
    • image_id (default "ComfyUI") - a label string for whatever comparison this run represents, presumably surfacing in logs so you can tell which check failed when you're running several of these in one graph.

    No outputs - this node is a dead end by design. Nothing chains after it.

    How to install it

    • ComfyUI Manager - search "BizyAir", install, restart.
    • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/siliconflow/BizyAir.git, restart.
    • Comfy CLI - comfy node install bizyair.

    No API key is required to use this specific node - it does its comparison locally, no cloud call involved. You'll only need one set up if you're also using the pack's actual generative nodes elsewhere in the same install.

    Common issues & troubleshooting

    You expected an output socket and there isn't one. That's correct, not a bug - is_output_node is true and the schema lists zero outputs. This node terminates whatever branch of the graph feeds it; nothing downstream can consume it.

    Not sure why this failed or passed. Check image_id in your logs to confirm which comparison you're actually looking at, especially if you've got more than one of these nodes running similar checks in the same workflow.

    Threshold behaves unexpectedly. Since ssim_threshold is a string field, double-check you've typed a plain decimal like "0.9" and not something with extra characters or formatting - there's no numeric validation visible in the schema to catch a typo for you.

    You don't actually need this node. If you're not building an automated pipeline that needs a regression gate, you're right - this is squarely a builder's tool, not something a normal creative workflow benefits from having in it.

    Categoryimages_test

    Inputs (5)

    NameTypeDefaultDescription
    images1IMAGE
    images2IMAGE
    ssim_thresholdSTRING0.9
    raise_if_diffCOMBO2 options: enable, disable
    image_idSTRINGComfyUI

    Outputs (0)

    No outputs