DiT360 Mask Processor
Your paint blob becomes a mask the editor can actually read
- mask
- image_mask
- MASK
Every editing workflow in ComfyUI-DiT360Plus needs a mask, and masks in the wild are messy. You painted something in your image editor, or a node handed you a soft-edged grayscale thing, and the panorama editor wants a clean binary decision: this pixel is in, that pixel is out. DiT360 Mask Processor is the small node that sits between your paint job and the editor and makes that decision for you.
What it does
One job, done in a few steps under the hood: take whatever mask-like thing you give it, normalize it, and threshold it to pure black and white.
- mask (required) - a ComfyUI
MASK. Convention is white (1.0) = area of interest. - image_mask (optional) - the alternative input. If your mask lives as a regular image (say, a saved PNG with a painted region), feed it here instead and it gets converted to grayscale by averaging the color channels. Handy when the mask comes out of an image editor rather than a node.
Output is a single MASK in (1, H, W) form, binarized so every pixel is 0 or 1 - no soft gradients surviving. The threshold is 0.5, so your paint should be clearly white on black, not a hazy gray scribble.
The canonical wiring in the pack's RF-inversion workflow:
Load Image (mask) -> DiT360 MaskProcessor -> DiT360 Panorama Editor
The thing people get tripped up on
This node normalizes the format, it does not decide the meaning. The editor's mode setting decides what white means:
inpaint- white = the area to regenerateoutpaint- white = the content to keep, black = what to extend into
So the exact same processed mask does opposite things depending on the editor mode. If your edit comes out backwards - you asked to change the sky and it preserved the sky - the mask isn't wrong, the mode is. Swap modes and move on.
Why bother with it at all?
You could wire a raw mask straight into the editor; it accepts MASK input. The reason to route through this node is that it normalizes three failure modes at once: an image that arrived with values in 0–255 instead of 0–1, a mask with stray channel depth, and a soft anti-aliased edge that makes the editor hesitate between "keep" and "replace". Binarize first, and your edits behave predictably.
Where it sits in the pack
It's the quiet utility member of the family - the kind of node you'll forget exists until you're debugging a weird half-edit, at which point you realize the mask you painted had a feathered edge and the editor was fumbling with it. One 30-second detour through the Mask Processor fixes the whole category. It's also useful outside the pack: any ComfyUI inpainting workflow that wants a hard-edged mask can take one here.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| mask | MASK | Input mask. White (1.0) = area of interest. | |
| image_maskopt | IMAGE | Alternative: use an image as mask (converted to grayscale). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASK | MASK | — |