ποΈ Advanced CFG Controller (Easy Mode)
The preset node that stops you fiddling
- model
- Model
- Settings Info
If you've spent an evening at CFG 6.5, then 7.5, then back to 7, wondering why your SDXL image is either washed out or burnt, this node is aimed squarely at you. The Advanced CFG Controller (Easy Mode) is the friendly front end of the advanced-cfg-controller pack: it watches what the sampler is actually doing step by step and adjusts the CFG strength live, instead of trusting one fixed number for the whole denoising run. Pick a preset, wire it between your checkpoint and your sampler, and it does the knob-twiddling for you.
Straight up: this is a DDPM-era tool, built around the classic CFG 5β9 world of SD 1.5 and SDXL. If your checkpoint is a guidance-distilled model that runs at CFG 1 by design, there's no conditional/unconditional difference to amplify and nothing here will help - the pack's own README and presets assume "real CFG." Know what you're installing: this is a brand-new, single-commit pack from FlareAI-Studios with essentially zero community track record yet (don't expect to find threads about it). Treat it as experimental and keep your working baseline workflows around.
How it works
The node doesn't touch your prompt or your sampler settings. It clones your model and replaces ComfyUI's built-in CFG formula - normally uncond + (cond - uncond) * scale - with its own version that runs every step. "Adaptive CFG Mode" measures the intensity of the current denoised latent (a top-k style measurement, made finer by lowering "Measurement Precision") and nudges the effective scale toward your "Reference CFG Value" on the fly. "Skip Negative Prompt (Speed Boost)" leans on a separate hook that drops the negative/empty prompt pass entirely inside a chosen step window - that's the classic "CFG skips the uncond pass" optimization, and it's the biggest speed win here. When the negative is skipped, "Fake Negative Method" decides what stands in: copy the positive (fast), use a zero tensor (fastest), or reuse the previous step.
The rest of the panel is post-CFG cleanup on the model output. Color/contrast rescale, color-drift correction (subtracting the latent mean), smooth blending between steps, and a "Positive Prompt Modifier" that shapes the positive conditioning with things like Amplify Extremes or a sine wave. Every feature also has a sigma window (from step / until step) so you can, say, only rescale colors in the first third of generation.
The inputs that matter
- Preset - the whole point of this node. Vibrant Colors, Smooth & Clean, Sharp Details, Speed Mode, Maximum Speed, Quality Boost, Maximum Quality, Experimental AI, or Custom. Pick one and ignore everything else; the tooltip explains each.
- Adaptive CFG Mode - Disabled, Gentle, Standard (the default), Aggressive, Range Based, or Spectral Analysis. "Standard" is the sensible starting point.
- Skip Negative Prompt (Speed Boost) - on by default in most presets, off in Maximum Quality. Where people get burned: it changes results, not just speed, so A/B test it before trusting it.
- Fake Negative Method - "Use Zero (Fastest)" is the fastest but degrades quality; "Copy Positive (Fast)" is the usual sweet spot.
- Enable Color/Contrast Rescale + Rescale Target Intensity - the pack's answer to washed-out colors; 8β10 for punchy output.
Outputs are two: a patched Model (wire it to your KSampler's model input) and a Settings Info string that lists what ended up active - handy for debugging since presets silently override your manual settings.
Installing it
Via ComfyUI Manager, search for Advanced CFG Controller and install. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/FlareAI-Studios/advanced-cfg-controller
Then restart ComfyUI. There are no model downloads and no heavy dependencies - just torch/numpy/colorama, and ComfyUI already ships torch. The node appears under the model_patches category (the README's "Smart CFG Controller" and the installed "Advanced CFG Controller (Easy Mode)" are the same node - the name in the pack docs doesn't match the node list).
Gotchas
The pack monkeypatches ComfyUI's global sampling function the first time any of its nodes runs. It mostly just delegates back to the standard logic, but it's a process-wide change, so if another pack's sampler behavior goes weird after you enable this, a full ComfyUI restart is the first thing to try. Debug logging is genuinely useful here: tick Enable Debug Logging and watch the console to see what CFG value it actually applies per step. And remember the golden rule - change one setting at a time, because presets can mask whatever you're hand-tuning.
Inputs (30)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | β | |
| Preset | COMBO | Custom (Manual Settings) | π― QUICK START: Choose a preset for instant results! β’ Vibrant Colors: Enhanced saturation and contrast β’ Smooth & Clean: Soft, polished results β’ Sharp Details: Crisp, detailed output β’ Speed Mode: Faster generation with good quality β’ Maximum Speed: Fastest generation β’ Quality Boost: Better quality, slower β’ Maximum Quality: Best quality, slowest β’ Experimental AI: Latest AI techniques |
| Enable Debug Logging | BOOLEAN | false | Show detailed processing information in console |
| Adaptive CFG Mode | COMBO | Standard (Hard) | π€ AUTO-ADJUST CFG: Automatically adjusts CFG strength based on image content β’ Disabled: No auto-adjustment β’ Gentle: Subtle adjustments β’ Standard: Balanced adjustments (recommended) β’ Aggressive: Strong adjustments β’ Range Based: Uses value ranges β’ Spectral Analysis: Advanced AI analysis |
| Reference CFG Value | FLOAT | 8.01β30 | π― Target CFG strength for auto-adjustment (higher = stronger prompt adherence) |
| Measurement Precision (lower=precise) | FLOAT | 0.250.05β0.5 | π How precisely to measure image content (lower = more precise, slower) |
| Skip Negative Prompt (Speed Boost) | BOOLEAN | true | β‘ SPEED BOOST: Skip negative prompt calculation during certain steps for faster generation |
| Skip From Step (higher=more skip) | FLOAT | 15.00β100 | π Start skipping negative prompt at this step (higher = more skipping = faster) |
| Skip Until Step (lower=more skip) | FLOAT | 1.00β100 | π Stop skipping negative prompt at this step (lower = more skipping = faster) |
| Fake Negative Method | COMBO | Don't Fake | π What to use instead of negative prompt when skipping: β’ Don't Fake: Use real negative (slower but accurate) β’ Copy Positive: Use positive prompt (fast) β’ Use Zero: Use empty prompt (fastest) β’ Use Previous Step: Use previous result β’ Spectral Synthesis: AI-generated replacement |
| Enable Color/Contrast Rescale | BOOLEAN | false | π¨ COLOR BOOST: Automatically enhance colors and contrast |
| Rescale Calculation Method | COMBO | Standard (Hard) | π¨ How to calculate color enhancement: β’ Gentle: Subtle enhancement β’ Standard: Balanced enhancement β’ Range Based: Uses value ranges β’ Spectral: Advanced AI analysis |
| Rescale Target Intensity | FLOAT | 8.00β100 | π¨ Target color intensity (higher = more vibrant colors) |
| Rescale Active From Step | FLOAT | 15.00β100 | π¨ Start color enhancement at this step |
| Rescale Active Until Step | FLOAT | 3.00β100 | π¨ Stop color enhancement at this step |
| Fix Color Drift (Subtract Mean) | BOOLEAN | false | π§ COLOR FIX: Prevent color drift and maintain color balance |
| Color Fix Active From Step | FLOAT | 15.00β100 | π§ Start color drift correction at this step |
| Color Fix Active Until Step | FLOAT | 1.00β100 | π§ Stop color drift correction at this step |
| Enable Smooth Blending | BOOLEAN | false | β¨ SMOOTH RESULTS: Blend generation steps for smoother, more polished output |
| Blending Strength (higher=smoother) | FLOAT | 2.00β10 | β¨ How much to blend steps (higher = smoother but may reduce details) |
| Blending Active From Step | FLOAT | 15.00β100 | β¨ Start blending at this step |
| Blending Active Until Step | FLOAT | 1.00β100 | β¨ Stop blending at this step |
| Positive Prompt Modifier | COMBO | Disabled | π PROMPT BOOST: Enhance how your positive prompt is processed: β’ Disabled: No enhancement β’ Amplify Extremes: Boost strong prompt elements β’ Smooth Values: Soften prompt processing β’ Wave Transform: Rhythmic enhancement β’ Error Function: Mathematical smoothing β’ Spectral Normalization: AI-based enhancement β’ Frequency Filter: Smooth frequency response |
| Modifier Intensity | FLOAT | 2.00.1β10 | π Strength of prompt enhancement (higher = stronger effect) |
| Modifier Active From Step | FLOAT | 15.00β100 | π Start prompt enhancement at this step |
| Modifier Active Until Step | FLOAT | 1.00β100 | π Stop prompt enhancement at this step |
| Enable Performance Monitoring | BOOLEAN | false | π Show performance statistics and timing information |
| Adaptive Noise Injection | FLOAT | 0.000β0.5 | π² Add smart noise for better detail generation (0 = disabled) |
| Dynamic Range Compression | FLOAT | 1.000.1β1 | π Prevent oversaturation (1.0 = disabled, lower = more compression) |
| Memory Optimization | BOOLEAN | true | πΎ Optimize memory usage for better performance |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| Model | MODEL | β |
| Settings Info | STRING | β |