Negative prompt

네거티브 프롬프트

A second piece of text that names what should be pushed away from the result, the opposite direction from the prompt.

Also known as: Negative conditioning
···
html
<div class="wrap">
  <canvas id="cv"></canvas>
  <div class="panel">
    <div class="row"><i class="ic" id="ic" data-state="bad"></i><span id="lbl">네거티브 프롬프트 미사용</span></div>
    <div class="neg" id="neg"></div>
  </div>
</div>
css
.wrap{position:relative;width:100%;height:100%}
#cv{position:absolute;inset:0;width:100%;height:100%}
.panel{position:absolute;left:10px;right:10px;bottom:10px;z-index:2;padding:8px 10px;border-radius:10px;
  background:rgba(13,13,18,0.6);backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,0.15)}
.row{display:flex;align-items:center;gap:7px;font-size:11.5px;font-weight:600;color:#f1f0ec}
.ic{width:16px;height:16px;border-radius:50%;position:relative;flex-shrink:0}
.ic[data-state=bad]{background:var(--accent-2)}
.ic[data-state=bad]::before,.ic[data-state=bad]::after{content:"";position:absolute;width:8px;height:1.6px;background:#fff;top:50%;left:50%}
.ic[data-state=bad]::before{transform:translate(-50%,-50%) rotate(45deg)}
.ic[data-state=bad]::after{transform:translate(-50%,-50%) rotate(-45deg)}
.ic[data-state=good]{background:var(--accent-3)}
.ic[data-state=good]::before{display:none}
.ic[data-state=good]::after{content:"";width:4px;height:7px;border:solid #fff;border-width:0 1.6px 1.6px 0;transform:rotate(45deg) translate(-1px,-1px);top:45%;left:42%}
.neg{margin-top:4px;font-family:ui-monospace,monospace;font-size:10.5px;color:#b7b7c2}
js
const cv = document.getElementById('cv'), ctx = cv.getContext('2d');
const ic = document.getElementById('ic'), lbl = document.getElementById('lbl'), neg = document.getElementById('neg');
function fit() { const dpr = Math.min(devicePixelRatio || 1, 2); cv.width = innerWidth * dpr; cv.height = innerHeight * dpr; ctx.setTransform(dpr, 0, 0, dpr, 0, 0); }
addEventListener('resize', fit); fit();

function mulberry32(a) { return function () { a |= 0; a = a + 0x6D2B79F5 | 0; let t = Math.imul(a ^ a >>> 15, 1 | a); t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t; return ((t ^ t >>> 14) >>> 0) / 4294967296; }; }

function paintBase(w, h) {
  const r = mulberry32(42);
  const g = ctx.createLinearGradient(0, 0, 0, h);
  g.addColorStop(0, 'hsl(210 55% 78%)'); g.addColorStop(1, 'hsl(210 40% 42%)');
  ctx.fillStyle = g; ctx.fillRect(0, 0, w, h);
  ctx.beginPath(); ctx.arc(w * 0.72, h * 0.24, Math.min(w, h) * 0.08, 0, Math.PI * 2); ctx.fillStyle = 'hsl(45 90% 82%)'; ctx.fill();
  for (let l = 0; l < 2; l++) {
    ctx.beginPath(); ctx.moveTo(0, h);
    for (let i = 0; i <= 6; i++) { const x = w * i / 6; const y = h * (0.55 + l * 0.15) - r() * h * 0.1; ctx.lineTo(x, y); }
    ctx.lineTo(w, h); ctx.closePath();
    ctx.fillStyle = 'hsl(150 ' + (30 - l * 8) + '% ' + (24 + l * 12) + '%)'; ctx.fill();
  }
}
function paintArtifacts(w, h) {
  const r = mulberry32(99);
  ctx.strokeStyle = 'rgba(255,20,147,0.7)'; ctx.lineWidth = 3; ctx.lineCap = 'round';
  ctx.beginPath(); ctx.moveTo(w * 0.15, h * 0.35);
  for (let i = 0; i < 5; i++) ctx.lineTo(w * (0.15 + i * 0.12) + r() * 20, h * (0.35 + (r() - 0.5) * 0.3));
  ctx.stroke();
  ctx.fillStyle = 'rgba(255,255,255,0.85)';
  ctx.fillRect(w * 0.6, h * 0.68, w * 0.24, h * 0.1);
  for (let i = 0; i < 10; i++) { ctx.fillStyle = 'hsl(' + Math.floor(r() * 360) + ' 90% 60%)'; ctx.beginPath(); ctx.arc(w * 0.5 + r() * w * 0.35, h * 0.15 + r() * h * 0.15, 2 + r() * 3, 0, Math.PI * 2); ctx.fill(); }
}
function render(bad) {
  const w = innerWidth, h = innerHeight;
  paintBase(w, h);
  if (bad) paintArtifacts(w, h);
}
const list = 'blurry, extra limbs, watermark, noisy';
function cycle(bad) {
  render(bad);
  ic.dataset.state = bad ? 'bad' : 'good';
  lbl.textContent = bad ? '네거티브 프롬프트 미사용' : '네거티브 프롬프트 사용';
  neg.textContent = bad ? '(제외 지정 없음)' : list;
  setTimeout(() => cycle(!bad), 2400);
}
cycle(true);

If the prompt says "go this way," the negative prompt says "move away from this." Classifier-free guidance computes, at every step, a prediction conditioned on the prompt and a prediction conditioned on the negative prompt (or empty text), then pushes the result away from the negative one by the gap between the two — so whatever is named in the negative prompt gets statistically suppressed.

Listing common flaws like "blurry," "extra limbs," or "watermark" lowers the odds of seeing them. That said, this is a statistical nudge, not a hard filter, so a named flaw can still occasionally slip through.

Stuffing the negative prompt with a long, generic boilerplate list can over-constrain style and flatten the result. It tends to work better added incrementally, in response to a flaw that is actually showing up.

The demo below is a simplification, not the actual guidance math — it simply overlays a few pre-made "flaws" (a stray scribble, blown-out dots, a watermark-like box) only when the negative prompt is turned off.

When to use

Add a short, specific list when a particular flaw keeps recurring. It works better tuned to an actual repeating problem than pasted as a one-size-fits-all list on every generation.