Nodes/Forbidden Vision/Forbidden Vision 🧩 Face Edit Prep
ComfyUI Node

Forbidden Vision 🧩 Face Edit Prep

Grab just the face, not the whole workflow

By luxdelux7·Created about a year ago·Updated about a month ago· 101
Forbidden Vision 🧩 Face Edit Prep
  • image
  • mask
  • cropped_face
  • cropped_mask
  • face_info
face_selection0
enable_segmentationtrue
detection_confidence0.80
processing_resolution1024
crop_padding1.6
mask_expansion2
sampling_mask_blur_size21
sampling_mask_blur_strength1.0
enable_pre_upscaletrue
upscaler_modelFast 4x (Lanczos)
isolate_facefalse

The Fixer is all-in-one: it detects, inpaints, and composites in a single node. That's great until you want to do the editing part yourself - run the crop through an external editor, a hand-drawn mask, or a node that isn't the pack's own sampler. Face Edit Prep is the "give me the raw material" half of that workflow. It runs the same detection and segmentation models as the Fixer, but instead of sampling anything it hands you a cropped face, a clean mask, and the geometry you'll need to put the result back.

What it outputs

Three things, and the third is the clever one:

  • cropped_face - the face region, squared up to processing_resolution (default 1024) with crop_padding (default 1.6) of surrounding context so an editor sees lighting and style, not just skin.
  • cropped_mask - the segmentation mask for that crop.
  • face_info - a FACE_INFO packet that records where the crop came from in the original image, the rotation that was applied, and the mask geometry. This is the glue: you feed it to the sibling Face Edit Merge node later so it knows exactly where and how to stitch your edited face back.

You set the usual suspects: face_selection (0 = all faces, or target a specific one), detection_confidence (default 0.8), enable_segmentation (contour masks on, oval fallback off), plus the mask-processing trio of mask_expansion, sampling_mask_blur_size, and sampling_mask_blur_strength. enable_pre_upscale + upscaler_model bump small faces up to a workable resolution before cropping, which matters if you're editing a face that was 60 pixels wide in the original.

The one input that changes everything

The optional mask input. If you feed one in, detection is skipped entirely - the node crops around your mask instead of hunting for faces. That's the escape hatch when the YOLO detector misses a heavily stylized face or you want to edit a region that isn't a face at all. isolate_face is the other flag worth knowing: when on, it isolates the face from hair and background context in the crop, which is handy if your downstream edit cares only about skin.

How to use it in a workflow

Load Image → Face Edit Prep → cropped_face → (your own edit: manual inpaint,
                                              another node, an external app)
                         → face_info ─────────────┐
                         → cropped_mask ──────────┤
                                                  ▼
                         edited face → Face Edit Merge → final_image

The pair ships together, and the README's example workflows show the same detection models doing the work, so what you see in the preview is what the Fixer would have found - just with the sampling step handed to you. It's the right node when you want control over the edit itself, at the cost of wiring up a few more connections than the all-in-one Fixer.

CategoryForbidden Vision

Inputs (13)

NameTypeDefaultDescription
imageIMAGEInput image for face crop and mask.
face_selectionINT00–200=All faces, 1=1st face, etc.
enable_segmentationBOOLEANtrueUse AI segmentation. If disabled, creates oval masks.
detection_confidenceFLOAT0.800.1–1
processing_resolutionINT1024512–2048
crop_paddingFLOAT1.61–3
mask_expansionINT20–100
sampling_mask_blur_sizeINT210–101Blur kernel size for the output mask. 0 or 1 = no blur.
sampling_mask_blur_strengthFLOAT1.00.1–6Controls blur sigma relative to kernel size.
enable_pre_upscaleBOOLEANtrue
upscaler_modelCOMBOFast 4x (Lanczos)4 options: Fast 4x (Bicubic AA), Fast 4x (Lanczos), Fast 2x (Bicubic AA), Fast 2x (Lanczos)
isolate_faceBOOLEANfalse
maskoptMASKOptional external mask. If provided, detection is skipped.

Outputs (3)

NameTypeDescription
cropped_faceIMAGE
cropped_maskMASK
face_infoFACE_INFO