MixMod Depth Guider
Background model vs. foreground model
- component
- GUIDER
MixMod's Depth Guider is the most ambitious of the special guiders and the one with the hardest dependency. Where the Dynamic Mask "Alternative" guesses foreground from prediction magnitude, this one asks an actual depth model. It decodes the current latent, runs it through a Depth Anything estimator, and uses the resulting depth map to split the canvas into foreground and background - then your first model paints the foreground and your second model paints the background (or the other way around with invert).
Why bother? Because subject-versus-background is the single most common two-model split, and a depth map is a correct answer to "what's in front of what" instead of a heuristic guess. Background models and character models genuinely want different weights on different pixels, and letting each own its depth layer is the cleanest way to get there. It also matches the pack's overall promise of mixing a composition-focused model with a detail-focused one - the depth split just makes the boundary explicit.
Inputs
- sharpness (default 0, 0–1) - exaggerates the depth contrast before thresholding. Higher = harder foreground/background separation and more aggressive masks; 0 uses the raw depth.
- start (default 0, 0–100) - the sampling step at which the depth map is computed and the masks are built. It generates once, around this step, then the masks are held and used for the rest of the pass - so earlier means the split is decided while the image is still rough.
- invert (optional, default false) - swap which model gets foreground vs. background.
- component (required) - the chained
COMPONENTset (needs two models to mean anything). Output:GUIDER.
The dependency you can't skip
This is the one MixMod node that will not run out of the box. Its first requirement is ComfyUI ControlNet Aux (comfyui_controlnet_aux) - the Depth Anything detector lives there, and the guider imports it at construction time. If it's missing, the node raises and falls back to team mode, so the error is at least honest. It also loads a TAESD (taesdxl) mini-VAE from ComfyUI's vae_approx folder to decode the latent for depth estimation - that ships with core ComfyUI, so no manual download, but it does mean the depth pass is running a tiny VAE plus a depth network alongside your two checkpoints on the first steps. Expect a noticeable VRAM and latency bump, and don't be surprised if the very first run downloads the Depth Anything weights (the detector pulls from pretrained on first use).
Installing
The pack itself installs like any other: ComfyUI Manager → search "ComfyUI-MixMod", or
cd ComfyUI/custom_nodes
git clone https://github.com/kantsche/ComfyUI-MixMod
then restart. Then install ComfyUI ControlNet Aux the same way (Manager → "ComfyUI ControlNet Aux Preprocessors") and restart again. No requirements.txt in the pack for this - the depth dependency is a whole other custom node.
Troubleshooting
If you see the "Please install ComfyUI ControlNet Aux" error, that's the fallback telling you it silently dropped to team mode - install the preprocessor pack and rerun. If the mask never seems to split the image sensibly, check sharpness (0 gives soft, ambiguous boundaries on busy scenes) and start (too early and the latent is still noise-shaped; too late and the subject is already locked in by one model). And budget for the first step being slow - depth estimation inside the sampling loop is the most expensive single thing this pack does.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| component | COMPONENT | — | |
| sharpness | FLOAT | 0.000–1 | — |
| start | INT | 00–100 | — |
| invertopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| GUIDER | GUIDER | — |