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

FUSE KSampler (Video)

Fixing faces frame after frame without the flicker

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

The still-image FUSE KSampler works frame by frame, which is the whole problem with video. Run it on each frame independently and faces flicker between "fixed" and "not fixed," boxes jitter, and the result is unwatchable even though every individual frame looks fine - the KB's own upscaling doc calls that the definition of the video problem. FUSE KSampler (Video) exists to stop that. It takes a 4D image batch or a 5D video tensor, tracks each face across frames as one consistent identity, and processes each person as their own coherent video batch so the fix holds together over time.

You want this when you have generated video with mushy faces (LTX, Wan, Hunyuan - pick your model) and you want one node that does the face pass with temporal sense. It's also happy doing general-object enhancement if you point it at a non-face YOLO model.

How it works

The core loop is the FUSE machinery you already know - YOLO detect, crop, VAE-encode, sample, decode, blend back - but wrapped in a temporal layer. On a 5D input it runs detection per frame, then matches boxes across frames by IoU to assign each one a track id, so the same person stays the same person. Each track becomes its own video batch and is sampled as a unit, which is what gives you true temporal coherence instead of a per-frame gamble. Bounding boxes get temporally smoothed (so crops don't dance around the face) and you can tune all of it through the yolo_optionals input.

A few differences from the still version:

  • cfg defaults to 3.5, not 8.0 - video models (especially the 5D ones) don't want SD-class CFG.
  • model and vae should support video if your input is 5D. The node doesn't convert; it passes the tensor through to the sampler.
  • yolo_detector accepts prefixes - face/ for face models, yolo/ for general ones - which is how one node handles both jobs.
  • temporal_tracking (default on) is the kill switch. Turn it off and it behaves like the still version applied per frame, which you'll only want for debugging.

Inputs that matter

  • images - 4D image batch or 5D video tensor.
  • model / vae - video-capable for 5D input.
  • positive / negative, seed, steps, cfg, sampler_name, scheduler - standard sampler controls, with the low CFG default noted above.
  • denoise - 0.5 default; lower keeps the original actor's face, which matters more in video where you can't hide identity drift behind a single pretty frame.
  • face_id (-1 = all faces), face_order, face_size (512–1536), face_padding, force_square - the face-crop family, same as the still node.
  • yolo_detector / sam_segmenter / sam_model_type - detection and optional SAM masking.

Optional mask_optionals (blending/mask) and yolo_optionals (confidence + the tracking knobs like tracking_smooth_window) plug in as DICTs. Outputs: images and masks.

Installing it

Same pack, same story: FUSE Face Enhancer by WASasquatch, install via 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 face YOLO models into ComfyUI/models/yolo-face/, general ones into models/yolo/, SAM checkpoints into models/sams/.

Where people get burned

  • Still-image model on 5D input. If the model doesn't handle video tensors, sampling a 5D batch fails or silently degrades. Match the model to the input dimension.
  • Tracking tuning. Faces that move fast can jump between track ids - raise tracking_iou_threshold a little, and widen tracking_smooth_window only if crops look jittery (it must stay odd, 1–11). Too wide and crops lag on motion.
  • Expecting it to be cheap. This is the FUSE loop times the frame count. A 100-frame clip at face_size 512 is a real wait; drop to 512 and use FP16 YOLO (half_precision) before giving up on speed.
CategoryFace Enhancement/Video

Inputs (23)

NameTypeDefaultDescription
modelMODELBase model for sampling. Should support video if input is 5D.
vaeVAEVAE model for the sampler. Should support video if input is 5D.
imagesIMAGEInput image batch (4D) or video (5D) 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.
stepsINT20Number of steps for the sampler.
cfgFLOAT3.50Classifier-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.
yolo_detectorCOMBOChoose the YOLO detector to use for face detection. Prefix 'face/' for face-specific models, 'yolo/' for general YOLO models.
sam_segmenterCOMBOChoose the SAM segmentation model to use for face segmentation.
sam_model_typeCOMBOvit_bSAM model type
face_idINT0Index of the face to process (-1 for all faces).
face_orderCOMBOlinearOrder to process detected faces.
face_sizeCOMBO512The resolution to sample the face crop at.
face_paddingINT200–16384Padding in pixels to pad the face crop with.
force_squareBOOLEANtrueForce 1:1 square face crops
temporal_trackingBOOLEANtrueEnable temporal face tracking for video inputs.
mask_optionalsoptDICTOptional masking and blending settings from FUSESamplerMaskOptions node.
yolo_optionalsoptDICTOptional YOLO detection settings from FUSEYOLOSettings node.

Outputs (2)

NameTypeDescription
imagesIMAGE
masksMASK