Nodes/comfyui_quality_inspector/☢️ Quality Assurance Inspector
ComfyUI Node

☢️ Quality Assurance Inspector

The 'Quality' Inspector Is Really Just a Resolution Bouncer

By JeremiahCE·Created about a month ago·Updated about a month ago· 0
☢️ Quality Assurance Inspector
  • image
  • PASSED_IMAGE
  • INSPECTION_LOG
min_width1024
min_height1024

It checks size, not quality - and that's the whole trick

Strip away the ☢️ and the "nuclear-grade" branding and this node is a bouncer. It stands in front of something expensive - a SUPIR restoration pass, a Flux upscaler, a tiled diffusion run - and refuses to let a tiny, useless input through to burn your VRAM on it. The honest name would be "Minimum Resolution Gate," because that's mechanically all it does. The "quality" in the title is aspirational.

Which is fine, actually. The README's own use case is a good one: if your workflow takes arbitrary inputs (a dropped-in image, a batch job) and then runs them through a heavy restoration or upscaling step, you want a floor under that step. Feeding a 512px thumbnail into a 6-second SeedVR2 pass is how you waste a GPU minute inventing garbage detail on top of nothing. A 1024×1024 floor here catches that before the expensive node even wakes up.

How it actually works

ComfyUI hands every image node a 4D PyTorch tensor shaped [B, H, W, C] - batch, height, width, channels. The inspector reads image.shape, compares width to min_width and height to min_height, and picks a branch:

if width >= min_width and height >= min_height:
    output_image = image                      # pass it through untouched
else:
    output_image = torch.zeros((1, 64, 64, 3))  # a black 64x64 tensor

Pass, and you get your original tensor back byte-for-byte - zero cost, and since the node declares no IS_CHANGED override, ComfyUI caches it so it only re-runs when the image actually changes. Fail, and you get the status string plus a small black tensor.

Here's where the README oversells it. It calls this "dynamic routing" that "short-circuits the pipeline." It doesn't. There's no switch, no empty output - the black 64×64 tensor just keeps flowing down whatever wire you attached. On fail, it doesn't halt anything; it hands your upscaler a black square to happily upscale into a bigger black square, which defeats the whole point. You have to catch that failure yourself with a fallback or A/B switch on PASSED_IMAGE, or the "guardrail" quietly becomes a "tiny black rectangle maker."

The three inputs that matter

Only three, and you'll set two:

  • image - the IMAGE tensor from your VAE Decode or image loader.
  • min_width / min_height - both default to 1024, step in multiples of 64, range 64–8192. These are your floor. Set them to whatever resolution your downstream stage actually needs, not your generation resolution - the point is to gate post-processing, not to reject the image you just spent a minute generating.

The outputs are PASSED_IMAGE (feed this onward) and INSPECTION_LOG, a STRING you can wire into any text-display node to see the pass/fail verdict on screen. The status is also printed to the console, which is handy if you're debugging a batch.

Installing it

Dead simple - there's no requirements.txt and no model download; the only dependency is torch, which ComfyUI already runs on. Via Manager, search "Quality Assurance Inspector" and install, or clone by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/JeremiahCE/comfyui_quality_inspector

Restart ComfyUI and you'll find ☢️ Quality Assurance Inspector under InspectionTools.

Where people get burned

Three traps, all real and all from the source:

  1. The black 64×64 tensor. It's not a halt, it's an output. If you wire PASSED_IMAGE straight to a preview, a failed run shows you a tiny black square and the workflow carries on. Build the switch.
  2. It gates nothing you already spent money on. The image reaching this node is already generated. This protects the upscale/restore stage only - and it can't tell a blurry 1024px image from a sharp one. Blur, noise, compression artifacts all pass this check.
  3. The step-64 grid. Thresholds snap to multiples of 64, which is fine for the latent pipeline but means you can't set an exact 1080p floor - set 1088 if you need "at least 1080."

It's a niche tool, but it's honest about being one. Reach for it when you're letting strangers or batch scripts feed images into expensive post-processing; skip it if you're always generating your own images at a known resolution, because then the gate never fires and it's just ceremony.

CategoryInspectionTools

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
min_widthINT102464–8192
min_heightINT102464–8192

Outputs (2)

NameTypeDescription
PASSED_IMAGEIMAGE
INSPECTION_LOGSTRING