ComfyUI Node

FC CropMask

FC CropMask — cut a face region out and get its mask in one shot

By THtianhao·Created 3 years ago·Updated about a year ago· 147
FC CropMask
  • image
  • face_box
  • IMAGE
  • MASK

FC CropMask is a small utility from ComfyUI-FaceChain's crop-and-mask family: give it an image and a face box, and it returns the cropped region plus the matching mask. It's the "you already know where the face is, just slice it out" node - no detection run, no surprises, just a crop keyed to the box you hand it.

Where FC FaceDetectCrop finds the face and crops it, this node skips the finding step entirely. That makes it useful in two situations: when you already have a box from another detector and want a clean crop + mask pair, or when you're rebuilding a graph manually and want explicit control over which region gets cut.

Inputs

  • image (IMAGE) - the source photo.
  • face_box (BOX) - the bounding box of the region to crop. This is the same BOX type that FC FaceDetectCrop outputs, so if you have one of those lying around on your graph, it plugs straight in.

Outputs: the cropped IMAGE and the cropped region as a MASK (matching the crop's dimensions, white inside the box). Both go downstream to whatever needs them - typically a sampler for the image and a compositing node for the mask.

The honest framing

A couple of things to know before you lean on it. First, this node class is one of the older/underscore names in this pack's history - the currently-shipped node list has FC FaceDetectCrop as the main crop entry point, and its output box is what this node expects. If you load an old workflow that references FC_CropMask, you'll get a "node not found" until you swap it for the current name or re-save the workflow. Second, there's no face-detection fallback here: if you feed it a box from a face that doesn't exist, or a box computed for a different image, the crop is just whatever that box covers. Garbage in, garbage out - the node won't save you from yourself.

Install

It's part of ComfyUI-FaceChain: ComfyUI Manager (search "ComfyUI-FaceChain") or git clone https://github.com/THtianhao/ComfyUI-FaceChain into custom_nodes/, then restart. Pure image math, so no per-run model downloads for this node - though the pack as a whole installs its heavy dependency stack at startup (onnxruntime-gpu, mmdet, mmcv, modelscope, insightface…) and downloads its ModelScope models on first use elsewhere.

If you're new to this pack, you can honestly skip this node - FC FaceDetectCrop covers most of what it does with detection included. But when you're assembling a custom graph and already have a box, it's the direct route to a crop + mask pair without running a detector twice.

Categoryfacechain/mask

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
face_boxBOX

Outputs (2)

NameTypeDescription
IMAGEIMAGE
MASKMASK