Nodes/ComfyUI LC MaskMaker Nodes/LC Character Detailer (BETA) 🩹
ComfyUI Node

LC Character Detailer (BETA) 🩹

Detailing One Face at a Time

By lonecatone23Β·Created 2 months agoΒ·Updated about 11 hours agoΒ· 18
LC Character Detailer (BETA) 🩹
  • image
  • model
  • vae
  • positive
  • inpaint_positive
  • negative
  • elements
  • image
  • mask
β—„promptFaceβ–Ί
β—„sam3_modelβ–Ύβ–Ί
β—„threshold0.50β–Ί
β—„pickleft to rightβ–Ί
β—„number1β–Ί
β—„grow4.0β–Ί
β—„feather8.0β–Ί
β—„blend0.80β–Ί
β—„padding64β–Ί
β—„inpaint_resolution1024β–Ί
β—„sampler_nameβ–Ύβ–Ί
β—„schedulerβ–Ύβ–Ί
β—„steps20β–Ί
β—„cfg1.0β–Ί
β—„denoise0.30β–Ί
β—„seed0β–Ί
β—„tone_matchtrueβ–Ί

The problem it actually solves

A detail pass is the oldest trick in this hobby: the model has no latent budget for a face occupying 80 pixels of a 1024px frame, so you crop that face, re-render it at a proper resolution and paste it back. Impact Pack's FaceDetailer made that routine - right up until your image has two people in it, because a detailer treats every detected face identically. Same model, same prompt, same seed. Do that to a crowd and you get a room of clones.

LC Character Detailer is the blunt fix. SAM 3 finds every match and only one of them gets redrawn. You run one of these per character: branch the model, put that character's LoRA on the branch, point the node at their face. Two people, two nodes, no crossover.

How it works

No YOLO weights involved - the finding is promptable segmentation. You type simple words (face, hands) and SAM 3 returns a mask per instance; under the hood this node asks ComfyUI's built-in SAM 3 detector for up to 16 instances per word, so "hands" really does find both hands instead of the first one.

Then it measures every mask: centre of mass and area. That's what pick sorts on - left to right numbers them by horizontal centre, largest first by area - and number says which one this node cares about. Extra words like face, hair only come along when they belong to the picked match: at least 60% of the hair mask has to sit inside the face mask's box grown by its own size. That's how you get her hair rather than the hair of the person behind her.

From there it's the LC Smart Detailer engine: crop with padding context, scale to roughly inpaint_resolution squared pixels, masked redraw, paste back with a feathered edge and the seam colour matched. The preview numbers every match the way pick counts them, the redrawn one highlighted, so you can read the right number straight off the image.

The inputs worth setting

Defaults are sensible; these are the ones you'll touch:

  • prompt - what to find, default Face. Comma-separated words, and face:1 caps it.
  • pick + number - which match gets redrawn. in box is the interesting one: it takes elements from LC Bounding Boxes (a node in the companion LC123 pack), and the face stays with its character even when the pose changes.
  • denoise - 0.3 is the author's starting point for faces. Low keeps the shape and fixes detail; high redraws from scratch and drifts the identity you're protecting.
  • inpaint_positive (optional) - a short prompt for the crop, like close-up of a woman's face, natural skin. If your positive describes the whole scene, at denoise 0.3 and up the model will paint a tiny version of that scene into the face.
  • cfg - defaults to 1 and refuses to go lower (below 1 the redraw is speckled). 1 is fine for Flux, Krea 2, Z-Image and even SDXL at detailer denoise. Wire negative only if your model uses one.

Outputs are image and mask. The mask is worth wiring somewhere: feed it to protect_mask on the pack's skin-detail nodes so they don't re-grain what the detailer just fixed.

Install

Via ComfyUI Manager, search ComfyUI_LC_MaskMaker_nodes, or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/lonecatone23/ComfyUI_LC_MaskMaker_nodes
# restart ComfyUI

The pack's install.py only tops up transformers and huggingface_hub when they're missing, never touches torch/numpy/Pillow, and bundles no weights. Two things you do need:

  1. A ComfyUI with built-in SAM 3 support. The pack calls comfy_extras.nodes_sam3; an older build gets "This ComfyUI has no built-in SAM 3 support. Update ComfyUI." Update and restart.
  2. The model. First use downloads sam3.1_multiplex_fp16.safetensors (1.7 GB) into models/sam3. Your own sam3.pt in models/sam3, models/detection or models/checkpoints is picked up instead.

Common issues

"Nothing redrawn: only 2 found, there is no number 3." It did what you told it, and the image passed through untouched. Change number, and check the preview - it counts by centre, not in the order SAM 3 returned things.

Wrong character redrawn. Look at the preview before touching denoise - the numbers drawn on the node are the numbers it uses.

The redraw is drastic. Drop denoise rather than blend - blending old and new pixels can leave you with two sets of eyelashes.

Fair warning: this pack is young and the nodes need a local install, so on a hosted ComfyUI platform you're waiting on the host to add it.

CategoryLC MaskMaker/detailer

Inputs (24)

NameTypeDefaultDescription
imageIMAGEβ€”
modelMODELβ€”
vaeVAEβ€”
positiveCONDITIONINGThe image's prompt. A prompt describing the whole scene can get drawn into every crop at denoise 0.3 and up (a whole tiny scene in the face): wire inpaint_positive to prevent that.
promptSTRINGFaceWhat to detail, as simple words separated by commas: hands, face. Every match is found (both hands, every face). Add :N to cap it, e.g. face:1.
sam3_modelCOMBOSAM 3 model that does the finding. Pick the SAM 3.1 download, or use your own sam3.pt / sam3.safetensors in models/sam3.
thresholdFLOAT0.500.05–0.95How sure SAM 3 has to be. Lower finds more (and more wrong things), higher is pickier. 0.5 is a good start. Colors are only a hint: 'red dress' can still pick a green dress. Things that are not there are not found.
pickCOMBOleft to rightWhich match this detailer redraws (SAM 3 finds them all). With several words (face, hair) the first one picks the person and the others come along when they belong to them. left to right / right to left / top to bottom: number 1 = the first one that way. largest first: number 1 = the biggest. in box: the one inside box 'number' of LC Bounding Boxes (wire its elements): the face stays with its character even when the pose changes.
numberINT11–32Which one: 1 = the first. With pick on in box, the box's number as shown on LC Bounding Boxes.
growFLOAT4.0-64–256Pixels to grow (positive) or shrink (negative) the mask before inpainting. Growing a little covers the edges.
featherFLOAT8.00–128Softness of the mask edge in pixels, so the redrawn area blends into the rest. 0 = hard edge.
blendFLOAT0.800–1How much of the redraw is pasted in: 1 = all of it. Below 1 the old and new pixels are mixed, and features the redraw moved a little (lashes, eyelids) can show twice. For a lighter redraw, lower denoise instead.
paddingINT640–1024Pixels of the surrounding image included with each crop, so the model sees the context.
inpaint_resolutionINT1024256–4096Each crop is redrawn at about this many pixels squared (1024 = 1 megapixel), whatever its shape. Higher = more detail, slower.
sampler_nameCOMBOSampler.
schedulerCOMBOScheduler.
stepsINT201–150Sampling steps.
cfgFLOAT1.01–30CFG for the redraw. 1 works for Krea 2, Flux, Z-Image, Anima and, at detailer denoise (up to about 0.4), SDXL too (tested: SDXL looked the same at cfg 1 to 7). Never goes below 1: below 1 the redraw comes out speckled.
denoiseFLOAT0.300–1How much is redrawn. Low keeps the shape and fixes details, high redraws from scratch.
seedINT00–18446744073709550000Seed for the redraw.
inpaint_positiveoptCONDITIONINGOptional. A prompt for the crops only, e.g. 'close-up of a woman's face, natural skin'. Used instead of positive for the redraw. Recommended whenever positive describes the whole scene.
negativeoptCONDITIONINGOptional. Leave empty for cfg 1 models; wire it for SDXL and other models that use a negative.
tone_matchoptBOOLEANtrueOn: the redraw gets the original's brightness, contrast and colour back where it is pasted, keeping the new detail. A light redraw comes back a little flat and dull without it. Turn off when the redraw is meant to change colours (a new shirt colour, a different object).
elementsoptARRAYLC Bounding Boxes' elements, for pick = in box.

Outputs (2)

NameTypeDescription
imageIMAGEβ€”
maskMASKβ€”