{ "1": { "class_type": "LoadImage", "inputs": { "image": "body.jpg" } }, "10": { "class_type": "LoraLoaderModelOnly", "inputs": { "lora_name": "flux2/klein/bfs_head_v1_flux-klein_9b_step3500_rank128.safetensors", "model": [ "9", 0 ], "strength_model": 1.0 } }, "11": { "class_type": "LoraLoaderModelOnly", "inputs": { "lora_name": "lissie_flux2_klein.safetensors", "model": [ "10", 0 ], "strength_model": 0.6 } }, "12": { "class_type": "CLIPTextEncode", "inputs": { "clip": [ "8", 0 ], "text": [ "32", 0 ] } }, "13": { "class_type": "CLIPTextEncode", "inputs": { "clip": [ "8", 0 ], "text": "bad quality, noise, blurry, worst quality, low resolution, blur, distortion, unnatural blending, cartoon, illustration, painting" } }, "14": { "class_type": "VAELoader", "inputs": { "vae_name": "flux2-vae.safetensors" } }, "15": { "class_type": "VAEEncode", "inputs": { "pixels": [ "41", 1 ], "vae": [ "14", 0 ] } }, "16": { "class_type": "VAEEncode", "inputs": { "pixels": [ "5", 0 ], "vae": [ "14", 0 ] } }, "17": { "class_type": "ReferenceLatent", "inputs": { "conditioning": [ "12", 0 ], "latent": [ "15", 0 ] } }, "18": { "class_type": "ReferenceLatent", "inputs": { "conditioning": [ "17", 0 ], "latent": [ "16", 0 ] } }, "19": { "class_type": "ReferenceLatent", "inputs": { "conditioning": [ "13", 0 ], "latent": [ "15", 0 ] } }, "2": { "class_type": "LoadImage", "inputs": { "image": "face.jpg" } }, "20": { "class_type": "ReferenceLatent", "inputs": { "conditioning": [ "19", 0 ], "latent": [ "16", 0 ] } }, "21": { "class_type": "CFGGuider", "inputs": { "cfg": 1.0, "model": [ "11", 0 ], "negative": [ "20", 0 ], "positive": [ "18", 0 ] } }, "22": { "class_type": "KSamplerSelect", "inputs": { "sampler_name": "euler" } }, "23": { "class_type": "Flux2Scheduler", "inputs": { "height": [ "6", 1 ], "steps": 5, "width": [ "6", 0 ] } }, "24": { "class_type": "RandomNoise", "inputs": { "noise_seed": 42 } }, "25": { "class_type": "SamplerCustomAdvanced", "inputs": { "guider": [ "21", 0 ], "latent_image": [ "7", 0 ], "noise": [ "24", 0 ], "sampler": [ "22", 0 ], "sigmas": [ "23", 0 ] } }, "26": { "class_type": "VAEDecode", "inputs": { "samples": [ "25", 0 ], "vae": [ "14", 0 ] } }, "27": { "class_type": "SaveImage", "inputs": { "filename_prefix": "faceswapnew-klein-cropstitch", "images": [ "42", 0 ] } }, "3": { "class_type": "RMBG", "inputs": { "background": "Alpha", "image": [ "2", 0 ], "invert_output": false, "mask_blur": 0, "mask_offset": 0, "model": "RMBG-2.0", "process_res": 1024, "refine_foreground": false, "sensitivity": 1 } }, "30": { "class_type": "ImageResizeKJv2", "inputs": { "crop_position": "center", "device": "cpu", "divisible_by": 2, "height": 512, "image": [ "1", 0 ], "keep_proportion": "resize", "pad_color": "0, 0, 0", "upscale_method": "lanczos", "width": 512 } }, "31": { "class_type": "AILab_QwenVL", "inputs": { "attention_mode": "sdpa", "custom_prompt": "Describe the facial expression.", "image": [ "30", 0 ], "keep_model_loaded": false, "max_tokens": 512, "model_name": "Qwen3-VL-4B-Instruct", "preset_prompt": "\ud83d\uddbc\ufe0f Tags", "quantization": "None (FP16)", "seed": 42 } }, "32": { "class_type": "StringConcatenate", "inputs": { "delimiter": "\n\n", "string_a": "head_swap: start with Picture 1 as the base image, keeping its lighting, environment, and background. remove the head from Picture 1 completely and replace it with the head from Picture 2, strictly preserving the hair, eye color, nose structure of Picture 2. copy the direction of the eye, head rotation, micro expressions from Picture 1, high quality, sharp details, 4k.", "string_b": [ "31", 0 ] } }, "40": { "class_type": "FaceSegment", "inputs": { "Earring": false, "Eyeglasses": true, "Hair": true, "Left-ear": true, "Left-eye": true, "Left-eyebrow": true, "Lower-lip": true, "Mouth": true, "Neck": true, "Nose": true, "Right-ear": true, "Right-eye": true, "Right-eyebrow": true, "Skin": true, "Upper-lip": true, "background": "Alpha", "background_color": "#222222", "images": [ "1", 0 ], "invert_output": false, "mask_blur": 0, "mask_offset": 0, "process_res": 1024 } }, "41": { "class_type": "InpaintCropImproved", "inputs": { "context_from_mask_extend_factor": 1.5, "device_mode": "gpu (much faster)", "downscale_algorithm": "lanczos", "extend_down_factor": 1.0, "extend_for_outpainting": false, "extend_left_factor": 1.0, "extend_right_factor": 1.0, "extend_up_factor": 1.0, "image": [ "1", 0 ], "mask": [ "40", 1 ], "mask_blend_pixels": 32, "mask_expand_pixels": 40, "mask_fill_holes": true, "mask_hipass_filter": 0.1, "mask_invert": false, "output_padding": "32", "output_resize_to_target_size": true, "output_target_height": 1024, "output_target_width": 1024, "preresize": false, "preresize_max_height": 16384, "preresize_max_width": 16384, "preresize_min_height": 1024, "preresize_min_width": 1024, "preresize_mode": "ensure minimum resolution", "upscale_algorithm": "lanczos" } }, "42": { "class_type": "InpaintStitchImproved", "inputs": { "inpainted_image": [ "26", 0 ], "stitcher": [ "41", 0 ] } }, "5": { "class_type": "ResizeImageMaskNode", "inputs": { "input": [ "3", 0 ], "resize_type": "scale total pixels", "resize_type.megapixels": 1.0, "scale_method": "lanczos" } }, "6": { "class_type": "GetImageSize", "inputs": { "image": [ "41", 1 ] } }, "7": { "class_type": "EmptyFlux2LatentImage", "inputs": { "batch_size": 1, "height": [ "6", 1 ], "width": [ "6", 0 ] } }, "8": { "class_type": "CLIPLoader", "inputs": { "clip_name": "qwen_3_8b.safetensors", "device": "default", "type": "flux2" } }, "9": { "class_type": "UNETLoader", "inputs": { "unet_name": "flux-2-klein-9b.safetensors", "weight_dtype": "default" } } }