Nodes/ComfyUI-Apt_Preset/param_preset_Unpack
ComfyUI Node

param_preset_Unpack

Get your ControlNet strengths and mix factors back out

By cardenluo·Created 2 years ago·Updated 17 days ago· 309
param_preset_Unpack
  • Drun
  • CN1_Strength
  • CN2_Strength
  • CN12_Strength
  • CN12_SwitchTime
  • mix1_factor
  • mix2_factor
  • factor
  • intA
  • intB

The other half of param_preset_pack. Feed it the bundled DPIPE and get back nine separate numbers, each correctly typed and ready to wire into whatever actually consumes it - a ControlNet strength input, a mix node, a seed field.

Part of ComfyUI-Apt_Preset's stack category. Pure pass-through, no computation.

How it works

There's nothing clever going on: it reads the nine values that were packed by param_preset_pack - two ControlNet strengths, a combined strength and switch-time, three generic mix/blend factors, and two generic integers - and outputs each as its own socket, FLOAT for the seven fractional values and INT for the two integer ones. The point of splitting this into a separate node from the pack step is the same reason you'd bundle in the first place: keep the "what values am I using" decision compact near the top of the graph, then unpack wherever you actually need the individual numbers, possibly in more than one place if several downstream nodes share the same preset.

Because the split is purely mechanical, you can reuse one Drun bundle in several places at once - unpack it twice, feed CN1_Strength into two different ControlNet stacks that are supposed to stay in sync, and change the value exactly once, upstream on the pack node, instead of hunting down every place it's used.

Inputs and outputs

  • Drun - the required DPIPE input, produced upstream by param_preset_pack. This is a custom type specific to that node; nothing else in ComfyUI produces it.

Nine outputs: CN1_Strength, CN2_Strength, CN12_Strength, CN12_SwitchTime, mix1_factor, mix2_factor, factor (all FLOAT), plus intA and intB (INT).

Installing it

ComfyUI Manager: search "ComfyUI-Apt_Preset", install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git

Restart afterward. install.bat covers Windows dependencies; Linux/Mac, install from the requirements file inside your ComfyUI venv. Nothing here needs a model or external file.

Common issues

No input to connect to Drun. You need a param_preset_pack node feeding it - this input type is specific to that node's output and won't accept a plain float or a value from anywhere else.

Unpacked values are all still at their defaults, not what you set upstream. Double-check you actually changed the fields on the param_preset_pack node rather than leaving them at their default of 1 - a common mistake when you're moving fast and assume you set a value that never actually got touched.

Values look right here but the downstream effect is wrong. This node only hands back numbers - it doesn't know or care what they're being used for. If a CN1_Strength of 1.5 isn't doing what you expect, the problem is almost certainly in how it's wired further downstream (which ControlNet slot it's feeding, whether that ControlNet is even active) rather than in the unpack step itself.

Reused a Drun bundle in two places and only one of them updated. Check that both consuming ends are actually wired to outputs of this unpack node, not to two separate param_preset_Unpack nodes each fed by a different, out-of-sync param_preset_pack. One bundle, one unpack node, multiple downstream wires - that's the pattern that keeps values in sync; two unpack nodes off two separate packs will happily drift apart.

CategoryApt_Preset/stack

Inputs (1)

NameTypeDefaultDescription
DrunDPIPE

Outputs (9)

NameTypeDescription
CN1_StrengthFLOAT
CN2_StrengthFLOAT
CN12_StrengthFLOAT
CN12_SwitchTimeFLOAT
mix1_factorFLOAT
mix2_factorFLOAT
factorFLOAT
intAINT
intBINT