Created
July 16, 2026 18:54
-
-
Save devmeireles/adf2deb321d58b8037d440f92bb2b79d to your computer and use it in GitHub Desktop.
ComfyUI Faceswap Flow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "last_node_id": 19, | |
| "last_link_id": 19, | |
| "nodes": [ | |
| { | |
| "id": 1, | |
| "type": "Note", | |
| "pos": [ | |
| 0, | |
| -280 | |
| ], | |
| "size": [ | |
| 900, | |
| 210 | |
| ], | |
| "flags": {}, | |
| "order": 0, | |
| "mode": 0, | |
| "inputs": [], | |
| "outputs": [], | |
| "properties": { | |
| "Node name for S&R": "Note" | |
| }, | |
| "widgets_values": [ | |
| "FACE SWAP \u2014 InsightFace + InSwapper (ReActor)\n\n1. Load your SOURCE face (identity to copy) and TARGET image (face to replace).\n2. Adjust Face Index / Detection in the ReActor node if the wrong face is picked.\n3. Restoration = CodeFormer (fidelity slider) with GFPGAN as a drop-in fallback.\n4. UPSCALE is bypassable: right-click 'Upscale Image (using Model)' -> Bypass.\n5. FLUX REFINE is optional: select the whole FLUX group and Mute (Ctrl+M) to disable.\n Keep denoise 0.10-0.25 so identity is preserved. FLUX is heavy on 8GB VRAM.\n\nIdentity transfer is ALWAYS done by InsightFace + inswapper_128.onnx \u2014 never by a diffusion model. FLUX only refines skin/hairline/blending at low denoise." | |
| ], | |
| "title": "How to use", | |
| "color": "#432", | |
| "bgcolor": "#653" | |
| }, | |
| { | |
| "id": 2, | |
| "type": "LoadImage", | |
| "pos": [ | |
| 0, | |
| 120 | |
| ], | |
| "size": [ | |
| 300, | |
| 350 | |
| ], | |
| "flags": {}, | |
| "order": 1, | |
| "mode": 0, | |
| "inputs": [], | |
| "outputs": [ | |
| { | |
| "name": "IMAGE", | |
| "type": "IMAGE", | |
| "links": [ | |
| 2 | |
| ], | |
| "slot_index": 0 | |
| }, | |
| { | |
| "name": "MASK", | |
| "type": "MASK", | |
| "links": [], | |
| "slot_index": 1 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "LoadImage" | |
| }, | |
| "widgets_values": [ | |
| "source.png", | |
| "image" | |
| ], | |
| "title": "Source Face (identity)" | |
| }, | |
| { | |
| "id": 3, | |
| "type": "LoadImage", | |
| "pos": [ | |
| 0, | |
| 520 | |
| ], | |
| "size": [ | |
| 300, | |
| 350 | |
| ], | |
| "flags": {}, | |
| "order": 2, | |
| "mode": 0, | |
| "inputs": [], | |
| "outputs": [ | |
| { | |
| "name": "IMAGE", | |
| "type": "IMAGE", | |
| "links": [ | |
| 1 | |
| ], | |
| "slot_index": 0 | |
| }, | |
| { | |
| "name": "MASK", | |
| "type": "MASK", | |
| "links": [], | |
| "slot_index": 1 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "LoadImage" | |
| }, | |
| "widgets_values": [ | |
| "target.png", | |
| "image" | |
| ], | |
| "title": "Target Image (face to replace)" | |
| }, | |
| { | |
| "id": 4, | |
| "type": "ReActorFaceSwap", | |
| "pos": [ | |
| 460, | |
| 160 | |
| ], | |
| "size": [ | |
| 370, | |
| 420 | |
| ], | |
| "flags": {}, | |
| "order": 3, | |
| "mode": 0, | |
| "inputs": [ | |
| { | |
| "name": "input_image", | |
| "type": "IMAGE", | |
| "link": 1 | |
| }, | |
| { | |
| "name": "source_image", | |
| "type": "IMAGE", | |
| "link": 2 | |
| }, | |
| { | |
| "name": "face_model", | |
| "type": "FACE_MODEL", | |
| "link": null | |
| }, | |
| { | |
| "name": "face_boost", | |
| "type": "FACE_BOOST", | |
| "link": null | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "IMAGE", | |
| "type": "IMAGE", | |
| "links": [ | |
| 3 | |
| ], | |
| "slot_index": 0 | |
| }, | |
| { | |
| "name": "FACE_MODEL", | |
| "type": "FACE_MODEL", | |
| "links": [], | |
| "slot_index": 1 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "ReActorFaceSwap" | |
| }, | |
| "widgets_values": [ | |
| true, | |
| "inswapper_128.onnx", | |
| "retinaface_resnet50", | |
| "none", | |
| 1, | |
| 0.5, | |
| "no", | |
| "no", | |
| "0", | |
| "0", | |
| 1 | |
| ], | |
| "title": "Face Detection + Swap (InsightFace + InSwapper)" | |
| }, | |
| { | |
| "id": 5, | |
| "type": "ReActorRestoreFace", | |
| "pos": [ | |
| 900, | |
| 200 | |
| ], | |
| "size": [ | |
| 320, | |
| 190 | |
| ], | |
| "flags": {}, | |
| "order": 4, | |
| "mode": 0, | |
| "inputs": [ | |
| { | |
| "name": "image", | |
| "type": "IMAGE", | |
| "link": 3 | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "IMAGE", | |
| "type": "IMAGE", | |
| "links": [ | |
| 4 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "ReActorRestoreFace" | |
| }, | |
| "widgets_values": [ | |
| "retinaface_resnet50", | |
| "codeformer-v0.1.0.pth", | |
| 1, | |
| 0.5 | |
| ], | |
| "title": "Face Restoration (CodeFormer / GFPGAN)" | |
| }, | |
| { | |
| "id": 6, | |
| "type": "ImageSharpen", | |
| "pos": [ | |
| 1300, | |
| 260 | |
| ], | |
| "size": [ | |
| 300, | |
| 150 | |
| ], | |
| "flags": {}, | |
| "order": 5, | |
| "mode": 0, | |
| "inputs": [ | |
| { | |
| "name": "image", | |
| "type": "IMAGE", | |
| "link": 4 | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "IMAGE", | |
| "type": "IMAGE", | |
| "links": [ | |
| 5, | |
| 14 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "ImageSharpen" | |
| }, | |
| "widgets_values": [ | |
| 1, | |
| 0.85, | |
| 0.35 | |
| ], | |
| "title": "Enhancement (subtle sharpen)" | |
| }, | |
| { | |
| "id": 7, | |
| "type": "UpscaleModelLoader", | |
| "pos": [ | |
| 1680, | |
| 470 | |
| ], | |
| "size": [ | |
| 320, | |
| 70 | |
| ], | |
| "flags": {}, | |
| "order": 6, | |
| "mode": 0, | |
| "inputs": [], | |
| "outputs": [ | |
| { | |
| "name": "UPSCALE_MODEL", | |
| "type": "UPSCALE_MODEL", | |
| "links": [ | |
| 6 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "UpscaleModelLoader" | |
| }, | |
| "widgets_values": [ | |
| "4x-UltraSharp.pth" | |
| ], | |
| "title": "Upscale Model" | |
| }, | |
| { | |
| "id": 8, | |
| "type": "ImageUpscaleWithModel", | |
| "pos": [ | |
| 1680, | |
| 260 | |
| ], | |
| "size": [ | |
| 300, | |
| 100 | |
| ], | |
| "flags": {}, | |
| "order": 7, | |
| "mode": 0, | |
| "inputs": [ | |
| { | |
| "name": "upscale_model", | |
| "type": "UPSCALE_MODEL", | |
| "link": 6 | |
| }, | |
| { | |
| "name": "image", | |
| "type": "IMAGE", | |
| "link": 5 | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "IMAGE", | |
| "type": "IMAGE", | |
| "links": [ | |
| 7 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "ImageUpscaleWithModel" | |
| }, | |
| "widgets_values": [], | |
| "title": "Upscale Image (bypassable)" | |
| }, | |
| { | |
| "id": 9, | |
| "type": "SaveImage", | |
| "pos": [ | |
| 2080, | |
| 260 | |
| ], | |
| "size": [ | |
| 340, | |
| 380 | |
| ], | |
| "flags": {}, | |
| "order": 8, | |
| "mode": 0, | |
| "inputs": [ | |
| { | |
| "name": "images", | |
| "type": "IMAGE", | |
| "link": 7 | |
| } | |
| ], | |
| "outputs": [], | |
| "properties": { | |
| "Node name for S&R": "SaveImage" | |
| }, | |
| "widgets_values": [ | |
| "faceswap/result" | |
| ], | |
| "title": "Output" | |
| }, | |
| { | |
| "id": 10, | |
| "type": "UNETLoader", | |
| "pos": [ | |
| 460, | |
| 760 | |
| ], | |
| "size": [ | |
| 320, | |
| 100 | |
| ], | |
| "flags": {}, | |
| "order": 9, | |
| "mode": 0, | |
| "inputs": [], | |
| "outputs": [ | |
| { | |
| "name": "MODEL", | |
| "type": "MODEL", | |
| "links": [ | |
| 8 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "UNETLoader" | |
| }, | |
| "widgets_values": [ | |
| "flux1-dev.safetensors", | |
| "fp8_e4m3fn" | |
| ], | |
| "title": "FLUX UNET", | |
| "bgcolor": "#233" | |
| }, | |
| { | |
| "id": 11, | |
| "type": "DualCLIPLoader", | |
| "pos": [ | |
| 460, | |
| 900 | |
| ], | |
| "size": [ | |
| 320, | |
| 150 | |
| ], | |
| "flags": {}, | |
| "order": 10, | |
| "mode": 0, | |
| "inputs": [], | |
| "outputs": [ | |
| { | |
| "name": "CLIP", | |
| "type": "CLIP", | |
| "links": [ | |
| 9, | |
| 10 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "DualCLIPLoader" | |
| }, | |
| "widgets_values": [ | |
| "t5xxl_fp8_e4m3fn.safetensors", | |
| "clip_l.safetensors", | |
| "flux" | |
| ], | |
| "title": "FLUX CLIP", | |
| "bgcolor": "#233" | |
| }, | |
| { | |
| "id": 12, | |
| "type": "VAELoader", | |
| "pos": [ | |
| 460, | |
| 1100 | |
| ], | |
| "size": [ | |
| 320, | |
| 70 | |
| ], | |
| "flags": {}, | |
| "order": 11, | |
| "mode": 0, | |
| "inputs": [], | |
| "outputs": [ | |
| { | |
| "name": "VAE", | |
| "type": "VAE", | |
| "links": [ | |
| 15, | |
| 18 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "VAELoader" | |
| }, | |
| "widgets_values": [ | |
| "ae.safetensors" | |
| ], | |
| "title": "FLUX VAE", | |
| "bgcolor": "#233" | |
| }, | |
| { | |
| "id": 13, | |
| "type": "CLIPTextEncode", | |
| "pos": [ | |
| 860, | |
| 760 | |
| ], | |
| "size": [ | |
| 340, | |
| 160 | |
| ], | |
| "flags": {}, | |
| "order": 12, | |
| "mode": 0, | |
| "inputs": [ | |
| { | |
| "name": "clip", | |
| "type": "CLIP", | |
| "link": 9 | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "CONDITIONING", | |
| "type": "CONDITIONING", | |
| "links": [ | |
| 11 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "CLIPTextEncode" | |
| }, | |
| "widgets_values": [ | |
| "natural skin texture, sharp pores, realistic hairline, detailed eyes, consistent lighting, photograph" | |
| ], | |
| "title": "Positive (texture cue)", | |
| "bgcolor": "#233" | |
| }, | |
| { | |
| "id": 14, | |
| "type": "FluxGuidance", | |
| "pos": [ | |
| 1240, | |
| 760 | |
| ], | |
| "size": [ | |
| 280, | |
| 80 | |
| ], | |
| "flags": {}, | |
| "order": 13, | |
| "mode": 0, | |
| "inputs": [ | |
| { | |
| "name": "conditioning", | |
| "type": "CONDITIONING", | |
| "link": 11 | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "CONDITIONING", | |
| "type": "CONDITIONING", | |
| "links": [ | |
| 12 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "FluxGuidance" | |
| }, | |
| "widgets_values": [ | |
| 2.5 | |
| ], | |
| "title": "FLUX Guidance", | |
| "bgcolor": "#233" | |
| }, | |
| { | |
| "id": 15, | |
| "type": "CLIPTextEncode", | |
| "pos": [ | |
| 860, | |
| 960 | |
| ], | |
| "size": [ | |
| 340, | |
| 150 | |
| ], | |
| "flags": {}, | |
| "order": 14, | |
| "mode": 0, | |
| "inputs": [ | |
| { | |
| "name": "clip", | |
| "type": "CLIP", | |
| "link": 10 | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "CONDITIONING", | |
| "type": "CONDITIONING", | |
| "links": [ | |
| 13 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "CLIPTextEncode" | |
| }, | |
| "widgets_values": [ | |
| "" | |
| ], | |
| "title": "Negative", | |
| "bgcolor": "#233" | |
| }, | |
| { | |
| "id": 16, | |
| "type": "VAEEncode", | |
| "pos": [ | |
| 1240, | |
| 970 | |
| ], | |
| "size": [ | |
| 240, | |
| 80 | |
| ], | |
| "flags": {}, | |
| "order": 15, | |
| "mode": 0, | |
| "inputs": [ | |
| { | |
| "name": "pixels", | |
| "type": "IMAGE", | |
| "link": 14 | |
| }, | |
| { | |
| "name": "vae", | |
| "type": "VAE", | |
| "link": 15 | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "LATENT", | |
| "type": "LATENT", | |
| "links": [ | |
| 16 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "VAEEncode" | |
| }, | |
| "widgets_values": [], | |
| "title": "Encode (img2img)", | |
| "bgcolor": "#233" | |
| }, | |
| { | |
| "id": 17, | |
| "type": "KSampler", | |
| "pos": [ | |
| 1560, | |
| 760 | |
| ], | |
| "size": [ | |
| 320, | |
| 300 | |
| ], | |
| "flags": {}, | |
| "order": 16, | |
| "mode": 0, | |
| "inputs": [ | |
| { | |
| "name": "model", | |
| "type": "MODEL", | |
| "link": 8 | |
| }, | |
| { | |
| "name": "positive", | |
| "type": "CONDITIONING", | |
| "link": 12 | |
| }, | |
| { | |
| "name": "negative", | |
| "type": "CONDITIONING", | |
| "link": 13 | |
| }, | |
| { | |
| "name": "latent_image", | |
| "type": "LATENT", | |
| "link": 16 | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "LATENT", | |
| "type": "LATENT", | |
| "links": [ | |
| 17 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "KSampler" | |
| }, | |
| "widgets_values": [ | |
| 123456789, | |
| "fixed", | |
| 20, | |
| 1.0, | |
| "euler", | |
| "simple", | |
| 0.18 | |
| ], | |
| "title": "FLUX Refine (low denoise)", | |
| "bgcolor": "#233" | |
| }, | |
| { | |
| "id": 18, | |
| "type": "VAEDecode", | |
| "pos": [ | |
| 1920, | |
| 760 | |
| ], | |
| "size": [ | |
| 240, | |
| 80 | |
| ], | |
| "flags": {}, | |
| "order": 17, | |
| "mode": 0, | |
| "inputs": [ | |
| { | |
| "name": "samples", | |
| "type": "LATENT", | |
| "link": 17 | |
| }, | |
| { | |
| "name": "vae", | |
| "type": "VAE", | |
| "link": 18 | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "IMAGE", | |
| "type": "IMAGE", | |
| "links": [ | |
| 19 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "VAEDecode" | |
| }, | |
| "widgets_values": [], | |
| "title": "Decode", | |
| "bgcolor": "#233" | |
| }, | |
| { | |
| "id": 19, | |
| "type": "SaveImage", | |
| "pos": [ | |
| 2200, | |
| 760 | |
| ], | |
| "size": [ | |
| 340, | |
| 380 | |
| ], | |
| "flags": {}, | |
| "order": 18, | |
| "mode": 0, | |
| "inputs": [ | |
| { | |
| "name": "images", | |
| "type": "IMAGE", | |
| "link": 19 | |
| } | |
| ], | |
| "outputs": [], | |
| "properties": { | |
| "Node name for S&R": "SaveImage" | |
| }, | |
| "widgets_values": [ | |
| "faceswap/result_flux" | |
| ], | |
| "title": "Output (FLUX refined)", | |
| "bgcolor": "#233" | |
| } | |
| ], | |
| "links": [ | |
| [ | |
| 1, | |
| 3, | |
| 0, | |
| 4, | |
| 0, | |
| "IMAGE" | |
| ], | |
| [ | |
| 2, | |
| 2, | |
| 0, | |
| 4, | |
| 1, | |
| "IMAGE" | |
| ], | |
| [ | |
| 3, | |
| 4, | |
| 0, | |
| 5, | |
| 0, | |
| "IMAGE" | |
| ], | |
| [ | |
| 4, | |
| 5, | |
| 0, | |
| 6, | |
| 0, | |
| "IMAGE" | |
| ], | |
| [ | |
| 5, | |
| 6, | |
| 0, | |
| 8, | |
| 1, | |
| "IMAGE" | |
| ], | |
| [ | |
| 6, | |
| 7, | |
| 0, | |
| 8, | |
| 0, | |
| "UPSCALE_MODEL" | |
| ], | |
| [ | |
| 7, | |
| 8, | |
| 0, | |
| 9, | |
| 0, | |
| "IMAGE" | |
| ], | |
| [ | |
| 8, | |
| 10, | |
| 0, | |
| 17, | |
| 0, | |
| "MODEL" | |
| ], | |
| [ | |
| 9, | |
| 11, | |
| 0, | |
| 13, | |
| 0, | |
| "CLIP" | |
| ], | |
| [ | |
| 10, | |
| 11, | |
| 0, | |
| 15, | |
| 0, | |
| "CLIP" | |
| ], | |
| [ | |
| 11, | |
| 13, | |
| 0, | |
| 14, | |
| 0, | |
| "CONDITIONING" | |
| ], | |
| [ | |
| 12, | |
| 14, | |
| 0, | |
| 17, | |
| 1, | |
| "CONDITIONING" | |
| ], | |
| [ | |
| 13, | |
| 15, | |
| 0, | |
| 17, | |
| 2, | |
| "CONDITIONING" | |
| ], | |
| [ | |
| 14, | |
| 6, | |
| 0, | |
| 16, | |
| 0, | |
| "IMAGE" | |
| ], | |
| [ | |
| 15, | |
| 12, | |
| 0, | |
| 16, | |
| 1, | |
| "VAE" | |
| ], | |
| [ | |
| 16, | |
| 16, | |
| 0, | |
| 17, | |
| 3, | |
| "LATENT" | |
| ], | |
| [ | |
| 17, | |
| 17, | |
| 0, | |
| 18, | |
| 0, | |
| "LATENT" | |
| ], | |
| [ | |
| 18, | |
| 12, | |
| 0, | |
| 18, | |
| 1, | |
| "VAE" | |
| ], | |
| [ | |
| 19, | |
| 18, | |
| 0, | |
| 19, | |
| 0, | |
| "IMAGE" | |
| ] | |
| ], | |
| "groups": [ | |
| { | |
| "title": "1 \u00b7 Inputs", | |
| "bounding": [ | |
| -25, | |
| 40, | |
| 350, | |
| 860 | |
| ], | |
| "color": "#3f789e", | |
| "font_size": 24, | |
| "flags": {} | |
| }, | |
| { | |
| "title": "2 \u00b7 Face Detection + Swap (InsightFace + InSwapper)", | |
| "bounding": [ | |
| 435, | |
| 80, | |
| 420, | |
| 530 | |
| ], | |
| "color": "#8e44ad", | |
| "font_size": 24, | |
| "flags": {} | |
| }, | |
| { | |
| "title": "3 \u00b7 Face Restoration", | |
| "bounding": [ | |
| 875, | |
| 120, | |
| 370, | |
| 300 | |
| ], | |
| "color": "#16a085", | |
| "font_size": 24, | |
| "flags": {} | |
| }, | |
| { | |
| "title": "4 \u00b7 Enhancement", | |
| "bounding": [ | |
| 1275, | |
| 180, | |
| 350, | |
| 260 | |
| ], | |
| "color": "#b58b2a", | |
| "font_size": 24, | |
| "flags": {} | |
| }, | |
| { | |
| "title": "5 \u00b7 Upscaling (optional / bypass)", | |
| "bounding": [ | |
| 1655, | |
| 180, | |
| 370, | |
| 390 | |
| ], | |
| "color": "#c0392b", | |
| "font_size": 24, | |
| "flags": {} | |
| }, | |
| { | |
| "title": "6 \u00b7 Output", | |
| "bounding": [ | |
| 2055, | |
| 180, | |
| 390, | |
| 490 | |
| ], | |
| "color": "#3f789e", | |
| "font_size": 24, | |
| "flags": {} | |
| }, | |
| { | |
| "title": "7 \u00b7 FLUX Refinement (optional \u2014 Mute to disable)", | |
| "bounding": [ | |
| 435, | |
| 680, | |
| 2130, | |
| 520 | |
| ], | |
| "color": "#444", | |
| "font_size": 24, | |
| "flags": {} | |
| } | |
| ], | |
| "config": {}, | |
| "extra": { | |
| "ds": { | |
| "scale": 0.55, | |
| "offset": [ | |
| 120, | |
| 340 | |
| ] | |
| } | |
| }, | |
| "version": 0.4 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "last_node_id": 19, | |
| "last_link_id": 19, | |
| "nodes": [ | |
| { | |
| "id": 1, | |
| "type": "Note", | |
| "pos": [ | |
| 0, | |
| -300 | |
| ], | |
| "size": [ | |
| 900, | |
| 230 | |
| ], | |
| "flags": {}, | |
| "order": 0, | |
| "mode": 0, | |
| "inputs": [], | |
| "outputs": [], | |
| "properties": { | |
| "Node name for S&R": "Note" | |
| }, | |
| "widgets_values": [ | |
| "BATCH FACE SWAP \u2014 one base face -> every image in a folder.\n\n1. BASE FACE: load the single identity image (top-left).\n2. TARGET FOLDER: set 'directory' on the 'Target Folder (batch)' node to your\n folder of images. They can be DIFFERENT sizes/aspect ratios (loaded as a list).\n image_load_cap = 0 means 'all images'; start_index skips the first N.\n3. Press Queue ONCE \u2014 every image in the folder is processed and saved in order.\n4. Restoration = CodeFormer (fidelity slider); swap model to GFPGANv1.4.pth to fall back.\n5. UPSCALE is bypassable (right-click -> Bypass). FLUX group ships MUTED for speed;\n Ctrl+M on the group to enable per-image refinement (much slower over a batch).\n\nRequires ComfyUI-Inspire-Pack for the folder loader. Identity transfer stays on\nInsightFace + inswapper_128.onnx for every image." | |
| ], | |
| "title": "How to use (BATCH v2)", | |
| "color": "#432", | |
| "bgcolor": "#653" | |
| }, | |
| { | |
| "id": 2, | |
| "type": "LoadImage", | |
| "pos": [ | |
| 0, | |
| 120 | |
| ], | |
| "size": [ | |
| 300, | |
| 350 | |
| ], | |
| "flags": {}, | |
| "order": 1, | |
| "mode": 0, | |
| "inputs": [], | |
| "outputs": [ | |
| { | |
| "name": "IMAGE", | |
| "type": "IMAGE", | |
| "links": [ | |
| 2 | |
| ], | |
| "slot_index": 0 | |
| }, | |
| { | |
| "name": "MASK", | |
| "type": "MASK", | |
| "links": [], | |
| "slot_index": 1 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "LoadImage" | |
| }, | |
| "widgets_values": [ | |
| "base_face.png", | |
| "image" | |
| ], | |
| "title": "Base Face (applied to every image)" | |
| }, | |
| { | |
| "id": 3, | |
| "type": "LoadImageListFromDir //Inspire", | |
| "pos": [ | |
| 0, | |
| 520 | |
| ], | |
| "size": [ | |
| 320, | |
| 240 | |
| ], | |
| "flags": {}, | |
| "order": 2, | |
| "mode": 0, | |
| "inputs": [], | |
| "outputs": [ | |
| { | |
| "name": "IMAGE", | |
| "type": "IMAGE", | |
| "links": [ | |
| 1 | |
| ], | |
| "slot_index": 0 | |
| }, | |
| { | |
| "name": "MASK", | |
| "type": "MASK", | |
| "links": [], | |
| "slot_index": 1 | |
| }, | |
| { | |
| "name": "count", | |
| "type": "INT", | |
| "links": [], | |
| "slot_index": 2 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "LoadImageListFromDir //Inspire" | |
| }, | |
| "widgets_values": [ | |
| "C:/Users/meire/targets", | |
| 0, | |
| 0, | |
| false | |
| ], | |
| "title": "Target Folder (batch \u2014 one entry per image)" | |
| }, | |
| { | |
| "id": 4, | |
| "type": "ReActorFaceSwap", | |
| "pos": [ | |
| 460, | |
| 160 | |
| ], | |
| "size": [ | |
| 370, | |
| 420 | |
| ], | |
| "flags": {}, | |
| "order": 3, | |
| "mode": 0, | |
| "inputs": [ | |
| { | |
| "name": "input_image", | |
| "type": "IMAGE", | |
| "link": 1 | |
| }, | |
| { | |
| "name": "source_image", | |
| "type": "IMAGE", | |
| "link": 2 | |
| }, | |
| { | |
| "name": "face_model", | |
| "type": "FACE_MODEL", | |
| "link": null | |
| }, | |
| { | |
| "name": "face_boost", | |
| "type": "FACE_BOOST", | |
| "link": null | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "IMAGE", | |
| "type": "IMAGE", | |
| "links": [ | |
| 3 | |
| ], | |
| "slot_index": 0 | |
| }, | |
| { | |
| "name": "FACE_MODEL", | |
| "type": "FACE_MODEL", | |
| "links": [], | |
| "slot_index": 1 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "ReActorFaceSwap" | |
| }, | |
| "widgets_values": [ | |
| true, | |
| "inswapper_128.onnx", | |
| "retinaface_resnet50", | |
| "none", | |
| 1, | |
| 0.5, | |
| "no", | |
| "no", | |
| "0", | |
| "0", | |
| 1 | |
| ], | |
| "title": "Face Detection + Swap (InsightFace + InSwapper)" | |
| }, | |
| { | |
| "id": 5, | |
| "type": "ReActorRestoreFace", | |
| "pos": [ | |
| 900, | |
| 200 | |
| ], | |
| "size": [ | |
| 320, | |
| 190 | |
| ], | |
| "flags": {}, | |
| "order": 4, | |
| "mode": 0, | |
| "inputs": [ | |
| { | |
| "name": "image", | |
| "type": "IMAGE", | |
| "link": 3 | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "IMAGE", | |
| "type": "IMAGE", | |
| "links": [ | |
| 4 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "ReActorRestoreFace" | |
| }, | |
| "widgets_values": [ | |
| "retinaface_resnet50", | |
| "codeformer-v0.1.0.pth", | |
| 1, | |
| 0.5 | |
| ], | |
| "title": "Face Restoration (CodeFormer / GFPGAN)" | |
| }, | |
| { | |
| "id": 6, | |
| "type": "ImageSharpen", | |
| "pos": [ | |
| 1300, | |
| 260 | |
| ], | |
| "size": [ | |
| 300, | |
| 150 | |
| ], | |
| "flags": {}, | |
| "order": 5, | |
| "mode": 0, | |
| "inputs": [ | |
| { | |
| "name": "image", | |
| "type": "IMAGE", | |
| "link": 4 | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "IMAGE", | |
| "type": "IMAGE", | |
| "links": [ | |
| 5, | |
| 14 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "ImageSharpen" | |
| }, | |
| "widgets_values": [ | |
| 1, | |
| 0.85, | |
| 0.35 | |
| ], | |
| "title": "Enhancement (subtle sharpen)" | |
| }, | |
| { | |
| "id": 7, | |
| "type": "UpscaleModelLoader", | |
| "pos": [ | |
| 1680, | |
| 470 | |
| ], | |
| "size": [ | |
| 320, | |
| 70 | |
| ], | |
| "flags": {}, | |
| "order": 6, | |
| "mode": 0, | |
| "inputs": [], | |
| "outputs": [ | |
| { | |
| "name": "UPSCALE_MODEL", | |
| "type": "UPSCALE_MODEL", | |
| "links": [ | |
| 6 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "UpscaleModelLoader" | |
| }, | |
| "widgets_values": [ | |
| "4x-UltraSharp.pth" | |
| ], | |
| "title": "Upscale Model" | |
| }, | |
| { | |
| "id": 8, | |
| "type": "ImageUpscaleWithModel", | |
| "pos": [ | |
| 1680, | |
| 260 | |
| ], | |
| "size": [ | |
| 300, | |
| 100 | |
| ], | |
| "flags": {}, | |
| "order": 7, | |
| "mode": 0, | |
| "inputs": [ | |
| { | |
| "name": "upscale_model", | |
| "type": "UPSCALE_MODEL", | |
| "link": 6 | |
| }, | |
| { | |
| "name": "image", | |
| "type": "IMAGE", | |
| "link": 5 | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "IMAGE", | |
| "type": "IMAGE", | |
| "links": [ | |
| 7 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "ImageUpscaleWithModel" | |
| }, | |
| "widgets_values": [], | |
| "title": "Upscale Image (bypassable)" | |
| }, | |
| { | |
| "id": 9, | |
| "type": "SaveImage", | |
| "pos": [ | |
| 2080, | |
| 260 | |
| ], | |
| "size": [ | |
| 340, | |
| 380 | |
| ], | |
| "flags": {}, | |
| "order": 8, | |
| "mode": 0, | |
| "inputs": [ | |
| { | |
| "name": "images", | |
| "type": "IMAGE", | |
| "link": 7 | |
| } | |
| ], | |
| "outputs": [], | |
| "properties": { | |
| "Node name for S&R": "SaveImage" | |
| }, | |
| "widgets_values": [ | |
| "faceswap_batch/img" | |
| ], | |
| "title": "Output (one file per input)" | |
| }, | |
| { | |
| "id": 10, | |
| "type": "UNETLoader", | |
| "pos": [ | |
| 460, | |
| 780 | |
| ], | |
| "size": [ | |
| 320, | |
| 100 | |
| ], | |
| "flags": {}, | |
| "order": 9, | |
| "mode": 2, | |
| "inputs": [], | |
| "outputs": [ | |
| { | |
| "name": "MODEL", | |
| "type": "MODEL", | |
| "links": [ | |
| 8 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "UNETLoader" | |
| }, | |
| "widgets_values": [ | |
| "flux1-dev.safetensors", | |
| "fp8_e4m3fn" | |
| ], | |
| "title": "FLUX UNET", | |
| "bgcolor": "#233" | |
| }, | |
| { | |
| "id": 11, | |
| "type": "DualCLIPLoader", | |
| "pos": [ | |
| 460, | |
| 920 | |
| ], | |
| "size": [ | |
| 320, | |
| 150 | |
| ], | |
| "flags": {}, | |
| "order": 10, | |
| "mode": 2, | |
| "inputs": [], | |
| "outputs": [ | |
| { | |
| "name": "CLIP", | |
| "type": "CLIP", | |
| "links": [ | |
| 9, | |
| 10 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "DualCLIPLoader" | |
| }, | |
| "widgets_values": [ | |
| "t5xxl_fp8_e4m3fn.safetensors", | |
| "clip_l.safetensors", | |
| "flux" | |
| ], | |
| "title": "FLUX CLIP", | |
| "bgcolor": "#233" | |
| }, | |
| { | |
| "id": 12, | |
| "type": "VAELoader", | |
| "pos": [ | |
| 460, | |
| 1120 | |
| ], | |
| "size": [ | |
| 320, | |
| 70 | |
| ], | |
| "flags": {}, | |
| "order": 11, | |
| "mode": 2, | |
| "inputs": [], | |
| "outputs": [ | |
| { | |
| "name": "VAE", | |
| "type": "VAE", | |
| "links": [ | |
| 15, | |
| 18 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "VAELoader" | |
| }, | |
| "widgets_values": [ | |
| "ae.safetensors" | |
| ], | |
| "title": "FLUX VAE", | |
| "bgcolor": "#233" | |
| }, | |
| { | |
| "id": 13, | |
| "type": "CLIPTextEncode", | |
| "pos": [ | |
| 860, | |
| 780 | |
| ], | |
| "size": [ | |
| 340, | |
| 160 | |
| ], | |
| "flags": {}, | |
| "order": 12, | |
| "mode": 2, | |
| "inputs": [ | |
| { | |
| "name": "clip", | |
| "type": "CLIP", | |
| "link": 9 | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "CONDITIONING", | |
| "type": "CONDITIONING", | |
| "links": [ | |
| 11 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "CLIPTextEncode" | |
| }, | |
| "widgets_values": [ | |
| "natural skin texture, sharp pores, realistic hairline, detailed eyes, consistent lighting, photograph" | |
| ], | |
| "title": "Positive (texture cue)", | |
| "bgcolor": "#233" | |
| }, | |
| { | |
| "id": 14, | |
| "type": "FluxGuidance", | |
| "pos": [ | |
| 1240, | |
| 780 | |
| ], | |
| "size": [ | |
| 280, | |
| 80 | |
| ], | |
| "flags": {}, | |
| "order": 13, | |
| "mode": 2, | |
| "inputs": [ | |
| { | |
| "name": "conditioning", | |
| "type": "CONDITIONING", | |
| "link": 11 | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "CONDITIONING", | |
| "type": "CONDITIONING", | |
| "links": [ | |
| 12 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "FluxGuidance" | |
| }, | |
| "widgets_values": [ | |
| 2.5 | |
| ], | |
| "title": "FLUX Guidance", | |
| "bgcolor": "#233" | |
| }, | |
| { | |
| "id": 15, | |
| "type": "CLIPTextEncode", | |
| "pos": [ | |
| 860, | |
| 980 | |
| ], | |
| "size": [ | |
| 340, | |
| 150 | |
| ], | |
| "flags": {}, | |
| "order": 14, | |
| "mode": 2, | |
| "inputs": [ | |
| { | |
| "name": "clip", | |
| "type": "CLIP", | |
| "link": 10 | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "CONDITIONING", | |
| "type": "CONDITIONING", | |
| "links": [ | |
| 13 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "CLIPTextEncode" | |
| }, | |
| "widgets_values": [ | |
| "" | |
| ], | |
| "title": "Negative", | |
| "bgcolor": "#233" | |
| }, | |
| { | |
| "id": 16, | |
| "type": "VAEEncode", | |
| "pos": [ | |
| 1240, | |
| 980 | |
| ], | |
| "size": [ | |
| 240, | |
| 80 | |
| ], | |
| "flags": {}, | |
| "order": 15, | |
| "mode": 2, | |
| "inputs": [ | |
| { | |
| "name": "pixels", | |
| "type": "IMAGE", | |
| "link": 14 | |
| }, | |
| { | |
| "name": "vae", | |
| "type": "VAE", | |
| "link": 15 | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "LATENT", | |
| "type": "LATENT", | |
| "links": [ | |
| 16 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "VAEEncode" | |
| }, | |
| "widgets_values": [], | |
| "title": "Encode (img2img)", | |
| "bgcolor": "#233" | |
| }, | |
| { | |
| "id": 17, | |
| "type": "KSampler", | |
| "pos": [ | |
| 1560, | |
| 780 | |
| ], | |
| "size": [ | |
| 320, | |
| 300 | |
| ], | |
| "flags": {}, | |
| "order": 16, | |
| "mode": 2, | |
| "inputs": [ | |
| { | |
| "name": "model", | |
| "type": "MODEL", | |
| "link": 8 | |
| }, | |
| { | |
| "name": "positive", | |
| "type": "CONDITIONING", | |
| "link": 12 | |
| }, | |
| { | |
| "name": "negative", | |
| "type": "CONDITIONING", | |
| "link": 13 | |
| }, | |
| { | |
| "name": "latent_image", | |
| "type": "LATENT", | |
| "link": 16 | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "LATENT", | |
| "type": "LATENT", | |
| "links": [ | |
| 17 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "KSampler" | |
| }, | |
| "widgets_values": [ | |
| 123456789, | |
| "fixed", | |
| 20, | |
| 1.0, | |
| "euler", | |
| "simple", | |
| 0.18 | |
| ], | |
| "title": "FLUX Refine (low denoise)", | |
| "bgcolor": "#233" | |
| }, | |
| { | |
| "id": 18, | |
| "type": "VAEDecode", | |
| "pos": [ | |
| 1920, | |
| 780 | |
| ], | |
| "size": [ | |
| 240, | |
| 80 | |
| ], | |
| "flags": {}, | |
| "order": 17, | |
| "mode": 2, | |
| "inputs": [ | |
| { | |
| "name": "samples", | |
| "type": "LATENT", | |
| "link": 17 | |
| }, | |
| { | |
| "name": "vae", | |
| "type": "VAE", | |
| "link": 18 | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "IMAGE", | |
| "type": "IMAGE", | |
| "links": [ | |
| 19 | |
| ], | |
| "slot_index": 0 | |
| } | |
| ], | |
| "properties": { | |
| "Node name for S&R": "VAEDecode" | |
| }, | |
| "widgets_values": [], | |
| "title": "Decode", | |
| "bgcolor": "#233" | |
| }, | |
| { | |
| "id": 19, | |
| "type": "SaveImage", | |
| "pos": [ | |
| 2200, | |
| 780 | |
| ], | |
| "size": [ | |
| 340, | |
| 380 | |
| ], | |
| "flags": {}, | |
| "order": 18, | |
| "mode": 2, | |
| "inputs": [ | |
| { | |
| "name": "images", | |
| "type": "IMAGE", | |
| "link": 19 | |
| } | |
| ], | |
| "outputs": [], | |
| "properties": { | |
| "Node name for S&R": "SaveImage" | |
| }, | |
| "widgets_values": [ | |
| "faceswap_batch/img_flux" | |
| ], | |
| "title": "Output (FLUX refined)", | |
| "bgcolor": "#233" | |
| } | |
| ], | |
| "links": [ | |
| [ | |
| 1, | |
| 3, | |
| 0, | |
| 4, | |
| 0, | |
| "IMAGE" | |
| ], | |
| [ | |
| 2, | |
| 2, | |
| 0, | |
| 4, | |
| 1, | |
| "IMAGE" | |
| ], | |
| [ | |
| 3, | |
| 4, | |
| 0, | |
| 5, | |
| 0, | |
| "IMAGE" | |
| ], | |
| [ | |
| 4, | |
| 5, | |
| 0, | |
| 6, | |
| 0, | |
| "IMAGE" | |
| ], | |
| [ | |
| 5, | |
| 6, | |
| 0, | |
| 8, | |
| 1, | |
| "IMAGE" | |
| ], | |
| [ | |
| 6, | |
| 7, | |
| 0, | |
| 8, | |
| 0, | |
| "UPSCALE_MODEL" | |
| ], | |
| [ | |
| 7, | |
| 8, | |
| 0, | |
| 9, | |
| 0, | |
| "IMAGE" | |
| ], | |
| [ | |
| 8, | |
| 10, | |
| 0, | |
| 17, | |
| 0, | |
| "MODEL" | |
| ], | |
| [ | |
| 9, | |
| 11, | |
| 0, | |
| 13, | |
| 0, | |
| "CLIP" | |
| ], | |
| [ | |
| 10, | |
| 11, | |
| 0, | |
| 15, | |
| 0, | |
| "CLIP" | |
| ], | |
| [ | |
| 11, | |
| 13, | |
| 0, | |
| 14, | |
| 0, | |
| "CONDITIONING" | |
| ], | |
| [ | |
| 12, | |
| 14, | |
| 0, | |
| 17, | |
| 1, | |
| "CONDITIONING" | |
| ], | |
| [ | |
| 13, | |
| 15, | |
| 0, | |
| 17, | |
| 2, | |
| "CONDITIONING" | |
| ], | |
| [ | |
| 14, | |
| 6, | |
| 0, | |
| 16, | |
| 0, | |
| "IMAGE" | |
| ], | |
| [ | |
| 15, | |
| 12, | |
| 0, | |
| 16, | |
| 1, | |
| "VAE" | |
| ], | |
| [ | |
| 16, | |
| 16, | |
| 0, | |
| 17, | |
| 3, | |
| "LATENT" | |
| ], | |
| [ | |
| 17, | |
| 17, | |
| 0, | |
| 18, | |
| 0, | |
| "LATENT" | |
| ], | |
| [ | |
| 18, | |
| 12, | |
| 0, | |
| 18, | |
| 1, | |
| "VAE" | |
| ], | |
| [ | |
| 19, | |
| 18, | |
| 0, | |
| 19, | |
| 0, | |
| "IMAGE" | |
| ] | |
| ], | |
| "groups": [ | |
| { | |
| "title": "1 \u00b7 Inputs (base face + target folder)", | |
| "bounding": [ | |
| -25, | |
| 40, | |
| 370, | |
| 750 | |
| ], | |
| "color": "#3f789e", | |
| "font_size": 24, | |
| "flags": {} | |
| }, | |
| { | |
| "title": "2 \u00b7 Face Detection + Swap (InsightFace + InSwapper)", | |
| "bounding": [ | |
| 435, | |
| 80, | |
| 420, | |
| 530 | |
| ], | |
| "color": "#8e44ad", | |
| "font_size": 24, | |
| "flags": {} | |
| }, | |
| { | |
| "title": "3 \u00b7 Face Restoration", | |
| "bounding": [ | |
| 875, | |
| 120, | |
| 370, | |
| 300 | |
| ], | |
| "color": "#16a085", | |
| "font_size": 24, | |
| "flags": {} | |
| }, | |
| { | |
| "title": "4 \u00b7 Enhancement", | |
| "bounding": [ | |
| 1275, | |
| 180, | |
| 350, | |
| 260 | |
| ], | |
| "color": "#b58b2a", | |
| "font_size": 24, | |
| "flags": {} | |
| }, | |
| { | |
| "title": "5 \u00b7 Upscaling (optional / bypass)", | |
| "bounding": [ | |
| 1655, | |
| 180, | |
| 370, | |
| 390 | |
| ], | |
| "color": "#c0392b", | |
| "font_size": 24, | |
| "flags": {} | |
| }, | |
| { | |
| "title": "6 \u00b7 Output", | |
| "bounding": [ | |
| 2055, | |
| 180, | |
| 390, | |
| 490 | |
| ], | |
| "color": "#3f789e", | |
| "font_size": 24, | |
| "flags": {} | |
| }, | |
| { | |
| "title": "7 \u00b7 FLUX Refinement (MUTED by default \u2014 Ctrl+M to enable)", | |
| "bounding": [ | |
| 435, | |
| 700, | |
| 2130, | |
| 520 | |
| ], | |
| "color": "#444", | |
| "font_size": 24, | |
| "flags": {} | |
| } | |
| ], | |
| "config": {}, | |
| "extra": { | |
| "ds": { | |
| "scale": 0.55, | |
| "offset": [ | |
| 120, | |
| 340 | |
| ] | |
| } | |
| }, | |
| "version": 0.4 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment