Nodes/FUSE Face Enhancer/FUSE KSampler (Generic)
ComfyUI Node

FUSE KSampler (Generic)

The same detect-crop-fix loop, now for hands and anything else

By WASasquatch·Created about a year ago·Updated 10 months ago· 13
FUSE KSampler (Generic)
  • 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
mask_id0
mask_orderlinear
mask_size512
mask_padding20
force_squaretrue

FUSE KSampler (Generic) is the same machine as the face version, with the face-specific naming scrubbed out so you can point it at anything a YOLO model can find. Faces are just the most famous thing that gets mangled at small sizes - hands are the other one, and objects, and anything you want to isolate, re-sample at proper resolution, and blend back in cleanly. Where FUSE KSampler reads face_size, face_id, and a face-trained detector from models/yolo-face, this one reads mask_size, mask_id, and pulls detectors from the general models/yolo folder.

If you're only fixing portraits, use the face version and don't think about this one. Reach for Generic when your problem isn't a face.

How it works

Mechanically identical to the face node: YOLO detects boxes on the input image, each box gets padded and optionally forced square, cropped, resized to mask_size (512 default, up to 1536), VAE-encoded, run through the normal ComfyUI sampler at denoise strength, decoded, and pasted back with feathered blending. The mask_id (-1 for all) and mask_order (linear, largest bbox, etc.) controls pick which detected region gets processed when there are several. Same caching by image hash, same images + masks outputs.

The difference is what you can hang off it:

  • Hands. A hand detector (there are YOLO hand models in the same ecosystem) plus a model that's decent at hands, and you get a hands detail pass without buying into a hand-specific inpainting workflow. This is the most common reason people grab this node.
  • General object isolation. Anything a generic YOLO model has classes for - cars, people, animals. You get the crop-and-fix loop plus class filtering via the yolo_optionals input.
  • Per-class targeting. Combined with FUSE YOLO Optionals, set class_filter to the class you care about so the sampler ignores everything else in the frame.

Inputs that matter

  • model / vae / images / positive / negative - same sampler wiring as always.
  • yolo_detector - now sourced from models/yolo/ (general models), not models/yolo-face/. Different folder, different dropdown.
  • sam_segmenter + sam_model_type - SAM is still there for contour-accurate masks instead of box feathering.
  • mask_size - the sampling resolution for the crop. 512 is fast; 1024+ for a serious detail pass.
  • denoise - lower sticks closer to the original region, which matters more here: you usually want to fix a hand, not invent a new one, so start around 0.4–0.5.

Optional mask_optionals and yolo_optionals inputs take the same DICTs as the face version.

Outputs: images (the fixed batch) and masks (the per-region blend masks).

Installing and the model folders

Same pack, same install - it's all in FUSE Face Enhancer by WASasquatch, installable from ComfyUI Manager or:

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, then put general YOLO models in ComfyUI/models/yolo/ (the face models live in models/yolo-face/; they don't cross over). SAM checkpoints go in models/sams/ regardless.

The traps

  • Wrong folder. Putting a face model in models/yolo/ (or vice versa) and wondering why the dropdown is empty - the node only lists the folder it's wired to read.
  • Detecting faces with a general model. A generic YOLO will happily call a face "person" and crop the whole torso. That's what class_filter and a proper model are for.
  • Expecting the face version's defaults. The blending and color controls behave identically, but the thing you're fixing is no longer a face, so the "don't drift identity" advice transfers to "don't redraw the object." Keep denoise modest or you're doing generation, not repair.
CategoryGeneric Enhancement

Inputs (22)

NameTypeDefaultDescription
modelMODELBase model for sampling.
vaeVAEVAE model for the sampler.
imagesIMAGEInput image batch for mask 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 (mask).
yolo_detectorCOMBOChoose the YOLO detector to use for mask detection.
sam_segmenterCOMBOChoose the SAM segmentation model to use for mask segmentation. See: https://github.com/facebookresearch/segment-anything?tab=readme-ov-file#model-checkpoints
sam_model_typeCOMBOvit_bSAM model type
mask_idINT0Index of the mask to process in the image (0 is the first mask found, -1 is all masks).
mask_orderCOMBOlinearOrder to process detected masks: linear (top-to-bottom, left-to-right), linear_reverse (bottom-to-top, right-to-left), largest_bbox (largest mask first), smallest_bbox (smallest mask first).
mask_sizeCOMBO512The resolution to sample the mask crop at.
mask_paddingINT200–16384Padding in pixels (int) to pad the mask crop with.
force_squareBOOLEANtrueForce 1:1 square mask crops
mask_optionalsoptDICTOptional masking and blending settings from FUSESamplerMaskOptions node.
yolo_optionalsoptDICTOptional YOLO detection settings from FUSEYOLOSettings node.

Outputs (2)

NameTypeDescription
imagesIMAGE
masksMASK