ComfyUI Node
h4 - Face Forge
A ComfyUI node in h4_Live/FaceForge with 20 inputs and 3 outputs.
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)
| Name | Type | Default | Description |
|---|---|---|---|
| input_image | IMAGE | The image you want to work on. Connect your Load Image node here. | |
| swap_enabled | BOOLEAN | true | Turn this ON to swap faces. Turn OFF if you just want to use Restore or Upscale. |
| swap_model | COMBO | The brain that performs the swap. 'inswapper_128' is the standard one. | |
| target_face_index | STRING | 0 | Which face to replace? 0 = 1st face, 1 = 2nd face. Use commas for multiple (e.g., '0,2'). |
| source_face_index | STRING | 0 | Which face from the source to use? Usually 0 (the main face). |
| face_selection_mode | COMBO | How we count faces. 'large-small' finds the biggest face first (Index 0). | |
| restore_enabled | BOOLEAN | true | Fixes blurry or pixelated faces. Great for low-res images. |
| restore_model | COMBO | Choose the repair tool. 'GFPGAN' is standard, 'CodeFormer' is strong but can change identity. | |
| restore_visibility | FLOAT | 1.000–1 | How strong is the repair? 1.0 = Full Model, 0.5 = 50% Mix with original. |
| codeformer_weight | FLOAT | 0.500–1 | (CodeFormer Only) Balance between Quality (0.0) and Identity (1.0). |
| boost_enabled | BOOLEAN | false | Experimental: Enhances the face *during* the swap. Slower, but can be sharper. |
| upscale_enabled | BOOLEAN | false | Make the image larger and crisper. |
| upscale_model | COMBO | The scaling engine. 'UltraSharp' is great for photos. | |
| upscale_face_only | BOOLEAN | false | ON = Only sharpen the face. OFF = Sharpen the whole image (Slower). |
| occlusion_enabled | BOOLEAN | false | Smart Masking. Prevents the face from covering hair/hands/objects. ⚠️ Uses lots of VRAM! |
| preserve_glasses | BOOLEAN | true | (With Occlusion) Try to keep the original glasses on the face. |
| preserve_hair | BOOLEAN | true | (With Occlusion) Try to keep hair strands from being covered by the new face. |
| source_imageopt | IMAGE | — | |
| face_modelopt | FACE_MODEL | — | |
| sam_modelopt | COMBO | 2 options: none, sam_vit_b_01ec64.pth |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| SWAPPED_IMAGE | IMAGE | — |
| FACE_MODEL | FACE_MODEL | — |
| ORIGINAL_IMAGE | IMAGE | — |