Nodes/ComfyUI-Apt_Preset/model_tool_assy
ComfyUI Node

model_tool_assy

FreeU, PAG, SAG, CFG-Norm, and flow-shift in one model patch

By cardenluo·Created 2 years ago·Updated 18 days ago· 309
model_tool_assy
  • model
  • MODEL
switch_freeUtrue
b11.30
b21.40
s10.90
s20.20
switch_PAGfalse
PAG_scale3.00
switch_SAGfalse
SAG_scale0.50
blur_sigma2.0
switch_CFGNormfalse
strength1.00
switch_AuraFlowfalse
shift1.73

This node is a grab bag of five different "make your model sample better, no training required" tricks, each with its own on/off switch, all patched onto your MODEL before it reaches the sampler. If you've used ComfyUI's own FreeU or PerturbedAttentionGuidance nodes separately, this is the same territory - Apt_Preset just collapsed five nodes' worth of switches and sliders into one.

Part of Apt_Preset's chx_tool/Model category - the "tool" nodes the pack's README frames as sitting between the loader and the sampler in its Loader → Controller → Sampler structure.

The five techniques, briefly

Only one is on by default (switch_freeU), so plugging this in and running does something real out of the box - worth knowing before you assume it's a no-op until you flip switches.

  • FreeU (switch_freeU, on by default; b1, b2, s1, s2) - rescales the UNet's backbone feature maps and skip connections. It's the classic training-free "sharper details for free" trick; push it too hard and you get an oversharpened, slightly waxy look instead of genuinely better detail.
  • PAG - Perturbed-Attention Guidance (switch_PAG, off; PAG_scale) - perturbs the self-attention maps and uses the difference as an extra guidance signal on top of CFG, generally tightening up structure and coherence.
  • SAG - Self-Attention Guidance (switch_SAG, off; SAG_scale, blur_sigma) - blurs the regions the model is attending to most and uses the gap between blurred and unblurred as guidance, which tends to recover fine detail CFG alone misses. blur_sigma controls how aggressive that blur is.
  • CFG normalization (switch_CFGNorm, off; strength) - renormalizes the guided prediction's magnitude, the same family of fix as ComfyUI's own Rescale-CFG node, aimed at the oversaturated, "burnt" look you get from pushing CFG scale too high.
  • Flow-matching timestep shift, labeled "AuraFlow" (switch_AuraFlow, off; shift) - this is the same knob ComfyUI exposes natively as ModelSamplingAuraFlow on flow-matching models (Flux, SD3, Z-Image, and relatives). It controls how sampling effort splits between composition and fine detail, and the right value is model-specific - the pack's default of 1.73 is not going to be correct for every base you run it on, so treat it as a starting point, not gospel.

All five are independent toggles on the same node, and they're meant to be tried one at a time. Turning all five on simultaneously is a good way to fight yourself - FreeU and PAG both push toward "more structure," for instance, and stacking them past sane values compounds instead of adding cleanly.

Inputs and outputs

The only required non-technique input is model, the MODEL to patch. Everything else is a switch plus its associated numeric parameters, listed above. The single output is a patched MODEL - wire it straight into your KSampler (or whichever sampler node you're using) in place of the original.

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 after. install.bat covers Windows dependencies; Linux/Mac, install from the repo's requirements file inside your ComfyUI venv. Nothing here needs a model download of its own - it's all runtime patches applied to whatever MODEL you already have loaded.

Common issues

Turned on switch_AuraFlow and the shift value seems to do nothing. This is a known trap with flow-matching shift generally, not specific to this node: some samplers and schedulers apply their own internal sigma shift and simply ignore whatever value you set externally. Check what sampler/scheduler combo you're running before concluding the switch is broken.

Images came out oversharpened or slightly artificial-looking. That's FreeU running at defaults or higher - it's on by default here, so if you didn't touch anything and the output looks "off" in a sharpening-artifact way, that's the first thing to turn down or off, not a mystery.

High-CFG burn-out didn't go away. Confirm switch_CFGNorm is actually on - it's off by default, so if you're fighting oversaturation at high CFG and haven't enabled it, the fix you're looking for is sitting unused on this same node.

Stacked several switches and the result got worse, not better. Expected - these five techniques were not designed as a "turn them all on for maximum quality" set. Isolate one at a time, find the ones that actually help your specific base model and subject matter, and only combine the ones you've individually confirmed help.

CategoryApt_Preset/chx_tool/Model

Inputs (15)

NameTypeDefaultDescription
modelMODEL
switch_freeUBOOLEANtrue
b1FLOAT1.300–10
b2FLOAT1.400–10
s1FLOAT0.900–10
s2FLOAT0.200–10
switch_PAGBOOLEANfalse
PAG_scaleFLOAT3.000–100
switch_SAGBOOLEANfalse
SAG_scaleFLOAT0.50-2–5
blur_sigmaFLOAT2.00–10
switch_CFGNormBOOLEANfalse
strengthFLOAT1.000–100
switch_AuraFlowBOOLEANfalse
shiftFLOAT1.730–100

Outputs (1)

NameTypeDescription
MODELMODEL