Nodes/ComfyUI LC MaskMaker Nodes/LC Detailer For Each (BETA) 🩹
ComfyUI Node

LC Detailer For Each (BETA) 🩹

One Redraw Per Character, With Its Own Seed β€” Goodbye Clone Crowd

By lonecatone23Β·Created 2 months agoΒ·Updated a day agoΒ· 18
LC Detailer For Each (BETA) 🩹
  • sam3_mask
  • pipe
  • image
  • model
  • vae
  • positive
  • inpaint_positive
  • negative
  • pipe
  • image
  • mask
β—„grow4.0β–Ί
β—„feather8.0β–Ί
β—„padding64β–Ί
β—„inpaint_resolution1024β–Ί
β—„sampler_nameβ–Ύβ–Ί
β—„schedulerβ–Ύβ–Ί
β—„steps20β–Ί
β—„cfg1.0β–Ί
β—„denoise0.30β–Ί
β—„seed0β–Ί
β—„tone_matchtrueβ–Ί

What it is

The last of three nodes that together rebuild Impact Pack's SEGS chain on top of SAM 3. LC Detail Finder detects, LC Detail Sorter puts the matches in order and hands out one wire per match, and LC Detailer For Each redraws what it's handed.

The reason to care is the seed. In a classic detailer, every detected face re-renders on the same base seed as the parent image, which is why a good crowd comes back as a room of near-identical people. Here each For Each node has its own seed, model (LoRA branch), inpaint_positive and denoise. Character two gets a different seed, so character two gets a different face.

How it works

LC Smart Detailer's engine underneath - the same crop, redraw and blend code as the other detailers - but it detects nothing. What it receives is one LC_SAM3_MASKS bundle: masks, the picture's size, and which prompt produced them.

Wire it LC Detail Finder's sam3_masks and it redraws every match; wire it output 1 of LC Detail Sorter and it redraws only that one. Per character it crops with padding of context, scales to about inpaint_resolution squared pixels, does a masked redraw with your sampler settings, then pastes back feathered and tone-matched so the seam doesn't show.

Two mechanisms worth naming:

  • The blend is fixed at 1.0. There's no blend widget on this node - the whole redraw gets pasted. If you want a lighter touch, lower denoise instead, which is better practice anyway (a half-blend gives you two sets of eyelashes).
  • Picture and masks must match. The masks carry the size they were found at, and the node hard-errors if the image is a different size: "The picture is 1024x1024 but the SAM 3 masks were made on 832x1216: find on the same picture." Do the resizing before the Finder, not between the Finder and here.

It's an output node too, so each character previews on its own node - handy for comparing A and B.

The inputs worth setting

Required, beyond the mask: grow (4 px default, covers the mask edge), feather (8), padding (64 px of context), inpaint_resolution (1024), sampler_name, scheduler, steps, cfg, denoise, seed.

The ones a beginner actually tunes:

  • denoise - 0.3 is the face starting point. Since blend is fixed at 1, this is your only "how much did it change" dial.
  • seed - give every character a different one. This is the whole reason you're running three nodes instead of one.
  • cfg - defaults to 1, and can't go below it (below 1 you get speckle). Fine for Flux, Krea 2, Z-Image and SDXL at detailer denoise.

Optional: pipe plus image, model, vae, positive, inpaint_positive, negative, tone_match. With a pipe wired, the pipe fills in model, VAE, prompts and picture, and anything wired on the node beats the pipe. Two rules that trip people up: sampler_name, scheduler, steps and seed come from the pipe unless something is plugged into that widget, and with no prompt in the pipe you must wire inpaint_positive or the node refuses to run.

Outputs are pipe, image and mask. The pipe goes onward - to the next character, or to LC VOSR2 Upscale (pipe), which wants the accumulated redrawn-area mask the detailers leave behind.

Install

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

Or ComfyUI_LC_MaskMaker_nodes in Manager. This node has no model of its own - no SAM 3 call, no download. The SAM 3 checkpoint is the Finder's business (1.7 GB into models/sam3, once for the whole pack). What it does need is a model and a VAE, wired or via a pipe; it can't infer them from the mask bundle.

Common issues

Size mismatch error. You resized or cropped between the Finder and here. The masks are tied to the picture they were found on - find again, or move the resize later.

"Nothing to redraw (this output is empty). Image passed through." It happens when you wire Sorter output 5 in a two-person image - the Sorter emits empty bundles for empty slots. Not an error; the image is unharmed.

Every character drifted the same way. Check for a shared seed and an identical positive. Two characters differing only in LoRA will still converge.

Prompt bleed into the crop. A scene-wide positive lands inside a face-sized crop at 0.3 denoise and up. Wire inpaint_positive - close-up of a woman's face, natural skin - and keep the scene prompt for the main render.

One ordering rule from the wider detailing habit: detail at native resolution first, then upscale. The other way bakes the broken face into more pixels and you pay twice.

CategoryLC MaskMaker/detailer

Inputs (19)

NameTypeDefaultDescription
sam3_maskLC_SAM3_MASKSWhat to redraw: one output of LC Detail Sorter (one character), or LC Detail Finder's sam3_masks (all of them).
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.
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. With a pipe wired, the pipe's value is used unless something is plugged in here.
schedulerCOMBOScheduler. With a pipe wired, the pipe's value is used unless something is plugged in here.
stepsINT201–150Sampling steps. With a pipe wired, the pipe's value is used unless something is plugged in here.
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. With a pipe wired, the pipe's value is used unless something is plugged in here.
pipeoptLC_PIPEOptional LC pipe: model, VAE, positive, negative and picture come from here unless wired on this node. Chain the detailers through it.
imageoptIMAGEThe picture. Empty = the pipe's picture.
modeloptMODELOptional. Wire a model here to use it instead of the pipe's (with LoRAs on it, or a different model).
vaeoptVAEOptional. Wire a VAE here to use it instead of the pipe's.
positiveoptCONDITIONINGThe 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.
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).

Outputs (3)

NameTypeDescription
pipeLC_PIPEβ€”
imageIMAGEβ€”
maskMASKβ€”