ComfyUI Node

FUSE KSampler

FUSE KSampler is a face detailer hiding inside a sampler

By WASasquatch·Created about a year ago·Updated 10 months ago· 13
FUSE KSampler
  • model
  • vae
  • images
  • positive
  • negative
  • mask_optionals
  • yolo_optionals
  • images
  • masks
use_cachetrue
seed0
steps20
cfg8.00
sampler_name
scheduler
denoise0.50
yolo_detector
sam_segmenter
sam_model_typevit_b
face_id0
face_orderlinear
face_size512
face_padding20
force_squaretrue

You know the pain: the wide shot looks great, and then you zoom in and everyone's face is a soft, smeared mess. The standard fix is a detect-crop-refine loop - Impact Pack's FaceDetailer made that a ComfyUI habit - but it means wiring a detector, a crop, a separate sampler, and a paste-back together, plus the hook voodoo to make the detail pass actually run at a decent resolution. FUSE KSampler is that whole loop collapsed into one node that is also your sampler. You feed it an image, a model, and conditioning, and it finds the faces, re-samples each one at proper resolution, and stitches it back with a feathered seam.

The name is a small lie in a good way: it is not a drop-in replacement for the plain KSampler. It's a KSampler that does a face pass for you, every time you hit Execute.

How it works

Under the hood it's the same three-step loop the community converged on years ago, just packaged tighter. An ultralytics YOLO face model detects bounding boxes. Each box gets padded (and optionally forced square), cropped out of the full image, and resized up to face_size - 512 by default, or 768/1024 if you want a higher-resolution face pass. That crop is VAE-encoded and run through the ordinary ComfyUI sampler at denoise strength, then decoded and pasted back onto the original.

The "seamless embedding" in the pack name is the part that separates this from a sloppy paste. The pasted face is blended through a feather mask - blend_amount (default 0.3) controls how hard the re-sampled face replaces the original, blend_mode picks box or radial feathering. You can switch to a SAM face mask instead of the YOLO box (use_sam_mask) for a much tighter, hair-aware boundary, and color_transfer (lab, pdf, or mean_std) re-matches the pasted region's colors to the surrounding skin so there's no visible patch. If the whole thing feels like a lot of settings, that's why: the defaults work for a first pass.

There's also a real caching layer keyed by image hash and node id, so re-running with a changed prompt doesn't redo the YOLO detection or the crop math.

The inputs that matter

  • model / vae / images / positive / negative - it's a sampler, so wire it like one. images is the image you're fixing.
  • yolo_detector - pick a face-trained YOLO from the dropdown (empty dropdown = nothing in models/yolo-face yet; see below).
  • sam_segmenter + sam_model_type - required even if you don't use SAM for masking; vit_b is the light default.
  • face_size - the resolution the face crop is sampled at. 512 is fast, 1024 gives the detail pass more room.
  • denoise - 0.5 default. Lower adheres more to the original face, which keeps identity; above ~0.6 you're asking for a different person.
  • face_id (0 = first face, -1 = all faces) and face_order if you have a crowd.

Optional mask_optionals and yolo_optionals inputs take DICTs from the pack's two settings nodes - FUSESamplerMaskOptions for blending/mask tweaks, FUSEYOLOSettings for detection confidence and the like.

Outputs: images (the enhanced batch, same resolution as the input) and masks (the per-face blending masks, if you want to inspect or reuse them).

Installing it

FUSE ships in the FUSE Face Enhancer pack by WASasquatch - same author as the WAS Node Suite, which you may know as the big utility pack that got archived and forked in mid-2025. Easiest route is ComfyUI Manager: search "FUSE Face Enhancer" and install. Or, old school:

cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/face-upscaling-and-seamless-embedding
cd face-upscaling-and-seamless-embedding
pip install -r requirements.txt

Restart ComfyUI. Then the real work: the models aren't bundled. Drop a face YOLO (try the yolo-face repo, or the anime face release if you're fixing illustrations) into ComfyUI/models/yolo-face/, and a SAM checkpoint (vit_b/vit_l/vit_h from segment-anything) into ComfyUI/models/sams/.

Where people get burned

  • Empty dropdowns. The node lists whatever is in those model folders; if nothing's downloaded, you get no choices. This is the #1 "it's broken" report, and it isn't broken.
  • Torch 2.6+ pickle errors loading YOLO. The README's workaround is "use torch < 2.6," but the shipped code already registers the ultralytics classes via torch.serialization.add_safe_globals - update the pack and this mostly just works on modern torch.
  • Identity drift. The generative rung of upscaling rewrites faces by design (the KB calls this out plainly). Keep denoise low and blend_amount modest, or you get a prettier face that isn't the same person.
CategoryFace Enhancement

Inputs (22)

NameTypeDefaultDescription
modelMODELBase model for sampling.
vaeVAEVAE model for the sampler.
imagesIMAGEInput image batch for face detection and upscaling.
positiveCONDITIONINGPositive conditioning for the sampler.
negativeCONDITIONINGNegative conditioning for the sampler.
use_cacheBOOLEANtrueUse internal caching to speed up workflow iteration.
seedINT00–18446744073709550000Seed for the sampler. Used for determinisitc results with some models.
stepsINT20Number of steps for the sampler.
cfgFLOAT8.00Classifier-Free Guidance scale for the sampler.
sampler_nameCOMBOChoose the sampler to use for sampling.
schedulerCOMBOChoose the scheduler to use for sampling.
denoiseFLOAT0.500–1Denoising strength for the sampler. When doing img2img like FUSE, lower values adhere more to the input image (face).
yolo_detectorCOMBOChoose the YOLO detector to use for face detection. Must be trained on faces. See: https://github.com/akanametov/yolo-face
sam_segmenterCOMBOChoose the SAM segmentation model to use for face segmentation. See: https://github.com/facebookresearch/segment-anything?tab=readme-ov-file#model-checkpoints
sam_model_typeCOMBOvit_bSAM model type
face_idINT0Index of the face to process in the image (0 is the first face found, -1 is all faces).
face_orderCOMBOlinearOrder to process detected faces: linear (top-to-bottom, left-to-right), linear_reverse (bottom-to-top, right-to-left), largest_bbox (largest face first), smallest_bbox (smallest face first).
face_sizeCOMBO512The resolution to sample the face crop at.
face_paddingINT200–16384Padding in pixels (int) to pad the face crop with.
force_squareBOOLEANtrueForce 1:1 square face crops
mask_optionalsoptDICTOptional masking and blending settings from FUSESamplerMaskOptions node.
yolo_optionalsoptDICTOptional YOLO detection settings from FUSEYOLOSettings node.

Outputs (2)

NameTypeDescription
imagesIMAGE
masksMASK