Classifier-free guidance in AI image generation weights how strongly the model follows your instructions versus its training defaults. Tuning this parameter gives you control over how far the model pushes toward your aesthetic vision versus safety or conventional output, useful for stylistically distinctive work.
Classifier-free guidance (CFG) is one of the most powerful but least understood tools available to creative AI users. It's the numerical dial that controls how strictly a generative model adheres to your prompt versus how much creative freedom it exercises. Mastering this single parameter transforms your ability to shape output.
The concept is elegant: during generation, the model is simultaneously guided by your prompt and by a completely unconditioned path (as if no prompt existed). These two trajectories are then weighted and blended. The guidance scale parameter controls the weighting—higher values make the model more obedient to your prompt, lower values give the model more autonomous creative freedom.
Technically, guidance scale is implemented during the diffusion process. At each denoising step, the model computes two noise predictions: one conditioned on your text prompt, one unconditioned (pure noise). The guidance scale determines how much to weight the conditioned prediction versus the unconditioned. A scale of 7.5 (common default) means the model pulls 7.5 times more strongly toward the prompted direction than toward randomness.
This isn't just a blending dial. Higher guidance actually amplifies the difference between conditioned and unconditioned predictions, creating stronger emphasis on your prompt's semantic content. A scale of 1.0 essentially ignores your prompt. Scales of 15-20 create aggressive, literal interpretations. Scales of 30+ often produce artifacts—distorted features, unnatural compositions—because the model is over-optimizing for prompt adherence at the cost of visual quality.
For strict, commercial work—product renders, book illustrations with specific requirements—higher guidance (15-20) ensures the model respects your specifications. A prompt like "a blue ceramic teapot, minimalist design, white background" will produce outputs that reliably match those requirements. The trade-off is reduced variation and sometimes slightly artificial aesthetics.
For exploratory, artistic work, lower guidance (4-8) permits the model to exercise creativity. A prompt like "mysterious forest scene" with guidance of 5 yields more visually surprising, painterly results. The model isn't rigidly interpreting "forest" and "mysterious"; it's using those as suggestions while exploring its learned aesthetic space.
Medium guidance (7-12) is the sweet spot for most creative work: the model respects your core prompt while maintaining visual coherence and aesthetic quality. This range balances specificity with creative discovery.
Your prompt construction should align with your guidance intention. For high guidance, be specific and detailed: "A red Ferrari 488, three-quarter view, parked in front of a modern glass-and-steel building, golden hour lighting, sharp focus, professional automotive photography." Every detail matters because the model will earnestly try to match all of it.
For low guidance, be more impressionistic and suggestive: "A quiet moment between two people." "Urban decay aesthetic." "The feeling of dawn." Concrete details over-constrain low-guidance generations; abstract concepts give the model room to interpret creatively.
There's also a sweet interaction between prompt length and guidance. Very long prompts with high guidance can cause conflicting constraints to war with each other, producing contradictory details. Very short prompts with low guidance sometimes produce semantically incoherent output because there's insufficient guidance signal. You're essentially matching prompt complexity to guidance strength.
Rather than guessing, systematically test guidance levels for a given prompt. Generate the same prompt at scales of 3, 7, 12, and 18. Observe how your output changes. Does the character's expression shift? Does composition become more rigid? Does color palette remain consistent? This empirical exploration teaches you, in concrete terms, how guidance affects your specific aesthetic and use case.
Keep in mind that different models have different baselines. Midjourney's guidance is configured differently than Stable Diffusion's; a CFG of 15 in Stable Diffusion isn't equivalent to 15 in another model. You'll need to learn the scale for each tool you use.
Some tools and research platforms permit dynamic guidance, where the scale changes throughout generation. Early steps use low guidance to permit creative exploration, later steps use high guidance to refine toward the prompt. This produces outputs that feel both creatively surprising and grounded in your specification. It's a more advanced technique but worth learning if you're comfortable with technical tools.
Try this: In Stable Diffusion (via Hugging Face, local installation, or a platform that exposes CFG), generate the same creative prompt at guidance scales of 3, 7, 12, and 18. Use a prompt like "a mysterious figure in a rain-soaked street, moonlight reflecting on wet pavement." Compare the outputs across scales. Notice how low guidance feels more painterly and surprising; notice how high guidance becomes more literal and occasionally artifacted. Then try a detailed, specifications-heavy prompt (product description, architectural details, specific color palette) at those same scales, observing how high guidance now shines and low guidance produces incoherence. This experience teaches you the guidance-prompt relationship more effectively than any explanation.
Peri can explain this concept, give practical examples, help you decide whether it applies to your situation, or recommend a journey if appropriate.
Explore related journeys or tell Peri what you're working through.