ComfyUI Node

Assert Not Black

Make a workflow fail loudly instead of returning a blank image

By bollerdominik·Created about a year ago·Updated 22 days ago· 2
Assert Not Black
  • image

    Anyone who's run ComfyUI workflows unattended for a while has hit this: a run finishes, everything looks green in the queue, and the output is just... black. A VAE decode step choked, a masking node produced an empty region, an API node failed silently and returned nothing - and because nothing actually errored, the workflow reports success and hands you a blank frame instead of a failure. This node exists to close exactly that gap. Wire it in after a step you don't fully trust, and instead of a workflow that silently completes with garbage output, you get one that stops and tells you something's wrong.

    There's one input, no output, and that's deliberate. This is a pure check: give it an image, and it verifies the image isn't (functionally) all black. If it fails the check, it interrupts the workflow rather than letting a bad frame quietly reach your saved output. It's the kind of node you'd write yourself if you needed it and didn't already have one - small, single-purpose, no configuration.

    Why it has no outputs, and why that's not a mistake

    • image (required) - the frame to validate. That's the entire input surface.
    • No outputs at all, and is_output_node is set to true. In ComfyUI, a node marked as an output node is treated as a required destination when the graph executes - it's not something you chain further nodes off of, it's a terminal point the way a Save Image or Preview Image node is. That matters practically: if you build a validation branch with this node at the end and nothing else downstream, ComfyUI will still execute everything feeding into it, because it's recognized as an output rather than a dead end that gets pruned.

    Installing it

    Search ComfyUI-load-lora-from-url in ComfyUI Manager, or install it directly:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bollerdominik/ComfyUI-load-lora-from-url
    

    Restart ComfyUI. No models, no dependencies beyond the base pack - this is pure image math.

    Where this actually earns its place

    • API-driven and unattended runs. If you're queuing workflows through the API rather than watching each one execute in the UI, a silent black-frame failure is far more expensive to discover, because by the time you notice, you've potentially burned compute across a whole batch of runs that all quietly failed the same way. A hard assertion catches it at the point of failure instead of at review time.
    • After steps that are known to fail this specific way. VAE decode issues and certain masking/compositing bugs are the classic sources of an unexpected black frame. Put this node right after the step you least trust, not at the very end of a long pipeline - the closer it is to the actual point of failure, the less time and compute you waste before finding out something broke.
    • It only catches black. It won't catch a frame that's the wrong content, badly composed, or otherwise "wrong" in any way that isn't literally near-zero pixel values - it's a narrow check for one specific, common failure mode, not a general quality gate.
    Categoryimage/validation

    Inputs (1)

    NameTypeDefaultDescription
    imageIMAGE

    Outputs (0)

    No outputs