/ AI Image Generation / CFG Scale Optimal Settings: Complete Guide 2025
AI Image Generation 5 min read

CFG Scale Optimal Settings: Complete Guide 2025

Master CFG scale settings for Stable Diffusion, SDXL, Flux, and SD 3.5. Learn how classifier-free guidance affects quality and find optimal values for each model.

CFG scale comparison visualization

CFG Scale (Classifier-Free Guidance) controls how closely AI follows your prompt versus generating freely. Too low and the model ignores your prompt. Too high and images become oversaturated and artificial.

Quick Answer: Optimal CFG varies by model: SD 1.5 uses 7-11, SDXL works best at 5-8, SD 3.5 prefers 3.5-5, and Flux uses 25-50 (different scale). Start in these ranges and adjust based on results.

Quick Reference:
  • SD 1.5: 7-11 (default 7)
  • SDXL: 5-8 (default 7)
  • SD 3.5: 3.5-5 (lower than SDXL!)
  • Flux: 25-50 (different scale entirely)
  • Pony/Illustrious: 5-7

What Is CFG Scale?

CFG stands for Classifier-Free Guidance. It determines the balance between:

  • Unconditional generation: What the model would create without your prompt
  • Conditional generation: What your prompt specifically requests

Low CFG (1-4): More creative freedom, may ignore prompt details Medium CFG (5-9): Balanced prompt adherence and creativity High CFG (10+): Strict prompt following, may cause artifacts

How CFG Affects Image Quality

Low CFG (1-4)

  • Softer, more natural images
  • Colors are muted
  • Prompt may be partially ignored
  • Good for: Abstract art, soft portraits, dream-like effects

Medium CFG (5-9)

  • Balanced quality
  • Good prompt adherence
  • Natural color saturation
  • Good for: Most use cases, general generation

High CFG (10-15)

  • Strong prompt adherence
  • Increased saturation
  • More contrast
  • Risk of artifacts
  • Good for: Precise concepts, specific details

Very High CFG (15+)

  • Often causes artifacts
  • Oversaturated colors
  • Unnatural appearance
  • Generally avoid unless specifically needed

Model-Specific Recommendations

Stable Diffusion 1.5

Optimal Range: 7-11 Default: 7

SD 1.5 is forgiving with CFG. The classic "7" works well for most cases.

Photorealistic: 7-8
Artistic/Stylized: 8-10
Anime: 7-9
Abstract: 4-6

SDXL

Optimal Range: 5-8 Default: 7

SDXL responds more strongly to CFG. Lower values often produce better results.

Photorealistic: 5-7
Artistic: 6-8
Detailed scenes: 7-8
Portraits: 5-6
SDXL Warning: CFG above 9 often causes oversaturation and artifacts in SDXL. If your images look too intense, lower CFG first.

SD 3.5

Optimal Range: 3.5-5 Default: 4.5

SD 3.5 uses significantly lower CFG than previous versions. This is intentional—the architecture responds differently.

General use: 4-5
Photorealistic: 3.5-4.5
Artistic: 4.5-5.5
Text rendering: 4-5

Flux

Optimal Range: 25-50 Default: ~30

Flux uses a completely different guidance scale. Don't apply SD values!

Standard generation: 30-35
Strong prompt following: 40-50
Creative/loose: 20-25

Pony Diffusion / Illustrious

Optimal Range: 5-7 Default: 6

Anime-focused models often prefer moderate CFG.

Free ComfyUI Workflows

Find free, open-source ComfyUI workflows for techniques in this article. Open source is strong.

100% Free MIT License Production Ready Star & Try Workflows
Standard anime: 6-7
Soft style: 5-6
Detailed: 7-8

CFG Scheduling

Advanced technique: vary CFG during generation.

High-to-Low Schedule:

  • Start with high CFG (establish composition)
  • Reduce CFG later (refine details naturally)

In ComfyUI: Use CFG scheduling nodes to implement this. Example:

  • Steps 0-10: CFG 9
  • Steps 10-20: CFG 7
  • Steps 20-30: CFG 5

