Krita Mask Layer
Krita Mask Layer
- mask
Krita Mask Layer is the mask counterpart to Krita Image Layer, and like the rest of the "krita" nodes in this pack, it's a piece of interop plumbing rather than something you'd normally wire up yourself. Its job: take a specific mask or layer you've painted in Krita, referenced by name, and turn it into a ComfyUI MASK that the generation workflow can use - for inpainting, for a region, for a Set Latent Noise Mask, whatever the graph needs.
To make sense of why it works this way, you have to know what it's part of. Acly - the author of this pack - also builds Krita AI Diffusion, one of the more popular ways to run Stable Diffusion inside a real painting application. The pitch is compelling for anyone who actually draws: instead of bouncing between a canvas and a separate generation UI, you inpaint and generate on the same layered document you're painting on. Krita has the mask interface a lot of people wish ComfyUI had natively - a proper brush, on a real canvas, with a tablet. This node is how a mask painted there crosses over into the ComfyUI backend that the plugin drives. Painting a mask by brush and having generation respect it is exactly the workflow the community keeps recommending for clean inpainting, and this is the seam that makes it possible.
The mechanism is a name lookup resolved at runtime. When the plugin sends its API-format workflow to ComfyUI, it also supplies the document's layer data; this node matches the name you gave it to a layer/mask in that document and outputs the pixels as a single-channel mask.
The schema is about as small as a node gets:
- name (STRING, default
"Mask") - the name of the Krita mask or layer to pull. That's the whole input.
And one output:
- mask (MASK) - the resulting single-channel mask, ready to drive an inpaint, a noise mask, or a region.
Where Krita Image Layer gives you both color and alpha, this one is mask-only and to the point - you painted a mask, you get a mask.
Installation is the pack's standard route: search "ComfyUI Nodes for External Tooling" in ComfyUI Manager, or cd custom_nodes && git clone https://github.com/Acly/comfyui-tooling-nodes.git from your ComfyUI directory and restart. No dependencies, no downloads. The catch that matters is the same as its sibling's: the real prerequisite is the Krita AI Diffusion plugin on the Krita side, which is what feeds this node. The plugin bundles and manages this pack as part of its setup, so most Krita users never touch the install directly.
The number-one gotcha is placing this node in a plain browser ComfyUI graph and expecting it to do something. It won't - there's no Krita document sending mask data, so the receiver has nothing to receive. That's by design, not a fault. The other common snag, when you are running through the plugin, is a name mismatch: the name field must match the Krita layer or mask name exactly. Rename the layer in Krita, forget to update the node, and the mask comes back empty. Case and spelling count.
So: if you found this node hunting for a way to load a hand-painted mask into a standalone ComfyUI workflow, this isn't it - use a mask editor or Load Image. But if you paint and the idea of masking with a real brush on a real canvas appeals, Krita AI Diffusion is worth the look, and Krita Mask Layer is one of the small, unglamorous parts that make the round-trip between your canvas and the diffusion model actually work.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| name | STRING | Mask | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mask | MASK | — |