Mpi Mask Debug Info
What's in that mask, really? Shape, dtype, device — printed and wired
- mask
- shape
- dtype
- device
A mask arrives looking wrong - too small, on the wrong device, or in a shape that's making every downstream node complain. You can't inspect a tensor by squinting at it, so Mpi Mask Debug Info does it for you: one mask input, and it prints the shape, data type, and device to the console and hands all three back as string outputs. It's a debug node that also happens to be a little introspection utility, and it's the fastest way to answer "what the hell is this mask?"
The three outputs are shape (e.g. torch.Size([1, 512, 768])), dtype (e.g. torch.float32), and device (e.g. cuda:0 or cpu) - all as plain strings, so you can wire them into a text display or log them somewhere if you're building a host app. The same three lines are printed to the server console with a "Mask Debug Info:" header. Because the node has real outputs rather than being a pure sink, you can drop it inline in a mask chain without breaking the data flow - the mask passes through (well, it's not passed through as a mask; the node only forwards the metadata strings), so you can debug without re-plumbing your graph.
Honest use case: masks are one of the fiddliest data types in ComfyUI, and a surprising share of "my inpaint is broken" problems are actually "my mask is 1×1" or "my mask is on CPU and the image is on CUDA" or "my mask batch dim is 4 when I expected 1." One pass through this node at the failure point tells you which of those it is. If you've got a mask pipeline - detect, blur, square, invert - putting a debug info node after each step and reading the console after a run shows you exactly where the shape stops being what you expect.
The usual caveat for debug nodes applies: don't leave a chain of these in a finished workflow. They cost almost nothing (a few string conversions), but they also contribute nothing, and a console full of mask dumps is how you miss the one log line that matters. Add it, fix the problem, delete it.
Also worth knowing: this is category MpiNodes/Debug - the pack has a dedicated debug bucket, which tells you the authors treat introspection as a first-class utility, not an afterthought. If you're building a workflow for someone else (or for a host app like the pack's own Cubric Vision), the string outputs mean the diagnostics can travel as data, not just as terminal noise.
Install is the pack's standard no-drama deal: ComfyUI Manager → search "ComfyUi-MpiNodes" → install → restart, or
cd ComfyUI/custom_nodes
git clone https://github.com/MadPonyInteractive/ComfyUi-MpiNodes
No dependencies, no models. Part of the Mad Pony Interactive utility pack. It won't fix the mask - that's on you - but it will tell you, in about two seconds, which of the dozen possible things about that tensor is wrong.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| mask | MASK | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| shape | STRING | — |
| dtype | STRING | — |
| device | STRING | — |