Troubleshooting CFG Issues

Issue: Images look washed out

Cause: CFG too low Solution: Increase CFG by 1-2 points

Issue: Oversaturated, artificial colors

Cause: CFG too high Solution: Lower CFG by 2-3 points

Issue: Prompt being ignored

Cause: CFG too low Solution: Increase CFG, also check prompt quality

Want to skip the complexity? Apatero gives you professional AI results instantly with no technical setup required.

Zero setup Same quality Start in 30 seconds Try Apatero Free
No credit card required

Issue: Strange artifacts/distortions

Cause: CFG too high or conflicting with model Solution: Lower CFG, try different sampler

Issue: Image lacks contrast

Cause: CFG may be in awkward range Solution: Try both higher and lower to compare

CFG and Other Parameters

CFG interacts with other settings:

Steps:

  • Lower steps may need slightly higher CFG
  • More steps can use lower CFG

Sampler:

  • Euler: Standard CFG ranges work
  • DPM++: May need slightly lower CFG
  • Ancestral samplers: More sensitive to CFG

Prompt Length:

Join 115 other course members

Create Your First Mega-Realistic AI Influencer in 51 Lessons

Create ultra-realistic AI influencers with lifelike skin details, professional selfies, and complex scenes. Get two complete courses in one bundle. ComfyUI Foundation to master the tech, and Fanvue Creator Academy to learn how to market yourself as an AI creator.

Early-bird pricing ends in:
--
Days
:
--
Hours
:
--
Minutes
:
--
Seconds
51 Lessons • 2 Complete Courses
One-Time Payment
Lifetime Updates
Save $200 - Price Increases to $399 Forever
Early-bird discount for our first students. We are constantly adding more value, but you lock in $199 forever.
Beginner friendly
Production ready
Always updated
  • Longer prompts: May need slightly lower CFG
  • Short prompts: May need higher CFG for adherence

Practical Testing Approach

Find your optimal CFG:

  1. Generate baseline at default CFG (7 for SD/SDXL)
  2. Test low (CFG 4-5) — check if still follows prompt
  3. Test high (CFG 10-12) — check for artifacts
  4. Narrow range based on results
  5. Fine-tune in 0.5 increments

Most workflows settle on a CFG sweet spot for their specific model/style combination.

CFG for Different Content Types

Portraits: Lower CFG (5-7) for natural skin tones

Landscapes: Medium CFG (7-9) for good detail

Abstract Art: Lower CFG (3-5) for creative interpretation

Product Photography: Higher CFG (8-10) for accurate details

Anime/Illustration: Medium CFG (6-8) for style consistency

Frequently Asked Questions

Why does Flux use such high CFG numbers?

Flux uses a different guidance implementation. The scale isn't comparable to SD/SDXL—it's not "more intense," just different math.

Can CFG be 0?

Yes, but the model will completely ignore your prompt, generating random content.

Does CFG affect generation speed?

No, CFG doesn't impact computation time directly.

Should I change CFG when using LoRAs?

Sometimes. Strong LoRAs may need slightly lower CFG to prevent over-emphasis.

What's the relationship between CFG and negative prompts?

CFG amplifies both positive and negative prompts. Higher CFG = stronger negative prompt effect too.

Conclusion

CFG scale is one of the most impactful parameters for image quality. The key insight is that optimal CFG varies significantly between models—SD 3.5's ideal 4.0 would be too low for SD 1.5.

Start with recommended defaults for your model, then adjust based on results. When in doubt, try both higher and lower values—the difference is often dramatic and helps you find the sweet spot for your specific use case.

Ready to Create Your AI Influencer?

Join 115 students mastering ComfyUI and AI influencer marketing in our complete 51-lesson course.

Early-bird pricing ends in:
--
Days
:
--
Hours
:
--
Minutes
:
--
Seconds
Claim Your Spot - $199
Save $200 - Price Increases to $399 Forever