Nodes/ComfyUI-Apt_Preset/sum_stack_image
ComfyUI Node

sum_stack_image

Sum_stack_image and the end of ControlNet spaghetti

By cardenluo·Created 2 years ago·Updated 5 days ago· 327
sum_stack_image
  • context
  • model
  • lora_stack
  • ipa_stack
  • redux_stack
  • condi_stack
  • union_stack
  • cn_stack
  • inpaint
  • latent_stack
  • context
  • model
  • positive
  • negative
  • latent
  • vae
  • clip
  • image

A serious image workflow doesn't just prompt - it conditions. IPAdapter for style, Redux for composition transfer, Union ControlNet for structure, an inpaint pass for redraws. In stock ComfyUI, wiring all of that means five or six separate apply nodes strung through the graph, each one a place to miswire a connection. sum_stack_image is the Apt_Preset "Controller" for image work - the README's design doc in action. It takes the context and folds in every control stack the pack offers in one node: LoRA, IPAdapter, Redux, union ControlNet, classic ControlNet, inpaint, and latent stacks. You configure each stack in its own small node, feed the tokens here, and this node merges them all into the model, conditioning, and latent the sampler actually uses.

This is the node that most directly delivers the pack's pitch: fewer wires, clearer control concepts, and workflows that survive being reopened.

What it actually does

Reads the context (model, clip, latent, VAE, conditioning), then applies whatever stacks are connected, in a defined order:

  • lora_stack → patches the model and clip, then re-encodes the stored prompt.
  • ipa_stack → IPAdapter applied to the model (style/character reference conditioning).
  • redux_stack → the FLUX Redux-style image composition transfer, folded into the positive conditioning.
  • condi_stack / cn_stack → general conditioning and ControlNet stacks.
  • union_stack → Union ControlNet token, the unified single-ControlNet approach the KB notes every post-Flux family now has.
  • inpaint → inpaint stack for masked regeneration.
  • latent_stack → stacked latents.

Each stack's individual node does the fiddly config (which image, which strength, which preprocessor); this node just applies them in the right order. That's the whole architecture of the pack's "Controller" layer - config small, apply centralized.

The inputs that matter

The context, the model (optional override), and the stack tokens. For a beginner the useful ones are:

  • ipa_stack - IPAdapter reference: wire an image here for style or character consistency.
  • redux_stack - Redux: keep an image's overall composition/subject and re-render it.
  • union_stack - one ControlNet file covering multiple condition types (depth, edge, pose) from the union family.
  • cn_stack - classic ControlNet conditioning for the SD/XL-era files.
  • inpaint - masked redraw stack.
  • latent_stack - batch latent handling.

The outputs that matter

context (updated bundle), plus direct taps on model, positive, negative, latent, vae, clip, and image (whatever the context was carrying as an image, often the inpaint source). The extra typed outputs are there so you can grab one value for a non-pack node without unwrapping the context.

Wiring it in

sum_load_simplesum_TextEncode (prompts) → sum_stack_image with your stack tokens → sum_Ksampler. The stack tokens come from the pack's per-control nodes: IPAdapter stack builder, Redux stack builder, union ControlNet stack, inpaint stack.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git
cd ComfyUI-Apt_Preset
pip install -r requirements.txt   # Windows: double-click install.bat

Or ComfyUI Manager → ComfyUI-Apt_Preset. For ControlNet scheduling, the README requires ComfyUI-Advanced-ControlNet (Kosinkadink) installed.

Common issues

Order of operations is fixed and not documented per-input - if you expected the LoRA stack to run after the IPAdapter stack, the code applies LoRA first, then IPA, then Redux/CN/inpaint, and there's no way to reorder without reconnecting. Also, several stacks silently no-op if you connect a token but didn't configure its node (no image, strength 0, etc.), so "I connected everything and got a plain generation" usually means one of the stack-builders is empty. Check each stack node individually before blaming the hub.

CategoryApt_Preset/chx_tool

Inputs (10)

NameTypeDefaultDescription
contextRUN_CONTEXT
modeloptMODEL
lora_stackoptLORASTACK
ipa_stackoptIPA_STACK
redux_stackoptREDUX_STACK
condi_stackoptSTACK_CONDI
union_stackoptUNION_STACK
cn_stackoptCN_STACK
inpaintoptINPAINT_STACK
latent_stackoptLATENT_STACK

Outputs (8)

NameTypeDescription
contextRUN_CONTEXT
modelMODEL
positiveCONDITIONING
negativeCONDITIONING
latentLATENT
vaeVAE
clipCLIP
imageIMAGE