Mask Debug
Stop guessing what shape your mask actually is
- mask
- STRING
Masks in ComfyUI are just tensors under the hood, and when a downstream node throws a size-mismatch error, half the fight is figuring out what shape you were actually holding at the point things broke. MaskDebugNode is a one-in, one-out probe built for exactly that: plug in a mask, get back a plain string reporting its tensor shape, wire that string into a text-display node, and read it.
There's no configuration and no mechanism beyond the obvious - it inspects whatever MASK you feed it and formats the shape as text. What makes it worth having isn't cleverness, it's that ComfyUI doesn't give you an easy way to see a mask's shape any other way short of opening a Python console. A mask coming out of an image's alpha channel, a segmentation node, and a manually painted mask input can all disagree on batch size or resolution without any visible sign of it in the UI - the graph looks fine right up until a composite or inpaint node downstream throws a shape-mismatch error mid-run. Dropping this node in front of the suspect wire turns that mystery into a number you can actually read.
The inputs and outputs that matter
There's exactly one input and it's required:
mask(MASK) - whatever mask you want to inspect. That's the entire configuration surface.
The single output is STRING - the shape report. On its own it does nothing visible; you need to route it into something that displays text, like a preview or "show text" node, before it's useful.
How to install it
Through ComfyUI Manager, search "DemonAlone-nodes-ComfyUI" and install. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/DemonAlone/SimpeStringGenerator_ComfyUI
then restart. The clone URL still says SimpeStringGenerator_ComfyUI - that's the original repo name and hasn't changed even though the pack now goes by "DemonAlone-nodes-ComfyUI" everywhere else, so don't be thrown if the folder that lands in custom_nodes doesn't match the name you searched for. It's a pure inspection utility, no models, nothing to download.
Common issues & troubleshooting
The output shows up as nothing. This node produces text, not a viewable value on its own - you have to wire STRING into a text-preview node to actually see it. If you dropped MaskDebugNode and got no visible result, that's the missing step, not a broken node.
A mismatch you couldn't see is exactly what this catches. A mask channel dimension or resolution that doesn't line up with the image you're compositing or inpainting onto is one of the more common silent failure points in a ComfyUI graph - the error, when it comes, usually names a tensor size and nothing about which node produced it. If a composite or mask-apply node further downstream is erroring, put this right before it and you'll see the actual batch/height/width you're holding instead of guessing from the stack trace.
No community trail to lean on. This is a small, low-adoption personal pack with essentially no presence outside its own repository, so there's nothing to search for on Reddit if something behaves oddly - the source is short enough to just read directly.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| mask | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |