Zubnet AIसीखेंWiki › Guidance Scale
Using AI

Guidance Scale

CFG Scale, Classifier-Free Guidance
एक parameter जो control करता है कि एक image generation model text prompt को कितनी strongly follow करे। Low guidance (1–3): model freely generate करता है, diverse लेकिन potentially off-topic images produce करते हुए। High guidance (7–15): model prompt को strictly follow करता है लेकिन saturated, artifact-heavy images produce कर सकता है। Typical sweet spot 7–9 है। ये text models के लिए temperature का image generation equivalent है।

यह क्यों matter करता है

Guidance scale image generation में prompt के बाद सबसे impactful parameter है। बहुत low और image आपकी description ignore कर देगी। बहुत high और oversaturated और artificial लगेगी। Guidance scale समझना आपको troubleshoot करने में help करता है “मेरी image prompt से क्यों match नहीं करती?” (guidance बहुत low) और “मेरी image weird क्यों लगती है?” (guidance बहुत high)।

Deep Dive

Classifier-free guidance (Ho & Salimans, 2022) works by computing two denoising predictions per step: one conditional (using your prompt) and one unconditional (ignoring the prompt). The final prediction amplifies the difference: output = unconditional + scale × (conditional − unconditional). Scale=1 means no guidance (just the conditional prediction). Scale=7 means the model amplifies the prompt's influence 7x beyond what it would naturally do.

Why Higher Isn't Always Better

Higher guidance makes the image more "prompt-aligned" but at a cost: the model overshoots, producing oversaturated colors, unrealistic lighting, and visual artifacts. Very high guidance (15+) often produces images that look like they've been run through a sharpening filter — technically matching the prompt but aesthetically poor. The sweet spot depends on the model: SD 1.5 works well at 7–9, SDXL at 5–8, and Flux at 3–5.

Dynamic and Negative CFG

Advanced techniques manipulate guidance during generation: starting with high guidance (to establish composition) and reducing it in later steps (to refine details naturally). Negative CFG (guidance scale below 1) inverts the prompt's effect, generating the opposite of what's described — useful for understanding what the model associates with specific concepts but rarely useful for actual image generation.

संबंधित अवधारणाएँ

← सभी Terms
ESC