advanced-cfg-controller
A ComfyUI extension with 10 custom nodes.
Nodes (10)
Smart CFG Controller - Easy Mode! ποΈ
β¨ NEW: Easy Mode Available!
Use the "ποΈ Smart CFG Controller (Easy Mode)" node for a simple, preset-based experience with tooltips and clear explanations!
A powerful yet user-friendly ComfyUI node for intelligent CFG (Classifier-Free Guidance) control. Choose from easy presets or dive into advanced settings for complete control.
π Quick Start Guide
Step 1: Choose Your Node
- ποΈ Smart CFG Controller (Easy Mode): User-friendly with presets and tooltips β RECOMMENDED FOR BEGINNERS
- βοΈ Advanced CFG Controller (Expert): Full manual control for experts
Step 2: Pick a Preset
Just select from the Preset dropdown:
π¨ Style Presets
- Vibrant Colors: Punchy, saturated colors - great for landscapes and portraits
- Smooth & Clean: Polished, artifact-free results - perfect for professional work
- Sharp Details: Maximum detail and crispness - ideal for architectural or technical images
β‘ Speed Presets
- Speed Mode: 2x faster generation with good quality
- Maximum Speed: 3x faster generation with acceptable quality
β¨ Quality Presets
- Quality Boost: Enhanced colors and contrast with moderate speed
- Maximum Quality: Best possible quality (slower generation)
π§ͺ Experimental
- Experimental AI: Latest AI techniques and enhancements
Step 3: Connect and Generate
- Connect your model to the node input
- Connect the node output to your sampler
- Generate! The node will automatically optimize everything
π How to Use Each Feature
π― Quick Start Section
- Preset: Choose a preset for instant results! Hover over the dropdown to see what each preset does
- Enable Debug Logging: Turn this on to see what the node is doing in the console
π€ Adaptive CFG (Auto-Adjustment)
This automatically adjusts your CFG strength based on what's in your image:
- Disabled: No auto-adjustment (use your sampler's CFG as-is)
- Gentle: Subtle adjustments - good for most images
- Standard: Balanced adjustments - recommended for most users
- Aggressive: Strong adjustments - for difficult prompts
β‘ Speed Optimization
Make generation faster by skipping expensive calculations:
- Skip Negative Prompt: Turn this ON for 2-3x speed boost
- Fake Negative Method: What to use instead of the real negative prompt
- Copy Positive (Fast): Good balance of speed and quality
- Use Zero (Fastest): Maximum speed, slight quality loss
π¨ Color & Contrast Enhancement
Automatically enhance your colors:
- Enable Color/Contrast Rescale: Turn this ON for more vibrant colors
- Rescale Target Intensity: Higher = more vibrant (try 9-10 for punchy colors)
π§ Color Drift Correction
Prevent color shifts during generation:
- Fix Color Drift: Turn this ON if you notice color changes during generation
β¨ Smooth Blending
Make results smoother and more polished:
- Enable Smooth Blending: Turn this ON for smoother, less noisy results
- Blending Strength: Higher = smoother (but may reduce fine details)
π Prompt Enhancement
Boost how your positive prompt is processed:
- Amplify Extremes: Makes strong prompt elements even stronger
- Smooth Values: Softens prompt processing for gentler results
- Spectral Normalization: AI-based enhancement (experimental)
π― Recommended Settings for Different Use Cases
Portraits & People
- Preset: "Smooth & Clean" or "Vibrant Colors"
- Enable Color/Contrast Rescale: β ON
- Fix Color Drift: β ON
- Enable Smooth Blending: β ON
Landscapes & Nature
- Preset: "Vibrant Colors" or "Sharp Details"
- Enable Color/Contrast Rescale: β ON
- Rescale Target Intensity: 9-10
- Positive Prompt Modifier: "Amplify Extremes"
Fast Previews & Testing
- Preset: "Speed Mode" or "Maximum Speed"
- Skip Negative Prompt: β ON
- Fake Negative Method: "Use Zero (Fastest)"
High Quality Final Images
- Preset: "Maximum Quality"
- Skip Negative Prompt: β OFF (for best quality)
- Enable Color/Contrast Rescale: β ON
- Fix Color Drift: β ON
Experimental & Artistic
- Preset: "Experimental AI"
- Adaptive CFG Mode: "Spectral Analysis"
- Positive Prompt Modifier: "Spectral Normalization"
- Enable Performance Monitoring: β ON (to see what's happening)
π Understanding the Tooltips
Each setting has detailed tooltips (hover over the parameter name) that explain:
- What the setting does
- When to use it
- What the different options mean
- Recommended values
Pro Tip: Always read the tooltips! They contain helpful explanations and recommendations.
π οΈ Available Nodes
Main Nodes
- ποΈ Smart CFG Controller (Easy Mode): User-friendly with presets β START HERE
- βοΈ Advanced CFG Controller (Expert): Full manual control for experts
Utility Nodes
- π§ CFG Post-Processing Only: Just the color/contrast fixes without CFG changes
- β CFG Controller Unpatch: Remove CFG modifications from a model
- π« Uncond Zero Controller: Special negative prompt handling
Attention Modification Nodes (Advanced)
- π― Attention Modifier Parameters: Fine-tune attention layers
- πͺ Attention Modifier Bruteforce: Aggressive attention modification
- π Attention Modifier Concat: Combine multiple attention modifications
- βοΈ Attention Modifier Single Layer Bypass: Skip specific attention layers
- π‘οΈ Attention Modifier Single Layer Temperature: Temperature control for attention
π¨ Troubleshooting
"My colors look washed out"
β Solution: Enable "Enable Color/Contrast Rescale" and set "Rescale Target Intensity" to 9-10
"Generation is too slow"
β Solution: Use "Speed Mode" preset or enable "Skip Negative Prompt" with "Use Zero (Fastest)"
"Too many artifacts/noise"
β Solution: Use "Smooth & Clean" preset or enable "Enable Smooth Blending"
"Colors keep shifting during generation"
β Solution: Enable "Fix Color Drift (Subtract Mean)"
"I want more vibrant colors"
β Solution: Use "Vibrant Colors" preset or enable "Enable Color/Contrast Rescale" with high "Rescale Target Intensity"
"Node not showing up"
β Solution:
- Restart ComfyUI completely
- Check the console for error messages
- Make sure the node is in the
model_patchescategory - Look for "ποΈ Smart CFG Controller (Easy Mode)"
π‘ Pro Tips
- Start with presets: Always try a preset first before manual adjustments
- Enable debug logging: Turn on debug logging to see what the node is doing
- Read tooltips: Hover over parameter names for detailed explanations
- Test with simple prompts: Try the node with basic prompts first
- One change at a time: When customizing, change one setting at a time to see its effect
- Save working settings: When you find settings you like, note them down for future use
π§ Installation
- Download/clone this repository to your ComfyUI
custom_nodesfolder - Restart ComfyUI
- Look for "ποΈ Smart CFG Controller (Easy Mode)" in the
model_patchescategory
π What's Different from Standard CFG?
Standard CFG uses a fixed strength value throughout generation. This node:
- Automatically adjusts CFG strength based on image content
- Prevents over-saturation that can wash out colors
- Speeds up generation by skipping unnecessary calculations
- Enhances colors and fixes common issues automatically
- Provides presets for different styles and use cases
The result: Better images with less trial and error!