ComfyUI Node

Image Pair Shape Probe

The pass-through node that tells you what's actually hitting your blend

By xmarre·Created 3 months ago·Updated 3 months ago· 3
Image Pair Shape Probe
  • image1
  • image2
  • image1
  • image2
labelpair

Every "why is my image the wrong size" debugging session ends the same way: you need to know what tensor is actually arriving at a node, not what you think is arriving. Image Pair Shape Probe is a two-input debug helper that ships with the Safe Chunked Image Blend pack for exactly that - it prints the shape, dtype, and device of both images to the ComfyUI console, then hands them straight through untouched.

It exists because the pack's main node, Safe Chunked Image Blend, can throw a "Spatial mismatch" error or do a resize you didn't expect, and the fastest way to understand why is to see the real tensors right before they hit it. Upscaled branches, video frame batches, and CPU vs CUDA placement are all invisible inside a graph - this makes them visible in one run.

How it works

It's genuinely tiny: roughly ten lines of Python. It validates that each input is a proper IMAGE tensor, logs one line per input like

[SafeChunkedImageBlend] pair.image1: shape=(2, 5464, 3800, 3) dtype=torch.float32 device=cpu
[SafeChunkedImageBlend] pair.image2: shape=(2, 2732, 1900, 3) dtype=torch.float32 device=cpu

and returns both images unchanged. It never modifies pixels, so you can drop it anywhere in a graph without worrying about side effects.

The inputs and outputs

Three inputs, two outputs, and they're all simple:

  • image1 / image2 - the two IMAGE tensors to inspect.
  • label - a free-text STRING (default "pair") that prefixes the log lines. This is the underrated one: run two probes in one workflow, give them before and after labels, and you can tell their output apart at a glance.

The two outputs are the same image1 and image2, wired through untouched. That means the probe slots inline without breaking anything - put it between your upscaler and your blend node, run once, read the console, then bypass or delete it.

Installing it

It's part of the same pack as Safe Chunked Image Blend, so one install gets you both. In ComfyUI Manager, search "Safe Chunked Image Blend", or:

cd ComfyUI/custom_nodes
git clone https://github.com/xmarre/ComfyUI-Safe-Chunked-Image-Blend

Then restart ComfyUI. No model downloads; the pack's only declared dependencies are numpy and opencv-python-headless.

Notes and gotchas

  • The output goes to the console, not the node. If you're running ComfyUI as a desktop app with no visible terminal, you won't see the logs at all - launch from a terminal (or check the backend log) when you're debugging.
  • It only checks two images. If you need to inspect a single image or want a live graph annotation, a node like rgthree's or a generic debug/console node from a bigger suite covers that; this one is specifically built as the pair-probe companion to the blend node.
  • It won't tell you about a node's internal state - just the tensors entering it. For that job, it's exactly right.

Honestly, you could write this yourself in the time it takes to read this page. But it ships with the pack, it's already wired to the blend node's logging format, and it costs nothing to drop in when "Spatial mismatch" leaves you guessing. That's what a debug utility should be: boring, obvious, and gone from your workflow the second it's done its job.

Categorydebug

Inputs (3)

NameTypeDefaultDescription
image1IMAGE
image2IMAGE
labelSTRINGpair

Outputs (2)

NameTypeDescription
image1IMAGE
image2IMAGE