๐ผโ Cut Image with Mask
Pull the masked region out as its own image
- image
- mask
- IMAGE
A small, focused node: give it an image and a mask, and it cuts the image using that mask. The author describes it in three words in his own README - "Cut an image from a mask" - and that's genuinely the whole feature. It's one of the pack's older nodes, present since early versions, and it's meant as a simple building block rather than a full masking toolkit.
Where it fits
This isn't trying to compete with a dedicated segmentation or detailing pack - it's the pack's own lightweight answer to "I already have a mask, now give me just that region as an image." That mask can come from anywhere: hand-painted in ComfyUI's mask editor, produced by a detector node from a pack like Impact Pack, or built from the Bjornulf pack's own Convert Mask to Rectangle nodes if you specifically want a clean rectangular cut rather than an irregular one. This node is the last step in that chain - the point where a mask becomes an actual cropped image you can process, save, or feed into something else on its own.
The inputs and outputs that matter
Two required inputs, nothing optional: image and mask. One output: IMAGE - the result of applying the mask to the image.
There's no exposed setting for how the edges are handled, no blur or feather option on this node itself - if you want soft edges going into the cut, apply that to the mask beforehand (the pack's Convert Mask to Rectangle (with Blur) node is built for exactly that if your source mask needs feathering first).
Installing it
Through ComfyUI Manager: search Bjornulf_custom_nodes, install, restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/justUmen/Bjornulf_custom_nodes
Install the shared requirements.txt afterward. This is basic image-array manipulation - no heavy dependency required, so it runs on a minimal install of the pack.
Where people get burned
Check your assumptions about output size before wiring this deep into a workflow: the README doesn't specify whether the result is cropped tight to the masked region or comes back at the original canvas size with everything outside the mask blanked out - that detail isn't documented, and it changes how you'd chain this into whatever comes next. Run it once with a Preview Image node attached and look at the actual dimensions before building automation around it. If a tight, predictable crop is specifically what you're after, running your mask through the pack's own Convert Mask to Rectangle first - so you're cutting with a clean rectangular region instead of an arbitrary shape - is the more reliable path either way.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | โ | |
| mask | MASK | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | โ |