Nodes/ComfyUI-AutomaticCFG/Automatic CFG - Preset Loader
ComfyUI Node Runs on cloud

Automatic CFG - Preset Loader

26 hand-tuned CFG recipes behind one dropdown

By Extraltodeus·Created 3 years ago·Updated 25 days ago· 428
Automatic CFG - Preset Loader
  • model
  • join_global_parameters
  • Model
  • Preset name
  • Parameters as string
presetExcellent_attention
uncond_sigma_end0.0
use_uncond_sigma_end_from_presettrue
automatic_cfg

If the plain Automatic CFG node is the one dial you actually touch, the Preset Loader is the whole control room. It loads one of 26 shipped .json presets - each a full configuration for the same underlying patch engine - so you get attention tweaks, negative handling, and automatic CFG rescaling all from a single dropdown instead of a wall of toggles. Most are faster than the original node, some are slower, and a few are genuinely weird. The default, Excellent_attention, is the same preset the standalone Excellent attention node applies.

The honest framing: this is the node to reach for once the plain Automatic CFG has sold you on the idea and you want the curated stuff - attention-layer mutes, custom attention modifications, boosted negatives - without opening the Advanced node.

How it works

A preset is just a JSON file of parameters, saved into the pack's presets/ folder (that's also where the Advanced node's "save as preset" writes). The loader reads one, lets you override a couple of top-level things, and hands the whole dict to the same advancedDynamicCFG.patch() engine the other nodes wrap. The two STRING outputs let you see exactly what got loaded: Preset name and a Parameters as string you can dump into a text-display node for debugging.

The inputs that matter

  • preset - the dropdown. 26 shipped choices. Highlights from the README's own notes: Crossed conds customized 3 is "amazing" on SD 1.5; Reinforced_style gives your negative prompt much more weight and works at 12 steps (slightly slower); The red riding latent is SDXL-only, an almost nonsensical mix that tends to dress characters in red; Potato Attention Guidance is great for portraits of happy people. Most of these were only really tested on SDXL.
  • automatic_cfg - From preset (default), or override to None / soft / hard / hard_squared / range. Handy when a preset is all about attention and you want to switch its CFG-rescaling behavior.
  • uncond_sigma_end with use_uncond_sigma_end_from_preset - override where in the sigma range the negative pass turns off. Leave the toggle on unless the preset's own value is misbehaving.

Optional join_global_parameters takes an ATTNMOD from the attention-modifier nodes and layers it on top of whatever the preset does - the main way you'd extend a preset without editing JSON.

The eval() warning is not a formality

Presets are JSON, but the strings inside get interpreted with Python's eval() at sampling time. The README is explicit: only load presets you trust, because a shared preset can execute arbitrary code. The author mentions he almost shipped a joke preset that would shut your computer down in 60 seconds to make the point. Don't grab random preset files from strangers; if you must, read the JSON first.

Also: don't delete Excellent_attention.json (or do_not_delete.json) - the loader lists files from the folder at startup, and several nodes assume those exist. If the preset list looks short or a node errors, check the folder is intact.

Install and use

Same pack as everything else here - ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Extraltodeus/ComfyUI-AutomaticCFG

Restart ComfyUI. Wire the Model output into your KSampler, set CFG to 8 on the sampler (the reference the presets assume), and start swapping presets with a fixed seed if you want honest before/afters. The loader is the best on-ramp to this pack's attention experiments - just keep the eval warning in mind and treat strangers' presets like executable files.

Categorymodel_patches/Automatic_CFG

Inputs (6)

NameTypeDefaultDescription
modelMODEL
presetCOMBOExcellent_attention26 options: A subtle touch, Crossed conds customized 1, Crossed conds customized 2, Crossed conds customized 3, everything_turned_off, Excellent_attention, +20
uncond_sigma_endFLOAT0.00–10000
use_uncond_sigma_end_from_presetBOOLEANtrue
automatic_cfgCOMBO6 options: From preset, None, soft, hard, hard_squared, range
join_global_parametersoptATTNMOD

Outputs (3)

NameTypeDescription
ModelMODEL
Preset nameSTRING
Parameters as stringSTRING