Stack_CN_union
One Union ControlNet, Up to Two Conditions, No Double-Loading
- image
- union_stack
- union_stack
Modern ControlNet checkpoints are usually "union" models - one file that covers canny, depth, pose, and half a dozen other conditions, selected by a mode at inference time instead of separate files per condition. Stack_CN_union is Apt_Preset's wrapper around exactly that pattern: load your union model once, pick up to two condition types from the same dropdown, and get a single stack object out - no loading the checkpoint twice or wiring two separate SetUnionControlNetType nodes to run two conditions at once.
The node's own description, translated, spells out the intent plainly: pick both type1 and type2 together for dual control ("common combos are lineart + depth, pose + depth"), or leave one at None and use the other alone for single-condition control.
What the type list actually is
type1 and type2 share the same nine choices: None, openpose, depth, hed/pidi/scribble/ted, canny/lineart/anime_lineart/mlsd, normal, segment, tile, repaint. If a few of those look bundled together, that's normal for a union model - a 2024-era SDXL union checkpoint groups several interchangeable preprocessors under one input slot because the model doesn't care which specific edge or softedge detector produced the map, only which family of condition it belongs to.
Inputs and outputs
- image - your preprocessed control image (a canny edge map, a depth map, whatever your chosen type expects).
- controlNet - a dropdown of union checkpoints found in your
models/controlnetfolder. The schema only showsNonebecause this list is populated dynamically at runtime - Apt_Preset ships no model weights of its own, you need an actual union checkpoint downloaded and placed there first. - type1 / type2 - the condition(s) to apply, as above.
- strength (default 0.8, 0–10) - how hard the condition pushes.
- start_percent / end_percent (0–1, default 0 and 1) - when during sampling the condition is active.
- union_stack (optional) - chain another Stack_CN_union node in here to layer on more conditions than one node's two slots allow.
Output: union_stack, a UNION_STACK object meant to feed the pack's own downstream sampler/loader node.
The one opinion worth having
The default strength 0.8 with start_percent 0 / end_percent 1 holds the condition through the entire sample - the blunt-force setting. Modern union checkpoints generally publish lower recommended scales than the old SD-era 1.0 default (Shakker's Flux union suggests 0.7–0.9 per condition, Alibaba PAI's Z-Image and Flux 2 unions recommend 0.65–0.8), and letting the condition end partway through - try end_percent around 0.5–0.6 first - frees up the later sampling steps for the model's own detail instead of locking the output to your control image the whole way through.
Installing it, and what you still need to download
ComfyUI Manager: search "ComfyUI-Apt_Preset," install, restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git, restart. Its install.bat dependency script is Windows-only - on Linux or a cloud box, read what it installs and pip-install that yourself, or let ComfyUI Manager's "install missing nodes" catch it.
This node does nothing useful on its own - you need an actual union ControlNet checkpoint in models/controlnet, and Apt_Preset doesn't bundle one. Good starting points from the current ecosystem: xinsir's SDXL union, Shakker's Flux Union Pro 2.0, InstantX's Qwen-Image union, or Alibaba PAI's Z-Image / Flux 2 Fun unions, matched to whichever base model you're actually generating with.
Troubleshooting
If controlNet shows nothing but None in the dropdown, that's not a bug - it means ComfyUI hasn't found a compatible checkpoint in models/controlnet yet; restart after adding one.
This pack has real reported install failures - a comfyui subreddit thread shows a user's console logging (IMPORT FAILED): ...ComfyUI-Apt_Preset. What resolved it was ComfyUI Manager's "install missing custom nodes," or manually re-cloning the repo and restarting.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| imageopt | IMAGE | — | |
| controlNetopt | COMBO | 1 options: None | |
| type1opt | COMBO | 9 options: None, openpose, depth, hed/pidi/scribble/ted, canny/lineart/anime_lineart/mlsd, normal, +3 | |
| type2opt | COMBO | 9 options: None, openpose, depth, hed/pidi/scribble/ted, canny/lineart/anime_lineart/mlsd, normal, +3 | |
| strengthopt | FLOAT | 0.8000–10 | — |
| start_percentopt | FLOAT | 0.000–1 | — |
| end_percentopt | FLOAT | 1.000–1 | — |
| union_stackopt | UNION_STACK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| union_stack | UNION_STACK | — |