# Sterowanie promptem bez klasyfikatora (classifier-free guidance)

EN: **Classifier-free guidance** · id `cfg` · aliases: classifier-free guidance, CFG, guidance scale, negative prompt, sterowanie generacją

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Sieci i modele generatywne](https://aiatlasgraph.com/t/neural.md) › [Rodziny modeli generatywnych](https://aiatlasgraph.com/t/generative.md) › [Modele dyfuzyjne](https://aiatlasgraph.com/t/diffusion.md) › Sterowanie promptem bez klasyfikatora (classifier-free guidance)

## Description

- PL: Technika wzmacniania zgodności wyniku z opisem: jeden model uczy się generować z warunkiem i bez niego (warunek losowo pomijany w treningu), a przy generowaniu wynik przesuwa się w stronę wersji warunkowej. Skala guidance to popularny suwak „wierność promptowi kontra różnorodność”.
- EN: A technique to strengthen adherence to the prompt: one model learns to generate with and without the condition (dropped randomly in training), and at sampling time the output is pushed toward the conditional version. The guidance scale is the familiar “prompt fidelity vs diversity” knob.

## In one sentence

- PL: To wzmacnianie wpływu twojego opisu na obraz tworzony przez model.
- EN: This strengthens the influence of your description on the image a model generates.

## Problem it solves

- PL: Generator tworzy ładny obraz, ale pomija ważne szczegóły wskazane w opisie.
- EN: A generator creates an attractive image but misses important details from your description.

## What it does

- PL: Porównuje przewidywanie z opisem i bez niego, wzmacniając różnicę; zbyt mocne sterowanie może pogorszyć wygląd lub różnorodność.
- EN: It compares predictions with and without the description, amplifying the difference; excessive guidance can harm appearance or diversity.

## Everyday example

- PL: Zwiększasz siłę opisu czerwonego parasola, a potem sprawdzasz, czy obraz zachował naturalne kolory i szczegóły.
- EN: You increase guidance for a red umbrella description, then check whether the image retains natural colours and details.

## This concerns you if you…

- PL: generator ignoruje część twojego opisu
- PL: wybierasz między zgodnością z opisem a różnorodnością
- EN: find a generator ignores parts of your description
- EN: balance description fidelity against variety

## Keywords

guidance scale · unconditional prediction · negative prompts · classifier guidance · conditioning dropout

## How it works

- PL: Podczas treningu część warunków pomija się, ucząc przewidywań warunkowych i bezwarunkowych wspólną siecią. Przy próbkowaniu ich różnicę wzmacnia się ustaloną skalą, przesuwając aktualizację w kierunku zgodności z warunkiem.
- EN: Training drops some conditions, teaching conditional and unconditional predictions within one network. Sampling amplifies their difference by a chosen scale, shifting updates towards condition agreement.

## Limits

- PL: Duża skala może ograniczać różnorodność i powodować nasycenie lub artefakty. Standardowe obliczanie obu przewidywań zwiększa koszt; silniejsze sterowanie nie gwarantuje wykonania wszystkich szczegółów polecenia.
- EN: Large scales can reduce diversity and cause saturation or artifacts. Standard evaluation of both predictions increases cost; stronger guidance cannot guarantee every prompt detail.

## Key terms

- PL: **predykcja bezwarunkowa**: Przewidywanie modelu bez dodatkowej informacji sterującej.
- PL: **skala guidance**: Współczynnik wzmacniający różnicę między przewidywaniem warunkowym i bezwarunkowym.
- EN: **unconditional prediction**: A model prediction without additional conditioning information.
- EN: **guidance scale**: A coefficient amplifying differences between conditional and unconditional predictions.

## Know first

- [Statystyka i niepewność (Statistics and uncertainty)](https://aiatlasgraph.com/t/probability.md)

## Examples

- PL: skala guidance · prompt negatywny · classifier guidance (starsza metoda)
- EN: guidance scale · negative prompt · classifier guidance (older method)

## Related topics

Untyped, symmetric "see also" links.

- [Generowanie obrazów z opisu tekstowego (Text-to-image generation)](https://aiatlasgraph.com/t/texttoimage.md)

## Sources

- [What are Diffusion Models?](<https://lilianweng.github.io/posts/2021-07-11-diffusion-models/>) `lilianweng-diffusion-2021` · by Lilian Weng
- [Classifier-Free Diffusion Guidance](<https://arxiv.org/abs/2207.12598>) `classifier-free-guidance-2022` · by Jonathan Ho, Tim Salimans
- [Hugging Face Diffusion Models Course — syllabus](<https://huggingface.co/learn/diffusion-course/unit0/1>) `hf-diffusion-course` · by Jonathan Whitaker, Lewis Tunstall (Hugging Face) · sponsored

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/cfg · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
