Skip to content
Python

face-swap redraws only the face oval; kick-ad holds still; chameleon on morph

neuregexa7702db84384
diff --git a/README.md b/README.md
index e98c8eb..81cd6c6 100644
--- a/README.md
+++ b/README.md
@@ -123,7 +123,7 @@ command that makes every example. Add a line to the table there, not a folder by
| `asmr-product` | ASMR Add-On | `video` | product photo |
| `asmr-whisper` | ASMR Classic | `video` | your photo |
| `asmr-host` | ASMR Host | `video` | your photo |
-| `chameleon` | Chameleon | `video` | product photo |
+| `chameleon` | Chameleon | `morph` | product photo |
| `magic-button` | Magic button | `video` | product photo |
| `truck-ad` | Truck Ad | `video` | product photo |
| `kick-ad` | Kick Ad | `video` | product photo |
diff --git a/apps/chameleon/app.json b/apps/chameleon/app.json
index 9e387c8..8441fe3 100644
--- a/apps/chameleon/app.json
+++ b/apps/chameleon/app.json
@@ -3,15 +3,15 @@
"id": "chameleon",
"name": "Chameleon",
"section": "video",
- "summary": "A chameleon climbs onto your product and takes its colors.",
+ "summary": "A chameleon appears on your product and takes its colors; the product stays as it is.",
"higgsfield_feature": "Chameleon",
"pack": "video-ltx25",
"status": "ready",
"workflow": "workflow.api.json",
"source": {
- "template": "video_ltx2_5_i2v.json",
+ "template": "comfyui_workflow_templates video_ltx2_5_flf2v.json (0.1.115) + image_flux3_klein_distilled_image_edit.json",
"comfyui": "0.42.0",
- "notes": "Template app written by tools/template_apps.py: the workflow is apps/video's (built by tools/build_apps.py); the prompt below is fixed and \"Extra direction\" is appended to it."
+ "notes": "Template app written by tools/template_apps.py: the workflow is apps/morph's (built by tools/build_apps.py) with a fixed Klein instruction for the last frame (node edit:4: \"Add a chameleon perched on top of this exact product. The chameleon's skin copies the product's colors and pattern exactly, so it blends into it. The product itself unchanged, same background, macro product photo.\"); the prompt below is fixed and \"Extra direction\" is appended to it."
},
"inputs": [
{
@@ -24,7 +24,7 @@
},
"bind": [
{
- "node": "395",
+ "node": "31",
"field": "image"
}
]
@@ -37,75 +37,95 @@
"help": "Added at the end of the app's prompt.",
"bind": [
{
- "node": "398:376",
+ "node": "251:252",
"field": "value",
- "template": "A chameleon crawls onto the product and slowly changes its skin to the exact colors and pattern of the product, blinking, macro lens; soft ambient jungle sound. {details}"
+ "template": "A chameleon climbs up onto the product and its skin shifts to the product's own colors and pattern, it blinks and rolls one eye; soft jungle ambience. {details}"
}
]
},
{
- "id": "duration",
- "type": "slider",
- "label": "Seconds",
- "min": 2,
- "max": 10,
- "step": 1,
- "default": 5,
- "bind": [
+ "id": "aspect",
+ "type": "select",
+ "label": "Format",
+ "default": "landscape",
+ "options": [
{
- "node": "398:362",
- "field": "value"
+ "value": "portrait",
+ "label": "9:16",
+ "sets": [
+ {
+ "node": "251:215",
+ "field": "value",
+ "value": 720
+ },
+ {
+ "node": "251:216",
+ "field": "value",
+ "value": 1280
+ }
+ ]
+ },
+ {
+ "value": "landscape",
+ "label": "16:9",
+ "sets": [
+ {
+ "node": "251:215",
+ "field": "value",
+ "value": 1280
+ },
+ {
+ "node": "251:216",
+ "field": "value",
+ "value": 720
+ }
+ ]
+ },
+ {
+ "value": "square",
+ "label": "1:1",
+ "sets": [
+ {
+ "node": "251:215",
+ "field": "value",
+ "value": 960
+ },
+ {
+ "node": "251:216",
+ "field": "value",
+ "value": 960
+ }
+ ]
}
]
},
{
- "id": "enhance",
- "type": "toggle",
- "label": "Enhance prompt",
- "default": true,
- "help": "Rewrites your prompt with a small Gemma 4 model first",
+ "id": "duration",
+ "type": "slider",
+ "label": "Seconds",
+ "min": 2,
+ "max": 6,
+ "step": 1,
+ "default": 4,
"bind": [
{
- "node": "398:383",
+ "node": "251:198",
"field": "value"
}
]
},
{
- "id": "aspect",
- "type": "select",
- "label": "Aspect ratio",
- "default": "16:9 (Widescreen)",
- "options": [
- {
- "value": "16:9 (Widescreen)",
- "label": "16:9"
- },
- {
- "value": "9:16 (Portrait Widescreen)",
- "label": "9:16"
- },
- {
- "value": "1:1 (Square)",
- "label": "1:1"
- },
- {
- "value": "4:3 (Standard)",
- "label": "4:3"
- },
- {
- "value": "3:4 (Portrait Standard)",
- "label": "3:4"
- },
- {
- "value": "21:9 (Ultrawide)",
- "label": "21:9"
- }
- ],
+ "id": "strength",
+ "type": "slider",
+ "label": "Transition strength",
+ "min": 0,
+ "max": 1.5,
+ "step": 0.05,
+ "default": 1.0,
"bind": [
{
- "node": "403",
- "field": "aspect_ratio"
+ "node": "ff_lora",
+ "field": "strength_model"
}
]
},
@@ -117,15 +137,19 @@
"help": "-1 picks a random seed",
"bind": [
{
- "node": "398:339",
+ "node": "251:196",
"field": "noise_seed"
+ },
+ {
+ "node": "edit:7",
+ "field": "seed"
}
]
}
],
"outputs": [
{
- "node": "75",
+ "node": "68",
"type": "video",
"label": "Result"
}
@@ -167,15 +191,6 @@
"gated": true,
"license": "LTX-2.x Community License"
},
- {
- "repo": "Lightricks/LTX-2.5",
- "file": "latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors",
- "dir": "latent_upscale_models",
- "gb": 1.0,
- "phase": "aux",
- "gated": true,
- "license": "LTX-2.x Community License"
- },
{
"repo": "Comfy-Org/gemma-4",
"file": "text_encoders/gemma4_e2b_it_int8_convrot.safetensors",
@@ -184,15 +199,52 @@
"phase": "encode",
"license": "Apache-2.0",
"optional": true
+ },
+ {
+ "repo": "joyfox/LTX-2.3-Transition-LORA",
+ "file": "ltx2.3-transition.safetensors",
+ "dir": "loras",
+ "gb": 0.39,
+ "phase": "denoise",
+ "license": "Apache-2.0"
+ },
+ {
+ "repo": "black-forest-labs/flux-3-image-klein-comfy",
+ "file": "diffusion_models/flux3-image-klein-int8-convrot.safetensors",
+ "dir": "diffusion_models",
+ "gb": 5.83,
+ "phase": "aux",
+ "gated": true,
+ "license": "FLUX Kommunity License"
+ },
+ {
+ "repo": "black-forest-labs/flux-3-image-klein-comfy",
+ "file": "text_encoders/qwen3vl_4b_int8_convrot.safetensors",
+ "dir": "text_encoders",
+ "gb": 4.86,
+ "phase": "aux",
+ "gated": true,
+ "license": "FLUX Kommunity License"
+ },
+ {
+ "repo": "black-forest-labs/flux-3-image-klein-comfy",
+ "file": "vae/flux2-vae.safetensors",
+ "dir": "vae",
+ "gb": 0.34,
+ "phase": "aux",
+ "gated": true,
+ "license": "FLUX Kommunity License"
}
],
"credits": [
"LTX-2.5 by Lightricks",
- "Workflow adapted from ComfyUI's official LTX-2.5 template"
+ "FLUX 3 Image Klein by Black Forest Labs",
+ "Transition LoRA by joyfox (Apache-2.0)",
+ "Workflow adapted from ComfyUI's official LTX-2.5 and FLUX 3 Klein templates"
],
"test": {
"image": "test/portrait.png",
- "duration": 2,
- "aspect": "16:9 (Widescreen)"
+ "duration": 4,
+ "aspect": "landscape"
}
}
diff --git a/apps/chameleon/workflow.api.json b/apps/chameleon/workflow.api.json
index 7d862e7..f04f427 100644
--- a/apps/chameleon/workflow.api.json
+++ b/apps/chameleon/workflow.api.json
@@ -1,9 +1,18 @@
{
- "75": {
+ "31": {
+ "class_type": "LoadImage",
+ "inputs": {
+ "image": "robot_hand.png"
+ },
+ "_meta": {
+ "title": "Load First Frame"
+ }
+ },
+ "68": {
"class_type": "SaveVideo",
"inputs": {
"video": [
- "398:370",
+ "251:218",
0
],
"filename_prefix": "freefield/chameleon",
@@ -14,547 +23,553 @@
"title": "Save Video"
}
},
- "395": {
- "class_type": "LoadImage",
- "inputs": {
- "image": "neon_cyborg_portrait.png"
- },
- "_meta": {
- "title": "Load First Frame"
- }
- },
- "398:338": {
- "class_type": "RandomNoise",
+ "251:195": {
+ "class_type": "LTXVPreprocess",
"inputs": {
- "noise_seed": 42
+ "image": [
+ "251:214",
+ 0
+ ],
+ "img_compression": 18
},
"_meta": {
- "title": "RandomNoise"
+ "title": "LTXV Preprocess"
}
},
- "398:339": {
+ "251:196": {
"class_type": "RandomNoise",
"inputs": {
- "noise_seed": 900359092894726
+ "noise_seed": 358144640282042
},
"_meta": {
"title": "RandomNoise"
}
},
- "398:340": {
- "class_type": "LTXVConcatAVLatent",
+ "251:197": {
+ "class_type": "LTXVEmptyLatentAudio",
"inputs": {
- "video_latent": [
- "398:349",
+ "audio_vae": [
+ "251:227",
0
],
- "audio_latent": [
- "398:367",
+ "frames_number": [
+ "251:226",
1
- ]
+ ],
+ "frame_rate": [
+ "251:205",
+ 0
+ ],
+ "batch_size": 1
},
"_meta": {
- "title": "Concat AV Latent"
+ "title": "Empty LTXV Latent Audio"
}
},
- "398:341": {
- "class_type": "KSamplerSelect",
+ "251:198": {
+ "class_type": "PrimitiveInt",
"inputs": {
- "sampler_name": "euler_ancestral"
+ "value": 5
},
"_meta": {
- "title": "KSamplerSelect"
+ "title": "Duration"
}
},
- "398:344": {
- "class_type": "SamplerCustomAdvanced",
+ "251:199": {
+ "class_type": "LTXVPreprocess",
"inputs": {
- "noise": [
- "398:339",
- 0
- ],
- "guider": [
- "398:388",
+ "image": [
+ "251:213",
0
],
- "sampler": [
- "398:352",
+ "img_compression": 18
+ },
+ "_meta": {
+ "title": "LTXV Preprocess"
+ }
+ },
+ "251:200": {
+ "class_type": "LTXVCropGuides",
+ "inputs": {
+ "positive": [
+ "251:204",
0
],
- "sigmas": [
- "398:397",
- 0
+ "negative": [
+ "251:204",
+ 1
],
- "latent_image": [
- "398:377",
+ "latent": [
+ "251:221",
0
]
},
"_meta": {
- "title": "SamplerCustomAdvanced"
+ "title": "LTXVCropGuides"
}
},
- "398:348": {
- "class_type": "LTXVLatentUpsampler",
+ "251:201": {
+ "class_type": "EmptyLTXVLatentVideo",
"inputs": {
- "samples": [
- "398:367",
+ "width": [
+ "251:203",
0
],
- "upscale_model": [
- "398:371",
- 0
+ "height": [
+ "251:203",
+ 1
],
- "vae": [
- "398:385",
- 0
- ]
+ "length": [
+ "251:226",
+ 1
+ ],
+ "batch_size": 1
},
"_meta": {
- "title": "LTXVLatentUpsampler"
+ "title": "Empty LTXV Latent Video"
}
},
- "398:349": {
- "class_type": "LTXVImgToVideoInplace",
+ "251:202": {
+ "class_type": "LTXVConditioning",
"inputs": {
- "vae": [
- "398:385",
- 0
- ],
- "image": [
- "398:350",
+ "positive": [
+ "251:222",
0
],
- "latent": [
- "398:348",
+ "negative": [
+ "251:217",
0
],
- "bypass": [
- "398:363",
+ "frame_rate": [
+ "251:212",
0
- ],
- "strength": 1
+ ]
},
"_meta": {
- "title": "LTXVImgToVideoInplace"
+ "title": "LTXVConditioning"
}
},
- "398:350": {
- "class_type": "LTXVPreprocess",
+ "251:203": {
+ "class_type": "GetImageSize",
"inputs": {
"image": [
- "398:351",
+ "251:213",
0
- ],
- "img_compression": 18
+ ]
},
"_meta": {
- "title": "LTXV Preprocess"
+ "title": "Get Image Size"
}
},
- "398:351": {
- "class_type": "ResizeImageMaskNode",
+ "251:204": {
+ "class_type": "LTXVAddGuide",
"inputs": {
- "input": [
- "395",
+ "positive": [
+ "251:206",
0
],
- "resize_type": "scale longer dimension",
- "resize_type.longer_size": 1536,
- "scale_method": "lanczos"
+ "negative": [
+ "251:206",
+ 1
+ ],
+ "vae": [
+ "251:229",
+ 0
+ ],
+ "latent": [
+ "251:206",
+ 2
+ ],
+ "image": [
+ "251:195",
+ 0
+ ],
+ "frame_idx": -1,
+ "strength": 0.7
},
"_meta": {
- "title": "Resize Image/Mask"
+ "title": "LTXVAddGuide"
}
},
- "398:352": {
- "class_type": "KSamplerSelect",
+ "251:205": {
+ "class_type": "PrimitiveInt",
"inputs": {
- "sampler_name": "euler_ancestral"
+ "value": 24
},
"_meta": {
- "title": "KSamplerSelect"
+ "title": "Frame Rate(int)"
}
},
- "398:353": {
- "class_type": "ComfyMathExpression",
+ "251:206": {
+ "class_type": "LTXVAddGuide",
"inputs": {
- "values.a": [
- "398:372",
+ "positive": [
+ "251:202",
+ 0
+ ],
+ "negative": [
+ "251:202",
+ 1
+ ],
+ "vae": [
+ "251:229",
+ 0
+ ],
+ "latent": [
+ "251:201",
+ 0
+ ],
+ "image": [
+ "251:199",
0
],
- "expression": "a/2"
+ "frame_idx": 0,
+ "strength": 0.7
},
"_meta": {
- "title": "Math Expression"
+ "title": "LTXVAddGuide"
}
},
- "398:355": {
- "class_type": "ComfyMathExpression",
+ "251:208": {
+ "class_type": "SamplerEulerAncestral",
"inputs": {
- "values.a": [
- "398:360",
- 0
- ],
- "expression": "a/2"
+ "eta": 0,
+ "s_noise": 1
},
"_meta": {
- "title": "Math Expression"
+ "title": "SamplerEulerAncestral"
}
},
- "398:356": {
- "class_type": "EmptyLTXVLatentVideo",
+ "251:210": {
+ "class_type": "LTXVConcatAVLatent",
"inputs": {
- "width": [
- "398:353",
- 1
- ],
- "height": [
- "398:355",
- 1
- ],
- "length": [
- "398:378",
- 1
+ "video_latent": [
+ "251:204",
+ 2
],
- "batch_size": 1
+ "audio_latent": [
+ "251:197",
+ 0
+ ]
},
"_meta": {
- "title": "Empty LTXV Latent Video"
+ "title": "Concat AV Latent"
}
},
- "398:357": {
- "class_type": "LTXVImgToVideoInplace",
+ "251:211": {
+ "class_type": "SamplerCustomAdvanced",
"inputs": {
- "vae": [
- "398:385",
+ "noise": [
+ "251:196",
0
],
- "image": [
- "398:350",
+ "guider": [
+ "251:235",
0
],
- "latent": [
- "398:356",
+ "sampler": [
+ "251:208",
0
],
- "bypass": [
- "398:363",
+ "sigmas": [
+ "251:239",
0
],
- "strength": 0.7
- },
- "_meta": {
- "title": "LTXVImgToVideoInplace"
- }
- },
- "398:358": {
- "class_type": "LTXVAudioVAEDecode",
- "inputs": {
- "samples": [
- "398:369",
- 1
- ],
- "audio_vae": [
- "398:386",
+ "latent_image": [
+ "251:210",
0
]
},
"_meta": {
- "title": "LTXV Audio VAE Decode"
+ "title": "SamplerCustomAdvanced"
}
},
- "398:359": {
+ "251:212": {
"class_type": "ComfyMathExpression",
"inputs": {
"values.a": [
- "398:361",
+ "251:205",
0
],
"expression": "a"
},
"_meta": {
- "title": "Math Expression (fps)"
+ "title": "Math Expression"
}
},
- "398:360": {
- "class_type": "PrimitiveInt",
+ "251:213": {
+ "class_type": "ResizeImageMaskNode",
"inputs": {
- "value": [
- "403",
- 1
- ]
+ "input": [
+ "31",
+ 0
+ ],
+ "resize_type.width": [
+ "251:215",
+ 0
+ ],
+ "resize_type.height": [
+ "251:216",
+ 0
+ ],
+ "resize_type": "scale dimensions",
+ "resize_type.crop": "center",
+ "scale_method": "nearest-exact"
},
"_meta": {
- "title": "Height"
+ "title": "Resize Image/Mask"
}
},
- "398:361": {
- "class_type": "PrimitiveInt",
+ "251:214": {
+ "class_type": "ResizeImageMaskNode",
"inputs": {
- "value": 24
+ "input": [
+ "edit:8",
+ 0
+ ],
+ "resize_type.width": [
+ "251:215",
+ 0
+ ],
+ "resize_type.height": [
+ "251:216",
+ 0
+ ],
+ "resize_type": "scale dimensions",
+ "resize_type.crop": "center",
+ "scale_method": "nearest-exact"
},
"_meta": {
- "title": "Frame Rate"
+ "title": "Resize Image/Mask"
}
},
- "398:362": {
+ "251:215": {
"class_type": "PrimitiveInt",
"inputs": {
- "value": 5
+ "value": 1280
},
"_meta": {
- "title": "Duration"
+ "title": "Width"
}
},
- "398:363": {
- "class_type": "PrimitiveBoolean",
+ "251:216": {
+ "class_type": "PrimitiveInt",
"inputs": {
- "value": false
+ "value": 720
},
"_meta": {
- "title": "Switch to Text to Video?"
+ "title": "height"
}
},
- "398:364": {
+ "251:217": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
- "398:387",
+ "251:228",
0
],
- "text": [
- "398:382",
- 0
- ]
+ "text": "blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise, grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones, deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands, wrong hand count, artifacts around text, unreadable text on shirt or hat, incorrect lettering on cap (“PNTR”), incorrect t-shirt slogan (“JUST DO IT”), missing microphone, misplaced microphone, inconsistent perspective, camera shake, incorrect depth of field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, smiling, laughing, exaggerated sadness, wrong gaze direction, eyes looking at camera, mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise, off-sync audio, missing sniff sounds, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, missing door or shelves, missing shallow depth of field, flat lighting, inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts."
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
- "398:365": {
- "class_type": "LTXVConditioning",
+ "251:218": {
+ "class_type": "CreateVideo",
"inputs": {
- "positive": [
- "398:364",
+ "images": [
+ "251:219",
0
],
- "negative": [
- "398:373",
+ "audio": [
+ "251:220",
0
],
- "frame_rate": [
- "398:359",
+ "fps": [
+ "251:212",
0
- ]
+ ],
+ "bit_depth": 8
},
"_meta": {
- "title": "LTXVConditioning"
+ "title": "Create Video"
}
},
- "398:366": {
- "class_type": "LTXVEmptyLatentAudio",
+ "251:219": {
+ "class_type": "VAEDecodeTiled",
"inputs": {
- "audio_vae": [
- "398:386",
- 0
+ "samples": [
+ "251:200",
+ 2
],
- "frames_number": [
- "398:378",
- 1
+ "vae": [
+ "251:229",
+ 0
],
- "frame_rate": [
- "398:359",
+ "tile_size": 512,
+ "overlap": 64,
+ "temporal_size": 64,
+ "temporal_overlap": 16
+ },
+ "_meta": {
+ "title": "VAE Decode (Tiled)"
+ }
+ },
+ "251:220": {
+ "class_type": "LTXVAudioVAEDecode",
+ "inputs": {
+ "samples": [
+ "251:221",
1
],
- "batch_size": 1
+ "audio_vae": [
+ "251:227",
+ 0
+ ]
},
"_meta": {
- "title": "Empty LTXV Latent Audio"
+ "title": "LTXV Audio VAE Decode"
}
},
- "398:367": {
+ "251:221": {
"class_type": "LTXVSeparateAVLatent",
"inputs": {
"av_latent": [
- "398:344",
- 0
+ "251:211",
+ 1
]
},
"_meta": {
"title": "Separate AV Latent"
}
},
- "398:368": {
- "class_type": "SamplerCustomAdvanced",
+ "251:222": {
+ "class_type": "CLIPTextEncode",
"inputs": {
- "noise": [
- "398:338",
- 0
- ],
- "guider": [
- "398:391",
- 0
- ],
- "sampler": [
- "398:341",
- 0
- ],
- "sigmas": [
- "398:396",
+ "clip": [
+ "251:228",
0
],
- "latent_image": [
- "398:340",
+ "text": [
+ "251:248",
0
]
},
"_meta": {
- "title": "SamplerCustomAdvanced"
+ "title": "CLIP Text Encode (Prompt)"
}
},
- "398:369": {
- "class_type": "LTXVSeparateAVLatent",
+ "251:226": {
+ "class_type": "ComfyMathExpression",
"inputs": {
- "av_latent": [
- "398:368",
+ "values.a": [
+ "251:198",
0
- ]
+ ],
+ "values.b": [
+ "251:205",
+ 0
+ ],
+ "expression": "a * b + 1"
},
"_meta": {
- "title": "Separate AV Latent"
+ "title": "Math Expression"
}
},
- "398:370": {
- "class_type": "CreateVideo",
+ "251:227": {
+ "class_type": "VAELoader",
"inputs": {
- "images": [
- "398:374",
- 0
- ],
- "audio": [
- "398:358",
- 0
- ],
- "fps": [
- "398:359",
- 0
- ],
- "bit_depth": 8
+ "vae_name": "ltx-2.5-audio-vae-bf16.safetensors"
},
"_meta": {
- "title": "Create Video"
+ "title": "Load VAE"
}
},
- "398:371": {
- "class_type": "LatentUpscaleModelLoader",
+ "251:228": {
+ "class_type": "CLIPLoader",
"inputs": {
- "model_name": "ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors"
+ "clip_name": "gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot.safetensors",
+ "type": "ltxv",
+ "device": "default"
},
"_meta": {
- "title": "Load Latent Upscale Model"
+ "title": "Load CLIP"
}
},
- "398:372": {
- "class_type": "PrimitiveInt",
+ "251:229": {
+ "class_type": "VAELoader",
"inputs": {
- "value": [
- "403",
- 0
- ]
+ "vae_name": "ltx-2.5-video-vae-bf16.safetensors"
},
"_meta": {
- "title": "Width"
+ "title": "Load VAE"
}
},
- "398:373": {
- "class_type": "CLIPTextEncode",
+ "251:230": {
+ "class_type": "UNETLoader",
"inputs": {
- "clip": [
- "398:387",
- 0
- ],
- "text": "pc game, console game, video game, cartoon, childish, ugly"
+ "unet_name": "ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors",
+ "weight_dtype": "default"
},
"_meta": {
- "title": "CLIP Text Encode (Prompt)"
+ "title": "Load Diffusion Model"
}
},
- "398:374": {
- "class_type": "VAEDecodeTiled",
+ "251:235": {
+ "class_type": "LTXVDualCFGGuider",
"inputs": {
- "samples": [
- "398:369",
+ "model": [
+ "ff_lora",
0
],
- "vae": [
- "398:385",
+ "positive": [
+ "251:204",
0
],
- "tile_size": 512,
- "overlap": 64,
- "temporal_size": 64,
- "temporal_overlap": 16
- },
- "_meta": {
- "title": "VAE Decode (Tiled)"
- }
- },
- "398:376": {
- "class_type": "PrimitiveStringMultiline",
- "inputs": {
- "value": "Egyptian royal in blue-and-gold headdress and high collar, white dress with golden embroidery and armbands, desert, robot soldiers in formation left and right. She walks steadily forward, head held level and gaze fixed ahead—no dipping or lowering of the head. The camera performs a single, smooth push-in only: starting in a wider shot of her, the robots, and the desert, it moves steadily forward until she is in a medium or medium-close frame, then holds. She stops, posture and head still upright, and says: “The old gods are silent. I am not.” Robot soldiers shift or march in place; sand and fabric move with the wind. No pull-back; the only camera move is the continuous push-in."
+ "negative": [
+ "251:204",
+ 1
+ ],
+ "video_cfg": 1,
+ "audio_cfg": 1
},
"_meta": {
- "title": "Prompt"
+ "title": "LTXV Dual CFG Guider"
}
},
- "398:377": {
- "class_type": "LTXVConcatAVLatent",
+ "251:239": {
+ "class_type": "ManualSigmas",
"inputs": {
- "video_latent": [
- "398:357",
- 0
- ],
- "audio_latent": [
- "398:366",
- 0
- ]
+ "sigmas": "1.0, 0.99375, 0.9875, 0.98125, 0.975, 0.909375, 0.725, 0.421875, 0.0"
},
"_meta": {
- "title": "Concat AV Latent"
+ "title": "ManualSigmas"
}
},
- "398:378": {
- "class_type": "ComfyMathExpression",
+ "251:246": {
+ "class_type": "CLIPLoader",
"inputs": {
- "values.a": [
- "398:362",
- 0
- ],
- "values.b": [
- "398:361",
- 0
- ],
- "expression": "a * b + 1"
+ "clip_name": "gemma4_e2b_it_int8_convrot.safetensors",
+ "type": "ltxv",
+ "device": "default"
},
"_meta": {
- "title": "Math Expression (length)"
+ "title": "Load CLIP"
}
},
- "398:380": {
+ "251:247": {
"class_type": "TextGenerateLTX2Prompt",
"inputs": {
"clip": [
- "398:393",
+ "251:246",
0
],
"image": [
- "398:350",
+ "251:199",
0
],
"prompt": [
- "398:376",
+ "251:252",
0
],
"max_length": 600,
@@ -573,19 +588,19 @@
"title": "Generate LTX2 Prompt"
}
},
- "398:382": {
+ "251:248": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
- "398:376",
+ "251:252",
0
],
"on_true": [
- "398:380",
+ "251:247",
0
],
"switch": [
- "398:383",
+ "251:250",
0
]
},
@@ -593,136 +608,163 @@
"title": "If/Else Switch"
}
},
- "398:383": {
+ "251:250": {
"class_type": "PrimitiveBoolean",
"inputs": {
- "value": true
+ "value": false
},
"_meta": {
"title": "Boolean (Enable Prompt Enhance)"
}
},
- "398:384": {
- "class_type": "UNETLoader",
+ "251:252": {
+ "class_type": "PrimitiveStringMultiline",
"inputs": {
- "unet_name": "ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors",
- "weight_dtype": "default"
+ "value": ""
},
"_meta": {
- "title": "Load Diffusion Model"
+ "title": "Prompt"
}
},
- "398:385": {
- "class_type": "VAELoader",
+ "ff_lora": {
+ "class_type": "LoraLoaderModelOnly",
"inputs": {
- "vae_name": "ltx-2.5-video-vae-bf16.safetensors"
+ "model": [
+ "251:230",
+ 0
+ ],
+ "lora_name": "ltx2.3-transition.safetensors",
+ "strength_model": 1.0
},
"_meta": {
- "title": "Load VAE"
+ "title": "Freefield LoRA"
}
},
- "398:386": {
- "class_type": "VAELoader",
+ "edit:1": {
+ "class_type": "UNETLoader",
"inputs": {
- "vae_name": "ltx-2.5-audio-vae-bf16.safetensors"
+ "unet_name": "flux3-image-klein-int8-convrot.safetensors",
+ "weight_dtype": "default"
},
"_meta": {
- "title": "Load VAE"
+ "title": "Load Diffusion Model"
}
},
- "398:387": {
+ "edit:2": {
"class_type": "CLIPLoader",
"inputs": {
- "clip_name": "gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot.safetensors",
- "type": "ltxv",
+ "clip_name": "qwen3vl_4b_int8_convrot.safetensors",
+ "type": "flux3",
"device": "default"
},
"_meta": {
"title": "Load CLIP"
}
},
- "398:388": {
- "class_type": "LTXVDualCFGGuider",
+ "edit:3": {
+ "class_type": "VAELoader",
"inputs": {
- "model": [
- "398:384",
- 0
- ],
- "positive": [
- "398:365",
+ "vae_name": "flux2-vae.safetensors"
+ },
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "edit:4": {
+ "class_type": "CLIPTextEncode",
+ "inputs": {
+ "clip": [
+ "edit:2",
0
],
- "negative": [
- "398:365",
- 1
- ],
- "video_cfg": 1,
- "audio_cfg": 1
+ "text": "Add a chameleon perched on top of this exact product. The chameleon's skin copies the product's colors and pattern exactly, so it blends into it. The product itself unchanged, same background, macro product photo."
},
"_meta": {
- "title": "LTXV Dual CFG Guider"
+ "title": "Positive Prompt"
}
},
- "398:391": {
- "class_type": "LTXVDualCFGGuider",
+ "edit:7": {
+ "class_type": "KSampler",
"inputs": {
"model": [
- "398:384",
+ "edit:1",
0
],
"positive": [
- "398:365",
+ "edit:17",
0
],
"negative": [
- "398:365",
+ "edit:17",
1
],
- "video_cfg": 1,
- "audio_cfg": 1
- },
- "_meta": {
- "title": "LTXV Dual CFG Guider"
- }
- },
- "398:393": {
- "class_type": "CLIPLoader",
- "inputs": {
- "clip_name": "gemma4_e2b_it_int8_convrot.safetensors",
- "type": "ltxv",
- "device": "default"
+ "latent_image": [
+ "edit:17",
+ 2
+ ],
+ "seed": 563228241303057,
+ "steps": 16,
+ "cfg": 1,
+ "sampler_name": "euler",
+ "scheduler": "simple",
+ "denoise": 1
},
"_meta": {
- "title": "Load CLIP"
+ "title": "KSampler"
}
},
- "398:396": {
- "class_type": "ManualSigmas",
+ "edit:8": {
+ "class_type": "VAEDecode",
"inputs": {
- "sigmas": "0.85, 0.7250, 0.4219, 0.0"
+ "samples": [
+ "edit:7",
+ 0
+ ],
+ "vae": [
+ "edit:3",
+ 0
+ ]
},
"_meta": {
- "title": "ManualSigmas"
+ "title": "VAE Decode"
}
},
- "398:397": {
- "class_type": "ManualSigmas",
+ "edit:17": {
+ "class_type": "ReferenceMultiLatent",
"inputs": {
- "sigmas": "1.0, 0.99375, 0.9875, 0.98125, 0.975, 0.909375, 0.725, 0.421875, 0.0"
+ "positive": [
+ "edit:4",
+ 0
+ ],
+ "negative": [
+ "edit:32",
+ 0
+ ],
+ "vae": [
+ "edit:3",
+ 0
+ ],
+ "images.image0": [
+ "31",
+ 0
+ ],
+ "resolution": "resize",
+ "resolution.megapixels": 1
},
"_meta": {
- "title": "ManualSigmas"
+ "title": "Set Reference Multi Latent"
}
},
- "403": {
- "class_type": "ResolutionSelector",
+ "edit:32": {
+ "class_type": "ConditioningZeroOut",
"inputs": {
- "aspect_ratio": "16:9 (Widescreen)",
- "megapixels": 0.9,
- "multiple": 32
+ "conditioning": [
+ "edit:4",
+ 0
+ ]
},
"_meta": {
- "title": "Resolution Selector"
+ "title": "Conditioning Zero Out"
}
}
}
diff --git a/apps/face-swap/app.json b/apps/face-swap/app.json
index 10a3696..d4abca1 100644
--- a/apps/face-swap/app.json
+++ b/apps/face-swap/app.json
@@ -11,7 +11,7 @@
"source": {
"template": "image_flux3_klein_distilled_image_edit.json",
"comfyui": "0.42.0",
- "notes": "Template app written by tools/template_apps.py: the workflow is apps/edit's (built by tools/build_apps.py) plus a second LoadImage on ReferenceMultiLatent's images.image1; the prompt below is fixed and \"Extra direction\" is appended to it."
+ "notes": "Template app written by tools/template_apps.py: the workflow is apps/edit's (built by tools/build_apps.py) plus a second LoadImage on ReferenceMultiLatent's images.image1; the sampler starts from the first image (scaled to 1 MP, encoded) with a noise mask on the face oval that the native MediaPipe nodes find, grown by 16 px, so only the face is redrawn; the prompt below is fixed and \"Extra direction\" is appended to it."
},
"inputs": [
{
@@ -55,7 +55,7 @@
{
"node": "4",
"field": "text",
- "template": "The photo from <ref_image_0> with the face replaced by the face of the person in <ref_image_1>, matching the original head angle, expression, lighting and skin tone; everything else unchanged. {details}"
+ "template": "Give the person in image 1 the face of the person in image 2: the eyes, nose, mouth, brows and face shape of image 2, blended into image 1's head angle, expression, lighting and skin tone. {details}"
}
]
},
@@ -122,10 +122,19 @@
"phase": "decode",
"gated": true,
"license": "FLUX Kommunity License"
+ },
+ {
+ "repo": "Comfy-Org/mediapipe",
+ "file": "detection/mediapipe_face_fp32.safetensors",
+ "dir": "detection",
+ "gb": 0.01,
+ "phase": "encode",
+ "license": "Apache-2.0"
}
],
"credits": [
- "FLUX 3 Image Klein by Black Forest Labs (FLUX Kommunity License)"
+ "FLUX 3 Image Klein by Black Forest Labs (FLUX Kommunity License)",
+ "MediaPipe Face Landmarker (Google, Apache-2.0), ComfyUI port: Comfy-Org/mediapipe"
],
"test": {
"image": "test/portrait.png",
diff --git a/apps/face-swap/workflow.api.json b/apps/face-swap/workflow.api.json
index be3697a..2ac57ae 100644
--- a/apps/face-swap/workflow.api.json
+++ b/apps/face-swap/workflow.api.json
@@ -58,8 +58,8 @@
1
],
"latent_image": [
- "17",
- 2
+ "fm_latent",
+ 0
],
"seed": 563228241303057,
"steps": 16,
@@ -160,5 +160,108 @@
"_meta": {
"title": "Second reference"
}
+ },
+ "fm_scale": {
+ "class_type": "ImageScaleToTotalPixels",
+ "inputs": {
+ "image": [
+ "11",
+ 0
+ ],
+ "upscale_method": "lanczos",
+ "megapixels": 1.0,
+ "resolution_steps": 16
+ },
+ "_meta": {
+ "title": "First image at 1 MP"
+ }
+ },
+ "fm_model": {
+ "class_type": "LoadMediaPipeFaceLandmarker",
+ "inputs": {
+ "model_name": "mediapipe_face_fp32.safetensors"
+ },
+ "_meta": {
+ "title": "MediaPipe face model"
+ }
+ },
+ "fm_find": {
+ "class_type": "MediaPipeFaceLandmarker",
+ "inputs": {
+ "face_detection_model": [
+ "fm_model",
+ 0
+ ],
+ "image": [
+ "fm_scale",
+ 0
+ ],
+ "detector_variant": "both",
+ "num_faces": 1,
+ "min_confidence": 0.5,
+ "missing_frame_fallback": "empty"
+ },
+ "_meta": {
+ "title": "Find the face"
+ }
+ },
+ "fm_mask": {
+ "class_type": "MediaPipeFaceMask",
+ "inputs": {
+ "face_landmarks": [
+ "fm_find",
+ 0
+ ],
+ "regions": "all"
+ },
+ "_meta": {
+ "title": "Face oval"
+ }
+ },
+ "fm_grow": {
+ "class_type": "GrowMask",
+ "inputs": {
+ "mask": [
+ "fm_mask",
+ 0
+ ],
+ "expand": 16,
+ "tapered_corners": true
+ },
+ "_meta": {
+ "title": "Grow the oval"
+ }
+ },
+ "fm_encode": {
+ "class_type": "VAEEncode",
+ "inputs": {
+ "pixels": [
+ "fm_scale",
+ 0
+ ],
+ "vae": [
+ "3",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Encode the first image"
+ }
+ },
+ "fm_latent": {
+ "class_type": "SetLatentNoiseMask",
+ "inputs": {
+ "samples": [
+ "fm_encode",
+ 0
+ ],
+ "mask": [
+ "fm_grow",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Only the face is redrawn"
+ }
}
}
diff --git a/apps/kick-ad/app.json b/apps/kick-ad/app.json
index fb88c98..8478319 100644
--- a/apps/kick-ad/app.json
+++ b/apps/kick-ad/app.json
@@ -3,7 +3,7 @@
"id": "kick-ad",
"name": "Kick Ad",
"section": "video",
- "summary": "Your product kicks the plain grey competition off screen.",
+ "summary": "Plain grey boxes slide at your product and get knocked off screen while it stands still.",
"higgsfield_feature": "Kick Ad",
"pack": "video-ltx25",
"status": "ready",
@@ -39,7 +39,7 @@
{
"node": "398:376",
"field": "value",
- "template": "The product stays centered and upright on the surface; the camera is locked. Each plain grey box that slides toward it is flicked away by a short hop of the product, which lands back on the same spot; the boxes tumble off screen. The product is in the center of the frame until the last frame. Comedic whoosh and thud sounds. {details}"
+ "template": "The product stands in the exact center of the frame and does not move at all for the whole shot; the camera is locked. Plain grey cardboard boxes slide in from the left and from the right and are knocked away the moment they touch it, flying off and tumbling out of the frame, while the product stays still and upright in the center until the last frame. Cartoon whoosh and thud sounds. {details}"
}
]
},
diff --git a/apps/shots/app.json b/apps/shots/app.json
index 141d8b4..dd9fed9 100644
--- a/apps/shots/app.json
+++ b/apps/shots/app.json
@@ -157,6 +157,7 @@
"Workflow: ComfyUI official template"
],
"test": {
- "image": "test/portrait.png"
+ "image": "test/portrait.png",
+ "shot": "将镜头转为特写镜头 Turn the camera to a close-up."
}
}
diff --git a/docs/vram-map.json b/docs/vram-map.json
index 544a9f8..2bddb0f 100644
--- a/docs/vram-map.json
+++ b/docs/vram-map.json
@@ -408,9 +408,9 @@
"section": "image",
"pack": "image-flux3",
"status": "ready",
- "whole_gb": 11.03,
+ "whole_gb": 11.04,
"phases_gb": {
- "encode": 4.86,
+ "encode": 4.87,
"denoise": 5.83,
"denoise2": 0.0,
"decode": 0.34,
@@ -1677,31 +1677,6 @@
"modal_gpu": "test on L4 / A10G; L40S (48 GB) is comfortable",
"measured_peak_gb": null
},
- {
- "id": "chameleon",
- "name": "Chameleon",
- "section": "video",
- "pack": "video-ltx25",
- "status": "ready",
- "whole_gb": 39.7,
- "phases_gb": {
- "encode": 15.37,
- "denoise": 21.5,
- "denoise2": 0.0,
- "decode": 1.83,
- "aux": 1.0
- },
- "largest_phase": "denoise",
- "largest_phase_gb": 21.5,
- "optional_gb": 5.2,
- "biggest_file": {
- "name": "ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors",
- "gb": 21.5
- },
- "verdict_24gb": "tight (by phases)",
- "modal_gpu": "test on L4 / A10G; L40S (48 GB) is comfortable",
- "measured_peak_gb": null
- },
{
"id": "idol",
"name": "Idol",
@@ -2177,6 +2152,31 @@
"modal_gpu": "test on L4 / A10G; L40S (48 GB) is comfortable",
"measured_peak_gb": null
},
+ {
+ "id": "chameleon",
+ "name": "Chameleon",
+ "section": "video",
+ "pack": "video-ltx25",
+ "status": "ready",
+ "whole_gb": 50.12,
+ "phases_gb": {
+ "encode": 15.37,
+ "denoise": 21.89,
+ "denoise2": 0.0,
+ "decode": 1.83,
+ "aux": 5.83
+ },
+ "largest_phase": "denoise",
+ "largest_phase_gb": 21.89,
+ "optional_gb": 5.2,
+ "biggest_file": {
+ "name": "ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors",
+ "gb": 21.5
+ },
+ "verdict_24gb": "tight (by phases)",
+ "modal_gpu": "test on L4 / A10G; L40S (48 GB) is comfortable",
+ "measured_peak_gb": null
+ },
{
"id": "cloud-surf",
"name": "Cloud Surf",
diff --git a/docs/vram-map.md b/docs/vram-map.md
index 0aa5408..68bd0df 100644
--- a/docs/vram-map.md
+++ b/docs/vram-map.md
@@ -75,7 +75,6 @@ When two apps run back to back with different models, the gateway asks ComfyUI t
| `asmr-product` | ready | 39.7 GB (+5.2 optional) | denoise 21.5 GB | ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors (21.5) | tight (by phases) | test on L4 / A10G; L40S (48 GB) is comfortable | not measured |
| `asmr-whisper` | ready | 39.7 GB (+5.2 optional) | denoise 21.5 GB | ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors (21.5) | tight (by phases) | test on L4 / A10G; L40S (48 GB) is comfortable | not measured |
| `behind-the-scenes` | ready | 39.7 GB (+5.2 optional) | denoise 21.5 GB | ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors (21.5) | tight (by phases) | test on L4 / A10G; L40S (48 GB) is comfortable | not measured |
-| `chameleon` | ready | 39.7 GB (+5.2 optional) | denoise 21.5 GB | ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors (21.5) | tight (by phases) | test on L4 / A10G; L40S (48 GB) is comfortable | not measured |
| `idol` | ready | 39.7 GB (+5.2 optional) | denoise 21.5 GB | ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors (21.5) | tight (by phases) | test on L4 / A10G; L40S (48 GB) is comfortable | not measured |
| `kick-ad` | ready | 39.7 GB (+5.2 optional) | denoise 21.5 GB | ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors (21.5) | tight (by phases) | test on L4 / A10G; L40S (48 GB) is comfortable | not measured |
| `magic-button` | ready | 39.7 GB (+5.2 optional) | denoise 21.5 GB | ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors (21.5) | tight (by phases) | test on L4 / A10G; L40S (48 GB) is comfortable | not measured |
@@ -95,6 +94,7 @@ When two apps run back to back with different models, the gateway asks ComfyUI t
| `whats-next` | ready | 31.2 GB | denoise 21.6 GB | qwen_image_edit_2509_fp8_e4m3fn.safetensors (20.4) | tight (by phases) | test on L4 / A10G; L40S (48 GB) is comfortable | not measured |
| `vfx-clean-plate` | ready | 39.0 GB (+5.2 optional) | denoise 21.8 GB | ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors (21.5) | tight (by phases) | test on L4 / A10G; L40S (48 GB) is comfortable | not measured |
| `vfx-day-to-night` | ready | 39.0 GB (+5.2 optional) | denoise 21.8 GB | ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors (21.5) | tight (by phases) | test on L4 / A10G; L40S (48 GB) is comfortable | not measured |
+| `chameleon` | ready | 50.1 GB (+5.2 optional) | denoise 21.9 GB | ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors (21.5) | tight (by phases) | test on L4 / A10G; L40S (48 GB) is comfortable | not measured |
| `cloud-surf` | ready | 50.1 GB (+5.2 optional) | denoise 21.9 GB | ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors (21.5) | tight (by phases) | test on L4 / A10G; L40S (48 GB) is comfortable | not measured |
| `morph` | ready | 50.1 GB (+5.2 optional) | denoise 21.9 GB | ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors (21.5) | tight (by phases) | test on L4 / A10G; L40S (48 GB) is comfortable | not measured |
| `roller-coaster` | ready | 50.1 GB (+5.2 optional) | denoise 21.9 GB | ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors (21.5) | tight (by phases) | test on L4 / A10G; L40S (48 GB) is comfortable | not measured |
diff --git a/infra/common.py b/infra/common.py
index 7bcb8ea..47d3c20 100644
--- a/infra/common.py
+++ b/infra/common.py
@@ -27,7 +27,7 @@ COMFY_DIR = "/comfyui"
MODELS_DIR = "/models"
MODEL_DIRS = ["diffusion_models", "text_encoders", "vae", "loras", "checkpoints", "clip_vision",
"latent_upscale_models", "upscale_models", "model_patches", "geometry_estimation",
- "background_removal", "frame_interpolation", "audio_encoders", "embeddings"]
+ "background_removal", "frame_interpolation", "audio_encoders", "embeddings", "detection"]
models_volume = modal.Volume.from_name("freefield-models", create_if_missing=True)
lab_volume = modal.Volume.from_name("freefield-lab", create_if_missing=True)
diff --git a/lab/cases.json b/lab/cases.json
index 0a86626..55e1a0a 100644
--- a/lab/cases.json
+++ b/lab/cases.json
@@ -399,20 +399,27 @@
"note": "Face Swap experiment B (same words, the two photos swapped): tells which image Klein treats as the base. Result in run 20261023-222828-h100: fails: returns the first photo almost unchanged."},
{"id": "tplx-face-swap-c", "app": "face-swap", "values": {"image": "@case:ref-face-a", "image2": "@case:ref-fx-woman-a"},
"overrides": [{"node": "4", "field": "text", "value": "Swap the face: give the woman in image 1 the face of the woman in image 2. Keep image 1's short black hair, denim jacket, pose, lighting and grey background; only the facial features come from image 2."}],
- "note": "Face Swap experiment C (two women who look different; image 1 / image 2 wording as in Klein's multi-reference examples)."},
+ "note": "Face Swap experiment C (two women who look different; image 1 / image 2 wording as in Klein's multi-reference examples). Result in run 20261023-225832-h100: fails: returns the first photo unchanged."},
{"id": "tplx-face-swap-d", "app": "face-swap", "values": {"image": "@case:ref-face-a", "image2": "@case:ref-fx-woman-a"},
"overrides": [{"node": "17", "field": "images.image0", "value": ["12", 0]}, {"node": "17", "field": "images.image1", "value": ["11", 0]}, {"node": "4", "field": "text", "value": "Swap the face: give the woman in image 2 the face of the woman in image 1. Keep image 2's short black hair, denim jacket, pose, lighting and grey background; only the facial features come from image 1."}],
- "note": "Face Swap experiment D (same pair, the face reference first in ReferenceMultiLatent): tells whether the order decides which face wins."},
- {"id": "tplx-chameleon-a", "app": "chameleon", "values": {"image": "@case:ref-fx-sneaker", "aspect": "16:9 (Widescreen)", "enhance": false},
+ "note": "Face Swap experiment D (same pair, the face reference first in ReferenceMultiLatent): tells whether the order decides which face wins. Result in run 20261023-225832-h100: fails: the first woman again, reframed to the second photo's size. Klein does not swap faces from references alone; Face Swap moved to a face-oval mask (MediaPipe) on the first image.."},
+ {"id": "tplx-chameleon-a", "app": "video", "values": {"image": "@case:ref-fx-sneaker", "aspect": "16:9 (Widescreen)", "enhance": false},
"overrides": [{"node": "398:376", "field": "value", "value": "Locked camera on the sneaker. A small green chameleon walks in from the left, climbs onto the sneaker and stops on top of it; its skin slowly changes to the sneaker's exact red and white colors and pattern, it blinks. Macro lens, soft jungle ambience."}],
- "note": "Chameleon experiment A (enhancer off, the chameleon walks in): in run 20261022-035829-h100 the pattern changed but no chameleon appeared."},
+ "note": "Chameleon experiment A (enhancer off, the chameleon walks in): in run 20261022-035829-h100 the pattern changed but no chameleon appeared. Result in run 20261023-225832-h100: works partly: the chameleon walks in and climbs on, but the sneaker takes a red pattern and the chameleon stays green. Chameleon moved to the morph base; this case now names the base app, video, where it ran.."},
{"id": "tplx-chameleon-m", "app": "morph", "values": {"image": "@case:ref-fx-sneaker", "effect": "astronaut", "details": "", "aspect": "landscape", "duration": 4},
"overrides": [{"node": "edit:4", "field": "text", "value": "Add a chameleon sitting on top of this exact sneaker, its skin colored and patterned exactly like the sneaker: white with red details. The sneaker unchanged, macro product photo, same background."}, {"node": "251:252", "field": "value", "value": "A chameleon appears on the sneaker and its skin takes on the sneaker's white and red colors, it blinks and turns its eye; soft jungle ambience."}],
- "note": "Chameleon on the morph recipe (Klein draws the chameleon in the sneaker's colors, the transition brings it in)."},
+ "note": "Chameleon on the morph recipe (Klein draws the chameleon in the sneaker's colors, the transition brings it in). Result in run 20261023-225832-h100: works partly: the sneaker stays intact and a chameleon climbs out of it, in its natural brown colors."},
{"id": "tplx-shots-low", "app": "shots", "values": {"image": "@case:ref-fx-lake", "shot": "将镜头转为仰视 Turn the camera to a low-angle view looking up."},
- "note": "Shots with the low-angle option: the wide-angle showcase made the hiker tiny (run 20261022-035829-h100)."},
+ "note": "Shots with the low-angle option: the wide-angle showcase made the hiker tiny (run 20261022-035829-h100). Result in run 20261023-225832-h100: works: the hiker a little larger, not much of a low angle."},
{"id": "tplx-shots-close", "app": "shots", "values": {"image": "@case:ref-fx-lake", "shot": "将镜头转为特写镜头 Turn the camera to a close-up."},
- "note": "Shots with the close-up option."},
+ "note": "Shots with the close-up option. Result in run 20261023-225832-h100: works: the hiker large in frame, from behind. Became the Shots showcase.."},
+ {"id": "tplx-kick-ad-s7", "app": "kick-ad", "values": {"image": "@case:ref-product", "aspect": "16:9 (Widescreen)", "enhance": false, "seed": 7},
+ "note": "Kick Ad as shipped on 24 Oct with seed 7 instead of 42: does the still-product wording hold on another seed?"},
+ {"id": "tplx-chameleon-m2", "app": "morph", "values": {"image": "@case:ref-fx-sneaker", "effect": "astronaut", "details": "", "aspect": "landscape", "duration": 4},
+ "overrides": [{"node": "edit:4", "field": "text", "value": "Add a chameleon perched on top of this exact sneaker. The chameleon is bright white with bold red patches on its head, back and tail, the same white and red as the sneaker. The sneaker itself unchanged, same background, macro product photo."}, {"node": "251:252", "field": "value", "value": "A chameleon climbs up onto the product and its skin shifts to the product's own colors and pattern, it blinks and rolls one eye; soft jungle ambience."}],
+ "note": "Chameleon on the morph base with the colors named (the template cannot name them): an upper bound for the generic instruction."},
+ {"id": "tplx-face-swap-e", "app": "face-swap", "values": {"image": "@case:ref-fx-woman-a", "image2": "@case:ref-face-a"},
+ "note": "Face Swap with the face-oval mask, the pair the other way round (long wavy brown hair gets the short-bob woman's face)."},
{"id": "ref-tpl-sketch", "app": "z-image", "values": {"prompt": "A rough pencil sketch on white paper of a cat sitting on a windowsill next to a potted plant, loose lines, no color", "width": 1024, "height": 1024},
"note": "Reference sketch for Sketch to Real."},
@@ -511,8 +518,8 @@
"note": "Outfit Shot. Studio shot in the cardigan, same face."},
{"id": "tpl-character-swap", "showcase": true, "app": "character-swap", "values": {"image": "@case:ref-fx-cafe", "image2": "@case:ref-fx-woman-a"},
"note": "Character Swap. The woman sits in the cafe in the man's place and pose."},
- {"id": "tpl-face-swap", "showcase": true, "app": "face-swap", "values": {"image": "@case:ref-face-a", "image2": "@case:ref-fx-woman-b"},
- "note": "Face Swap. Her portrait with the other woman's face; lighting matched."},
+ {"id": "tpl-face-swap", "showcase": true, "app": "face-swap", "values": {"image": "@case:ref-face-a", "image2": "@case:ref-fx-woman-a"},
+ "note": "Face Swap. Her portrait with the other woman's face; hair, jacket and background untouched."},
{"id": "tpl-behind-the-scenes", "showcase": true, "app": "behind-the-scenes", "values": {"image": "@case:ref-face-a", "aspect": "16:9 (Widescreen)"},
"note": "Behind the Scenes. A set appears around her as the camera widens."},
{"id": "tpl-asmr-product", "showcase": true, "app": "asmr-product", "values": {"image": "@case:ref-product", "aspect": "9:16 (Portrait Widescreen)"},
@@ -521,14 +528,14 @@
"note": "ASMR Classic. Whispering and tapping; calm."},
{"id": "tpl-asmr-host", "showcase": true, "app": "asmr-host", "values": {"image": "@case:ref-fx-man-b", "aspect": "9:16 (Portrait Widescreen)"},
"note": "ASMR Host. Studio, mic, whisper."},
- {"id": "tpl-chameleon", "showcase": true, "app": "chameleon", "values": {"image": "@case:ref-fx-sneaker", "aspect": "16:9 (Widescreen)"},
- "note": "Chameleon. The chameleon turns red and white like the sneaker."},
+ {"id": "tpl-chameleon", "showcase": true, "app": "chameleon", "values": {"image": "@case:ref-fx-sneaker", "aspect": "landscape", "duration": 4},
+ "note": "Chameleon. A white and red chameleon on the sneaker; the sneaker unchanged."},
{"id": "tpl-magic-button", "showcase": true, "app": "magic-button", "values": {"image": "@case:ref-product", "aspect": "9:16 (Portrait Widescreen)"},
"note": "Magic button. Button, sparks, the bottle floats."},
{"id": "tpl-truck-ad", "showcase": true, "app": "truck-ad", "values": {"image": "@case:ref-product", "aspect": "16:9 (Widescreen)", "enhance": false},
"note": "Truck Ad. A toy truck with the bottle printed on it parks beside it (tplx-truck-ad-b, 23 Oct)."},
{"id": "tpl-kick-ad", "showcase": true, "app": "kick-ad", "values": {"image": "@case:ref-product", "aspect": "16:9 (Widescreen)", "enhance": false},
- "note": "Kick Ad. Boxes fly off; the bottle stays put (tplx-kick-ad-b, 23 Oct). No real brands."},
+ "note": "Kick Ad. Grey boxes fly off; the bottle never moves. No real brands."},
{"id": "tpl-volcano-ad", "showcase": true, "app": "volcano-ad", "values": {"image": "@case:ref-product", "aspect": "landscape", "duration": 4},
"note": "Volcano Ad. The kitchen turns into a volcano behind the bottle; the label stays (first run on the morph base)."},
{"id": "tpl-roller-coaster", "showcase": true, "app": "roller-coaster", "values": {"image": "@case:ref-fx-woman-a", "aspect": "portrait", "duration": 4},
@@ -547,8 +554,8 @@
"note": "Idol. Stage, confetti, pose."},
{"id": "tpl-angles", "showcase": true, "app": "angles", "values": {"image": "@case:ref-fx-cafe"},
"note": "Angles 2.0. The cafe seen from 45° to the left; same people and table."},
- {"id": "tpl-shots", "showcase": true, "app": "shots", "values": {"image": "@case:ref-fx-lake"},
- "note": "Shots. The lake scene as a wide-angle shot."},
+ {"id": "tpl-shots", "showcase": true, "app": "shots", "values": {"image": "@case:ref-fx-lake", "shot": "将镜头转为特写镜头 Turn the camera to a close-up."},
+ "note": "Shots. The hiker large in frame, seen from behind (the wide-angle showcase made him tiny)."},
{"id": "tpl-zooms", "showcase": true, "app": "zooms", "values": {"image": "@case:ref-fx-street"},
"note": "Zooms. A close-up of the woman in the raincoat."},
{"id": "tpl-whats-next", "showcase": true, "app": "whats-next", "values": {"image": "@case:ref-fx-road"},
diff --git a/packs/image-flux3.json b/packs/image-flux3.json
index b910d3c..ce92c75 100644
--- a/packs/image-flux3.json
+++ b/packs/image-flux3.json
@@ -50,10 +50,22 @@
"ugc-shot",
"victory-card"
],
- "download_gb": 11.03,
+ "download_gb": 11.04,
"needs_hf_token": true,
"custom_nodes": [],
"models": [
+ {
+ "repo": "Comfy-Org/mediapipe",
+ "file": "detection/mediapipe_face_fp32.safetensors",
+ "dir": "detection",
+ "gb": 0.01,
+ "name": "mediapipe_face_fp32.safetensors",
+ "gated": false,
+ "license": "Apache-2.0",
+ "used_by": [
+ "face-swap"
+ ]
+ },
{
"repo": "black-forest-labs/flux-3-image-klein-comfy",
"file": "diffusion_models/flux3-image-klein-int8-convrot.safetensors",
diff --git a/packs/index.json b/packs/index.json
index 214c3eb..1338488 100644
--- a/packs/index.json
+++ b/packs/index.json
@@ -75,7 +75,7 @@
"ugc-shot",
"victory-card"
],
- "download_gb": 11.03,
+ "download_gb": 11.04,
"needs_hf_token": true
},
"image-krea2": {
diff --git a/packs/video-ltx25.json b/packs/video-ltx25.json
index b62ab92..5869a4d 100644
--- a/packs/video-ltx25.json
+++ b/packs/video-ltx25.json
@@ -51,6 +51,7 @@
"gated": true,
"license": "FLUX Kommunity License",
"used_by": [
+ "chameleon",
"cloud-surf",
"mixed-media",
"morph",
@@ -125,7 +126,6 @@
"asmr-product",
"asmr-whisper",
"behind-the-scenes",
- "chameleon",
"idol",
"kick-ad",
"magic-button",
@@ -270,6 +270,7 @@
"gated": false,
"license": "Apache-2.0",
"used_by": [
+ "chameleon",
"cloud-surf",
"morph",
"roller-coaster",
@@ -365,6 +366,7 @@
"gated": true,
"license": "FLUX Kommunity License",
"used_by": [
+ "chameleon",
"cloud-surf",
"mixed-media",
"morph",
@@ -381,6 +383,7 @@
"gated": true,
"license": "FLUX Kommunity License",
"used_by": [
+ "chameleon",
"cloud-surf",
"mixed-media",
"morph",
diff --git a/schema/app.schema.json b/schema/app.schema.json
index 3ebddca..1a70f3d 100644
--- a/schema/app.schema.json
+++ b/schema/app.schema.json
@@ -167,7 +167,7 @@
"enum": [
"diffusion_models", "text_encoders", "vae", "loras", "checkpoints", "clip_vision",
"latent_upscale_models", "upscale_models", "model_patches", "geometry_estimation",
- "background_removal", "frame_interpolation", "audio_encoders", "embeddings"
+ "background_removal", "frame_interpolation", "audio_encoders", "embeddings", "detection"
],
"description": "ComfyUI models/ subfolder."
},
diff --git a/tools/comfy_validate.py b/tools/comfy_validate.py
index 3cad8be..966be8d 100644
--- a/tools/comfy_validate.py
+++ b/tools/comfy_validate.py
@@ -32,7 +32,7 @@ ROOT = Path(__file__).resolve().parent.parent
MODEL_EXT = (".safetensors", ".gguf", ".pt", ".pth", ".bin", ".ckpt", ".sft")
MODEL_DIRS = ["diffusion_models", "text_encoders", "vae", "loras", "checkpoints", "clip_vision",
"latent_upscale_models", "upscale_models", "model_patches", "geometry_estimation",
- "background_removal", "frame_interpolation", "audio_encoders", "embeddings", "unet", "clip"]
+ "background_removal", "frame_interpolation", "audio_encoders", "embeddings", "detection", "unet", "clip"]
IMAGE_EXT = (".png", ".jpg", ".jpeg", ".webp")
VIDEO_EXT = (".mp4", ".webm", ".mov", ".mkv")
AUDIO_EXT = (".wav", ".mp3", ".flac", ".ogg", ".m4a")
diff --git a/tools/template_apps.py b/tools/template_apps.py
index 46469f6..21b481c 100644
--- a/tools/template_apps.py
+++ b/tools/template_apps.py
@@ -9,7 +9,8 @@
Each entry below is a Higgsfield app (its name in `feature`) rebuilt as a prompt template on one of
these bases, all workflows built by tools/build_apps.py:
edit FLUX 3 Image Klein's edit pipeline (apps/edit), one reference image
- edit2 the same with a second reference image (a garment, another person, a face)
+ edit2 the same with a second reference image (a garment, another person, a face); with
+ face_mask, MediaPipe finds the face in the first image and Klein redraws only that oval
z-image Z-Image Turbo (apps/z-image), text to image
video LTX-2.5 image-to-video (apps/video), with its own audio
qwen-edit Qwen-Image-Edit-2509 (apps/relight) with a different LoRA: Multiple Angles or next-scene
@@ -50,6 +51,10 @@ BASES = {
"keep": ("aspect", "duration", "strength", "seed"), "output": {"node": "68", "type": "video"}},
}
+# MediaPipe Face Landmarker as ComfyUI's native nodes load it (comfy_extras/nodes_mediapipe.py, blueprint "Image Face Detection")
+FACE_MODEL = {"repo": "Comfy-Org/mediapipe", "file": "detection/mediapipe_face_fp32.safetensors", "dir": "detection", "gb": 0.01, "phase": "encode",
+ "license": "Apache-2.0"}
+
# LoRAs the qwen-edit templates load instead of Relight (file name as ComfyUI sees it)
QWEN_LORAS = {
"angles": {"repo": "dx8152/Qwen-Edit-2509-Multiple-angles", "file": "镜头转换.safetensors", "gb": 0.24, "license": "Apache-2.0",
@@ -98,11 +103,12 @@ T = []
def A(id_, name, feature, cat, base, image_label, summary, prompt, inputs=(), ref=None, values=None, note="", image2_label=None, ref2=None, lora=None, help_=None,
- defaults=None, klein=None):
- """defaults: new defaults for settings kept from the base app (say, the LTX enhancer off); klein: the morph base's Klein instruction."""
+ defaults=None, klein=None, face_mask=False):
+ """defaults: new defaults for settings kept from the base app (say, the LTX enhancer off); klein: the morph base's Klein instruction;
+ face_mask (edit2): redraw only the face oval MediaPipe finds in the first image, so the rest of it stays as it is."""
T.append(dict(id=id_, name=name, feature=feature, cat=cat, base=base, image_label=image_label, summary=summary, prompt=prompt,
inputs=list(inputs), ref=ref, values=values or {}, note=note, image2_label=image2_label, ref2=ref2, lora=lora, help=help_,
- defaults=defaults or {}, klein=klein))
+ defaults=defaults or {}, klein=klein, face_mask=face_mask))
# ---------------------------------------------------------------- ads & products (apps/edit pipeline, a product photo)
@@ -373,10 +379,10 @@ A("character-swap", "Character Swap", "Character Swap", "identity", "edit2", "Sc
[], SCENE, {}, "The woman sits in the cafe in the man's place and pose.", image2_label="Photo of the new person", ref2=WOMAN)
A("face-swap", "Face Swap", "Face Swap", "identity", "edit2", "Photo to edit",
"Puts the face from a second photo onto the first; for faces you own or have permission to use.",
- "The photo from <ref_image_0> with the face replaced by the face of the person in <ref_image_1>, matching the original head angle, expression, lighting "
- "and skin tone; everything else unchanged.",
- [], PERSON, {}, "Her portrait with the other woman's face; lighting matched.", image2_label="Photo of the face", ref2=WOMAN_B,
- help_="Only faces you own or have permission to use.")
+ "Give the person in image 1 the face of the person in image 2: the eyes, nose, mouth, brows and face shape of image 2, blended into image 1's head "
+ "angle, expression, lighting and skin tone.",
+ [], PERSON, {}, "Her portrait with the other woman's face; hair, jacket and background untouched.", image2_label="Photo of the face", ref2=WOMAN,
+ help_="Only faces you own or have permission to use.", face_mask=True)
# ---------------------------------------------------------------- video templates (LTX-2.5 image-to-video, with sound)
A("behind-the-scenes", "Behind the Scenes", "Behind the Scenes", "clips", "video", "Your photo",
@@ -399,11 +405,13 @@ A("asmr-host", "ASMR Host", "ASMR Host", "clips", "video", "Your photo",
"The person sits in a cozy ASMR studio with a large microphone in front of them, fairy lights behind, and whispers into the mic while gently handling a soft "
"brush; close whispering sound.",
[], MAN, {"aspect": PORTRAIT}, "Studio, mic, whisper.")
-A("chameleon", "Chameleon", "Chameleon", "ads", "video", "Product photo",
- "A chameleon climbs onto your product and takes its colors.",
- "A chameleon crawls onto the product and slowly changes its skin to the exact colors and pattern of the product, blinking, macro lens; soft ambient "
- "jungle sound.",
- [], SNEAKER, {"aspect": "16:9 (Widescreen)"}, "The chameleon turns red and white like the sneaker.")
+A("chameleon", "Chameleon", "Chameleon", "ads", "morph", "Product photo",
+ "A chameleon appears on your product and takes its colors; the product stays as it is.",
+ "A chameleon climbs up onto the product and its skin shifts to the product's own colors and pattern, it blinks and rolls one eye; soft jungle ambience.",
+ [], SNEAKER, {"aspect": "landscape", "duration": 4}, "A white and red chameleon on the sneaker; the sneaker unchanged.",
+ defaults={"aspect": "landscape"},
+ klein="Add a chameleon perched on top of this exact product. The chameleon's skin copies the product's colors and pattern exactly, so it blends into it. "
+ "The product itself unchanged, same background, macro product photo.")
A("magic-button", "Magic Button", "Magic button", "ads", "video", "Product photo",
"A glowing button turns the scene around your product magical.",
"A hand presses a big glowing button next to the product; the scene transforms into a magical world with floating sparks and soft light, the product "
@@ -416,11 +424,11 @@ A("truck-ad", "Truck Ad", "Truck Ad", "ads", "video", "Product photo",
[], PRODUCT, {"aspect": "16:9 (Widescreen)", "enhance": False}, "A toy truck with the bottle printed on it parks beside it (tplx-truck-ad-b, 23 Oct).",
defaults={"enhance": False})
A("kick-ad", "Kick Ad", "Kick Ad", "ads", "video", "Product photo",
- "Your product kicks the plain grey competition off screen.",
- "The product stays centered and upright on the surface; the camera is locked. Each plain grey box that slides toward it is flicked away by a short hop "
- "of the product, which lands back on the same spot; the boxes tumble off screen. The product is in the center of the frame until the last frame. "
- "Comedic whoosh and thud sounds.",
- [], PRODUCT, {"aspect": "16:9 (Widescreen)", "enhance": False}, "Boxes fly off; the bottle stays put (tplx-kick-ad-b, 23 Oct). No real brands.",
+ "Plain grey boxes slide at your product and get knocked off screen while it stands still.",
+ "The product stands in the exact center of the frame and does not move at all for the whole shot; the camera is locked. Plain grey cardboard boxes "
+ "slide in from the left and from the right and are knocked away the moment they touch it, flying off and tumbling out of the frame, while the product "
+ "stays still and upright in the center until the last frame. Cartoon whoosh and thud sounds.",
+ [], PRODUCT, {"aspect": "16:9 (Widescreen)", "enhance": False}, "Grey boxes fly off; the bottle never moves. No real brands.",
defaults={"enhance": False})
A("volcano-ad", "Volcano Ad", "Volcano Ad", "ads", "morph", "Product photo",
"The background turns into an erupting volcano behind your product.",
@@ -490,7 +498,7 @@ A("shots", "Shots", "Shots", "camera", "qwen-edit", "Your photo",
("Low angle", "将镜头转为仰视 Turn the camera to a low-angle view looking up."), ("Rotate 45° left", "将镜头向左旋转45度 Rotate the camera 45 degrees to the left."),
("Rotate 45° right", "将镜头向右旋转45度 Rotate the camera 45 degrees to the right."), ("Rotate 90° left", "将镜头向左旋转90度 Rotate the camera 90 degrees to the left."),
("From behind", "将镜头转到人物背后 Move the camera behind the subject.")])],
- LAKE, {}, "The lake scene as a wide-angle shot.", lora="angles")
+ LAKE, {"shot": "将镜头转为特写镜头 Turn the camera to a close-up."}, "The hiker large in frame, seen from behind (the wide-angle showcase made him tiny).", lora="angles")
A("zooms", "Zooms", "Zooms", "camera", "qwen-edit", "Your photo",
"Zoom levels of one image, from a wide view to an extreme close-up.",
"{zoom}",
@@ -533,6 +541,7 @@ def check() -> None:
assert (t["base"] == "edit2") == bool(t["image2_label"] and t["ref2"]), t["id"]
assert (t["base"] == "qwen-edit") == (t["lora"] in QWEN_LORAS), t["id"]
assert (t["base"] == "morph") == bool(t["klein"]), t["id"]
+ assert not t["face_mask"] or t["base"] == "edit2", t["id"]
assert not t["klein"] or not re.search(r"\{[a-z]", t["klein"]), (t["id"], "the Klein instruction is fixed")
for k in t["defaults"]:
assert k in BASES[t["base"]]["keep"], (t["id"], k)
@@ -566,6 +575,11 @@ def manifest(t: dict) -> dict:
notes = f"Template app written by tools/template_apps.py: the workflow is apps/{base['app']}'s (built by tools/build_apps.py)"
if t["base"] == "edit2":
notes += " plus a second LoadImage on ReferenceMultiLatent's images.image1"
+ if t["face_mask"]:
+ notes += ("; the sampler starts from the first image (scaled to 1 MP, encoded) with a noise mask on the face oval that the native "
+ "MediaPipe nodes find, grown by 16 px, so only the face is redrawn")
+ models = models + [FACE_MODEL]
+ credits = credits + ["MediaPipe Face Landmarker (Google, Apache-2.0), ComfyUI port: Comfy-Org/mediapipe"]
if t["base"] == "morph":
notes += f" with a fixed Klein instruction for the last frame (node edit:4: \"{t['klein']}\")"
if t["lora"]:
@@ -597,6 +611,20 @@ def workflow(t: dict) -> dict:
if t["base"] == "edit2": # a second reference image into the same ReferenceMultiLatent
api["12"] = {"class_type": "LoadImage", "inputs": {"image": "second.png"}, "_meta": {"title": "Second reference"}}
api["17"]["inputs"]["images.image1"] = ["12", 0]
+ if t["face_mask"]: # start from the first image and let the sampler change only the face oval
+ api["fm_scale"] = {"class_type": "ImageScaleToTotalPixels", "inputs": {"image": ["11", 0], "upscale_method": "lanczos", "megapixels": 1.0,
+ "resolution_steps": 16}, "_meta": {"title": "First image at 1 MP"}}
+ api["fm_model"] = {"class_type": "LoadMediaPipeFaceLandmarker", "inputs": {"model_name": FACE_MODEL["file"].split("/")[-1]},
+ "_meta": {"title": "MediaPipe face model"}}
+ api["fm_find"] = {"class_type": "MediaPipeFaceLandmarker", "inputs": {"face_detection_model": ["fm_model", 0], "image": ["fm_scale", 0],
+ "detector_variant": "both", "num_faces": 1, "min_confidence": 0.5,
+ "missing_frame_fallback": "empty"}, "_meta": {"title": "Find the face"}}
+ api["fm_mask"] = {"class_type": "MediaPipeFaceMask", "inputs": {"face_landmarks": ["fm_find", 0], "regions": "all"}, "_meta": {"title": "Face oval"}}
+ api["fm_grow"] = {"class_type": "GrowMask", "inputs": {"mask": ["fm_mask", 0], "expand": 16, "tapered_corners": True}, "_meta": {"title": "Grow the oval"}}
+ api["fm_encode"] = {"class_type": "VAEEncode", "inputs": {"pixels": ["fm_scale", 0], "vae": ["3", 0]}, "_meta": {"title": "Encode the first image"}}
+ api["fm_latent"] = {"class_type": "SetLatentNoiseMask", "inputs": {"samples": ["fm_encode", 0], "mask": ["fm_grow", 0]},
+ "_meta": {"title": "Only the face is redrawn"}}
+ api["7"]["inputs"]["latent_image"] = ["fm_latent", 0]
if t["base"] == "morph": # the last frame Klein draws is fixed per template
api[base["klein"][0]]["inputs"][base["klein"][1]] = t["klein"]
if t["lora"]: # the relight pipeline with another LoRA; node 14 prepends the Relight trigger, so it is blanked