Aller au contenu
Node packVérifiéExterne
Ouvrir la source

face-upscaling-and-seamless-embedding

FUSE KSampler is a face-aware KSampler node for ComfyUI that provides seamless face upscaling and embedding capabilities using YOLO face detection and SAM (Segment Anything Model) for precise masking.

FamilleYOLOMainteneur@WASasquatchUnratedClasse

Profil du package

Statut
Vérifié
Éditeur
@WASasquatch
Source
GitHub

LIREMOI

Face Upscaling and Seamless Embedding (FUSE)

FUSE is an All-in-One Face Fix KSampler for ComfyUI that provides seamless face upscaling and embedding capabilities using YOLO face detection and SAM (Segment Anything Model) for precise masking.

Before and After Examples

Installation

Navigate to your ComfyUI's custom nodes

cd custom_nodes

Clone FUSE nodes.

git clone https://github.com/WASasquatch/face-upscaling-and-seamless-embedding

Navigate to the FUSE directory

cd face-upscaling-and-seamless-embedding

Install dependencies to your Python Environment used by ComfyUI

pip install -r requirements.txt

Models

YOLO Face Models

You'll need to download some YOLO Face models. You can find some from:

Models should be placed in the models/yolo-face/ directory.

YOLO Models

You'll need to download some YOLO models. You can find some from:

Models should be placed in the models/yolo/ directory.

SAM Models

You'll also need to download some SAM models. You can find official models from:

Models should be placed in the models/sams/ directory.

Nodes

FUSEKSampler

Advanced face-aware sampling node that combines YOLO face detection, SAM segmentation, and seamless blending. Features include:

  • Intelligent face detection and cropping with adjustable padding and size
  • Optional square crop enforcement for consistent face processing
  • Multiple blending modes (box/radial) with configurable strength
  • SAM-based precise face masking
  • Color preservation options using various transfer methods (LAB, PDF, mean-std)
  • Internal caching system for faster workflow iteration
  • Support for processing specific faces using face index
ParameterDescriptionTypeDefaultValue Range
modelBase model for samplingMODELRequiredN/A
vaeVAE model for the samplerVAERequiredN/A
imagesInput image batch for face detection and upscalingIMAGERequiredN/A
positivePositive conditioning for the samplerCONDITIONINGRequiredN/A
negativeNegative conditioning for the samplerCONDITIONINGRequiredN/A
use_cacheUse internal caching to speed up workflow iterationBOOLEANTrueTrue/False
seedSeed for deterministic resultsINT0≥ 0
stepsNumber of steps for the samplerINT20≥ 1
cfgClassifier-Free Guidance scaleFLOAT8.0Any float value
sampler_nameName of the samplerSTRING(from KSampler)Available KSampler options
schedulerScheduler typeSTRING(from KSampler)Available KSampler schedulers
denoiseDenoising strength (lower values adhere more to input face)FLOAT0.50.0 - 1.0
yolo_detectorYOLO model for face detectionSTRINGRequiredAvailable YOLO face models
yolo_confidenceYOLO confidence threshold (higher values detect only more confident faces)FLOAT0.250.0 - 1.0
yolo_nms_iouYOLO NMS IoU threshold (lower values remove more overlapping detections)FLOAT0.50.0 - 1.0
sam_segmenterSAM model for face segmentationSTRINGRequiredAvailable SAM models
sam_model_typeSAM model typeSTRING"vit_b""vit_b", "vit_l", "vit_h"
face_idIndex of the face to process (0 is first face, -1 is all faces)INT0≥ -1
face_orderOrder to process detected facesSTRING"linear""linear", "linear_reve

Nœuds dans ce pack

Nœuds 5
  • FUSEGenericKSampler
  • FUSEKSampler
  • FUSESamplerMaskOptions
  • FUSEVideoKSampler
  • FUSEYOLOSettings

Sources

3 sources
GitHubSourceVersion f4dc58317b9965c76b20d408ef5c5b365a526fee
github.com/WASasquatch/face-upscaling-and-seamless-embedding

Vérifié 13 oct.

Extraits de sources

1 extrait

Source context: Repo WASasquatch/face-upscaling-and-seamless-embedding