Load Mask
Turn any PNG into a mask — the easiest way to get mask data in
- MASK
ComfyUI can generate masks all day, but sometimes the mask you need already exists - you drew one, an external tool exported one, or you saved one earlier with the pack's Save Mask node and want it back. Load Mask is the way in: it lists images in ComfyUI's input directory, and converts whichever you pick into a MASK tensor.
It's the smallest node in the pack and one of the most paired-with-others. The mask-from-file pipeline matters because mask-based inpainting still has a real niche in 2026 - the KB's analysis notes that instruction-editing models drift on repeated edits while a proper mask leaves unmasked pixels untouched. If you're doing the "draw a mask in an external editor, run a targeted inpaint pass" workflow, this is the bridge.
How it works
Drop an image (.png, .jpg, etc.) into ComfyUI's input folder - or use the upload button on the node's image dropdown, since it's a standard image_upload input. The dropdown is generated from whatever's in the input directory, so new files need the usual refresh to appear. On execution it loads the file and converts it to a grayscale MASK tensor - luminance becomes the mask weight, which is why a black-and-white PNG with white where you want to modify works exactly as expected.
The pair to know: Save Mask (also in this pack) writes MASK tensors to the output directory as PNGs. Load it here and you have a full round-trip - save a mask, reload it later, reuse it in a different workflow.
One output: MASK. Wire it into the mask input of an inpaint/unmask node, a mask composite, or the pack's own Resize Image Advanced, which will resize and align a mask in lockstep with an image.
Install
Ships with ComfyUI Text Processor:
cd ComfyUI/custom_nodes
git clone https://github.com/rookiestar28/ComfyUI_Text_Processor.git
pip install -r requirements.txt
Restart, or ComfyUI Manager → "ComfyUI Text Processor" → Install.
Gotchas
The usual input-directory rules apply: the dropdown is built at node load, so files added mid-session need a page refresh (F5) before they show. And remember it's luminance that becomes the mask - a soft gray will give you a partial mask, not a hard cut. If your mask edges look mushy, that's your source image, not the node. There's no RGB "which channel" confusion because it all collapses to grayscale - which is exactly what you want from a mask loader.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | Image from ComfyUI's input directory to convert into a grayscale mask. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASK | MASK | Loaded grayscale mask tensor. |