Nodes/h4_Live/h4 - Face Forge
ComfyUI Node

h4 - Face Forge

A ComfyUI node in h4_Live/FaceForge with 20 inputs and 3 outputs.

By m3rr·Created 8 months ago·Updated 16 days ago· 1
h4 - Face Forge
  • input_image
  • source_image
  • face_model
  • SWAPPED_IMAGE
  • FACE_MODEL
  • ORIGINAL_IMAGE
swap_enabledtrue
swap_model
target_face_index0
source_face_index0
face_selection_mode
restore_enabledtrue
restore_model
restore_visibility1.00
codeformer_weight0.50
boost_enabledfalse
upscale_enabledfalse
upscale_model
upscale_face_onlyfalse
occlusion_enabledfalse
preserve_glassestrue
preserve_hairtrue
sam_model
Categoryh4_Live/FaceForge

Inputs (20)

NameTypeDefaultDescription
input_imageIMAGEThe image you want to work on. Connect your Load Image node here.
swap_enabledBOOLEANtrueTurn this ON to swap faces. Turn OFF if you just want to use Restore or Upscale.
swap_modelCOMBOThe brain that performs the swap. 'inswapper_128' is the standard one.
target_face_indexSTRING0Which face to replace? 0 = 1st face, 1 = 2nd face. Use commas for multiple (e.g., '0,2').
source_face_indexSTRING0Which face from the source to use? Usually 0 (the main face).
face_selection_modeCOMBOHow we count faces. 'large-small' finds the biggest face first (Index 0).
restore_enabledBOOLEANtrueFixes blurry or pixelated faces. Great for low-res images.
restore_modelCOMBOChoose the repair tool. 'GFPGAN' is standard, 'CodeFormer' is strong but can change identity.
restore_visibilityFLOAT1.000–1How strong is the repair? 1.0 = Full Model, 0.5 = 50% Mix with original.
codeformer_weightFLOAT0.500–1(CodeFormer Only) Balance between Quality (0.0) and Identity (1.0).
boost_enabledBOOLEANfalseExperimental: Enhances the face *during* the swap. Slower, but can be sharper.
upscale_enabledBOOLEANfalseMake the image larger and crisper.
upscale_modelCOMBOThe scaling engine. 'UltraSharp' is great for photos.
upscale_face_onlyBOOLEANfalseON = Only sharpen the face. OFF = Sharpen the whole image (Slower).
occlusion_enabledBOOLEANfalseSmart Masking. Prevents the face from covering hair/hands/objects. ⚠️ Uses lots of VRAM!
preserve_glassesBOOLEANtrue(With Occlusion) Try to keep the original glasses on the face.
preserve_hairBOOLEANtrue(With Occlusion) Try to keep hair strands from being covered by the new face.
source_imageoptIMAGE
face_modeloptFACE_MODEL
sam_modeloptCOMBO2 options: none, sam_vit_b_01ec64.pth

Outputs (3)

NameTypeDescription
SWAPPED_IMAGEIMAGE
FACE_MODELFACE_MODEL
ORIGINAL_IMAGEIMAGE