PreSampling (DynamicCFG)
PreSampling (DynamicCFG) – ComfyUI Node Guide
- pipe
- image_to_latent
- latent
- pipe
Regular CFG is a single number you set once and it holds steady for every step of denoising. easy preSamplingDynamicCFG lets that number change shape across the run instead - ramping down, curving up, sawtoothing, whatever your cfg_mode says - which is a real answer to a real problem: too-high CFG with too few steps is one of the most common ways a render falls apart right at the finish line, and a fixed CFG value is a blunt instrument for avoiding that.
Where this comes from. This node wraps mcmonkeyprojects' sd-dynamic-thresholding (DynamicThresholdingFull) - it's not Easy-Use's own invention, it's a well-established CFG-scheduling implementation that Easy-Use bundles behind its usual pipe-in/pipe-out interface. The whole point of Easy-Use's "PreSampling" category, as the pack's own docs put it, is separating sampling configuration from the sampling action - you set everything here, then pipe it into a matching easy kSampler, which lets you preview and tweak parameters without re-wiring your sampler node every time.
The CFG curve. cfg (default 8) is your starting value, cfg_scale_min (default 3.5) is the floor it can taper toward, and cfg_mode picks the shape connecting them - twelve options, including Constant (behaves like a normal fixed CFG), Linear Down / Cosine Down / Half Cosine Down (start strong, ease off - the useful default for the "burns at the end" problem), the mirrored Up variants, Power Up/Down, and the repeating/sawtooth modes for more experimental oscillating schedules. If you don't know why you'd want anything but Constant, that's fine - the honest default here is you probably want to start with a gentle Cosine Down and watch what changes before reaching for the exotic modes.
The rest of it is a standard sampler config. steps, sampler_name (44 choices - the full ComfyUI sampler list), scheduler (11 choices, including align_your_steps and gits), denoise, and seed all behave exactly like they would on any KSampler. image_to_latent (optional) lets you feed an image in directly instead of a pre-made latent, useful for img2img-style setups; latent (optional) is the more standard path. Required input is pipe; output is pipe, carrying your fully configured sampling settings forward.
Install. ComfyUI Manager (search "ComfyUI Easy Use") or:
cd ComfyUI/custom_nodes
git clone https://github.com/yolain/ComfyUI-Easy-Use
then restart. No extra models or heavy dependencies for this node specifically - sd-dynamic-thresholding's logic ships bundled in the pack.
Common issues. The most common mistake is treating cfg_scale_min as a second, independent setting rather than the floor of a curve - if your cfg_mode is Constant, cfg_scale_min does nothing at all, and people sometimes tweak it expecting a visible change and get confused when nothing moves. Also worth knowing generally: CFG itself only does anything meaningful above roughly 1 - distilled/turbo checkpoints run guidance-free at CFG 1 by design, and applying a dynamic CFG schedule on top of one of those models will mostly just re-apply guidance the checkpoint was trained not to need, which reads as oversaturation rather than improvement.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| pipe | PIPE_LINE | — | |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 8.000–100 | — |
| cfg_mode | COMBO | 12 options: Constant, Linear Down, Cosine Down, Half Cosine Down, Linear Up, Cosine Up, +6 | |
| cfg_scale_min | FLOAT | 3.50–100 | — |
| sampler_name | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| scheduler | COMBO | 11 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +5 | |
| denoise | FLOAT | 1.000–1 | — |
| seed | INT | 00–1125899906842624 | — |
| image_to_latentopt | IMAGE | — | |
| latentopt | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| pipe | PIPE_LINE | — |