Nodes/advanced-cfg-controller/πŸŽ›οΈ Advanced CFG Controller (Easy Mode)
ComfyUI Node

πŸŽ›οΈ Advanced CFG Controller (Easy Mode)

The preset node that stops you fiddling

By FlareAI-StudiosΒ·Created 8 months agoΒ·Updated 8 months agoΒ· 1
πŸŽ›οΈ Advanced CFG Controller (Easy Mode)
  • model
  • Model
  • Settings Info
β—„PresetCustom (Manual Settings)β–Ί
β—„Enable Debug Loggingfalseβ–Ί
β—„Adaptive CFG ModeStandard (Hard)β–Ί
β—„Reference CFG Value8.0β–Ί
β—„Measurement Precision (lower=precise)0.25β–Ί
β—„Skip Negative Prompt (Speed Boost)trueβ–Ί
β—„Skip From Step (higher=more skip)15.0β–Ί
β—„Skip Until Step (lower=more skip)1.0β–Ί
β—„Fake Negative MethodDon't Fakeβ–Ί
β—„Enable Color/Contrast Rescalefalseβ–Ί
β—„Rescale Calculation MethodStandard (Hard)β–Ί
β—„Rescale Target Intensity8.0β–Ί
β—„Rescale Active From Step15.0β–Ί
β—„Rescale Active Until Step3.0β–Ί
β—„Fix Color Drift (Subtract Mean)falseβ–Ί
β—„Color Fix Active From Step15.0β–Ί
β—„Color Fix Active Until Step1.0β–Ί
β—„Enable Smooth Blendingfalseβ–Ί
β—„Blending Strength (higher=smoother)2.0β–Ί
β—„Blending Active From Step15.0β–Ί
β—„Blending Active Until Step1.0β–Ί
β—„Positive Prompt ModifierDisabledβ–Ί
β—„Modifier Intensity2.0β–Ί
β—„Modifier Active From Step15.0β–Ί
β—„Modifier Active Until Step1.0β–Ί
β—„Enable Performance Monitoringfalseβ–Ί
β—„Adaptive Noise Injection0.00β–Ί
β—„Dynamic Range Compression1.00β–Ί
β—„Memory Optimizationtrueβ–Ί

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.

Categorymodel_patches

Inputs (30)

NameTypeDefaultDescription
modelMODELβ€”
PresetCOMBOCustom (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 LoggingBOOLEANfalseShow detailed processing information in console
Adaptive CFG ModeCOMBOStandard (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 ValueFLOAT8.01–30🎯 Target CFG strength for auto-adjustment (higher = stronger prompt adherence)
Measurement Precision (lower=precise)FLOAT0.250.05–0.5πŸ” How precisely to measure image content (lower = more precise, slower)
Skip Negative Prompt (Speed Boost)BOOLEANtrue⚑ SPEED BOOST: Skip negative prompt calculation during certain steps for faster generation
Skip From Step (higher=more skip)FLOAT15.00–100🏁 Start skipping negative prompt at this step (higher = more skipping = faster)
Skip Until Step (lower=more skip)FLOAT1.00–100🏁 Stop skipping negative prompt at this step (lower = more skipping = faster)
Fake Negative MethodCOMBODon'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 RescaleBOOLEANfalse🎨 COLOR BOOST: Automatically enhance colors and contrast
Rescale Calculation MethodCOMBOStandard (Hard)🎨 How to calculate color enhancement: β€’ Gentle: Subtle enhancement β€’ Standard: Balanced enhancement β€’ Range Based: Uses value ranges β€’ Spectral: Advanced AI analysis
Rescale Target IntensityFLOAT8.00–100🎨 Target color intensity (higher = more vibrant colors)
Rescale Active From StepFLOAT15.00–100🎨 Start color enhancement at this step
Rescale Active Until StepFLOAT3.00–100🎨 Stop color enhancement at this step
Fix Color Drift (Subtract Mean)BOOLEANfalseπŸ”§ COLOR FIX: Prevent color drift and maintain color balance
Color Fix Active From StepFLOAT15.00–100πŸ”§ Start color drift correction at this step
Color Fix Active Until StepFLOAT1.00–100πŸ”§ Stop color drift correction at this step
Enable Smooth BlendingBOOLEANfalse✨ SMOOTH RESULTS: Blend generation steps for smoother, more polished output
Blending Strength (higher=smoother)FLOAT2.00–10✨ How much to blend steps (higher = smoother but may reduce details)
Blending Active From StepFLOAT15.00–100✨ Start blending at this step
Blending Active Until StepFLOAT1.00–100✨ Stop blending at this step
Positive Prompt ModifierCOMBODisabledπŸš€ 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 IntensityFLOAT2.00.1–10πŸš€ Strength of prompt enhancement (higher = stronger effect)
Modifier Active From StepFLOAT15.00–100πŸš€ Start prompt enhancement at this step
Modifier Active Until StepFLOAT1.00–100πŸš€ Stop prompt enhancement at this step
Enable Performance MonitoringBOOLEANfalseπŸ“Š Show performance statistics and timing information
Adaptive Noise InjectionFLOAT0.000–0.5🎲 Add smart noise for better detail generation (0 = disabled)
Dynamic Range CompressionFLOAT1.000.1–1πŸ“ˆ Prevent oversaturation (1.0 = disabled, lower = more compression)
Memory OptimizationBOOLEANtrueπŸ’Ύ Optimize memory usage for better performance

Outputs (2)

NameTypeDescription
ModelMODELβ€”
Settings InfoSTRINGβ€”