[G1-Sync] Manual knowledge update
This commit is contained in:
@@ -2,90 +2,158 @@
|
||||
id: wiki-2026-0508-positive-prompt
|
||||
title: Positive Prompt
|
||||
category: 10_Wiki/Topics
|
||||
status: needs_review
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: []
|
||||
aliases: [Positive Prompts, Prompt, Prompt Description]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.92
|
||||
tags: [auto-consolidated, technical-documentation]
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [prompt-engineering, image-generation, stable-diffusion, midjourney, flux]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-05-08
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
|
||||
tech_stack:
|
||||
language: python
|
||||
framework: diffusers, comfyui
|
||||
---
|
||||
|
||||
# [[Positive Prompt|Positive Prompt]]
|
||||
# Positive Prompt
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
긍정 프롬프트(Positive Prompt)는 AI 이미지 생성 시 이미지에 포함되기를 원하는 모든 세부 사항(주체, 매체, 스타일, 조명 등)을 명시하는 명령어입니다 [1]. 흔히 단순히 '프롬프트(Prompt)'라고 불리며, AI 모델이 생성해야 할 시각적 목표와 목적지를 정의하는 역할을 합니다 [1, 2]. 프롬프트 내에 원하지 않는 요소를 부정어와 함께 적을 경우 오히려 해당 요소가 생성되는 역효과가 날 수 있으므로, 오직 원하는 속성만을 긍정적인 언어로 묘사하는 것이 중요합니다 [3, 4].
|
||||
## 매 한 줄
|
||||
> **"매 image generation에서 desired content 를 describe — subject, style, composition, quality."**. Stable Diffusion / FLUX / Midjourney 핵심 input. Negative prompt와 짝을 이루며, 2024-2025 modern model (FLUX.1, SD3, MJ v7)에서 매 natural language description이 weighted token보다 우세.
|
||||
|
||||
---
|
||||
## 매 핵심
|
||||
|
||||
긍정 프롬프트(종종 단순히 '프롬프트'로 불림)는 사용자가 AI 이미지 생성 모델에게 최종 결과물에서 보고 싶은 구체적인 요소들을 명시적으로 지시하는 텍스트입니다 [1, 2]. 이는 생성될 이미지의 목표(Destination 또는 Target)를 설정하는 역할을 하며, 주체, 매체, 스타일, 구도, 조명 등의 상세한 세부 정보를 포함합니다 [1, 3, 4]. 인공지능 모델이 지시를 오해하여 원치 않는 요소를 생성하는 것을 방지하기 위해, 부정적인 단어보다는 원하는 속성만을 긍정적인 언어로 묘사하는 것이 필수적입니다 [5, 6].
|
||||
### 매 구성 요소
|
||||
- **Subject**: "a woman, a robot, a cathedral".
|
||||
- **Action / pose**: "running through forest", "sitting at desk".
|
||||
- **Style**: "oil painting", "cyberpunk", "studio Ghibli".
|
||||
- **Composition**: "wide angle", "close-up", "rule of thirds".
|
||||
- **Lighting**: "golden hour", "rim light", "volumetric".
|
||||
- **Quality modifier**: "highly detailed", "8k" (older models — modern은 less needed).
|
||||
- **Artist / reference**: "in the style of Greg Rutkowski" (controversial).
|
||||
|
||||
## 📖 구조화된 지식 (Synthesized Content)
|
||||
* **긍정 프롬프트의 역할**
|
||||
긍정 프롬프트는 AI가 도달해야 할 '목표(target)' 및 '도착지(destination)'를 설정하는 역할을 합니다 [2, 5]. 반면 네거티브 프롬프트는 피해야 할 '경계(boundaries)'를 정의하므로 두 프롬프트는 서로 명확히 구분되는 역할을 수행합니다 [2]. 실질적으로 사용자는 긍정 프롬프트를 통해 보고 싶은 것을 묘사하고, 네거티브 프롬프트를 통해 그것을 망치는 요소들을 차단하게 됩니다 [2].
|
||||
### 매 model별 syntax
|
||||
- **SD 1.5 / SDXL**: `(token:1.3)` weighted, BREAK 분리, comma list.
|
||||
- **FLUX.1 / SD3**: 매 natural language paragraph가 best — token weighting less effective.
|
||||
- **Midjourney v7**: `--ar 16:9 --stylize 200 --chaos 20` flag, natural prompt.
|
||||
- **DALL-E 3 / GPT-Image**: 매 conversational, descriptive paragraph.
|
||||
|
||||
* **핵심 구성 요소**
|
||||
긍정 프롬프트는 일반적으로 주체(Subject), 매체(Medium), 스타일(Style), 구도(Composition), 색상 및 조명(Color & Lighting) 등의 세부 정보로 구성됩니다 [1]. 하지만 모든 요소가 반드시 포함되어야 하는 것은 아니며, 사용자의 의도에 따라 주체와 매체만 존재하거나 혹은 주체가 생략된 프롬프트를 작성할 수도 있습니다 [1].
|
||||
### 매 modern best practice (2025)
|
||||
- Natural language sentence > comma keyword stuffing.
|
||||
- 매 subject specific, then style, then technical.
|
||||
- Reference image (img2img, IPAdapter, FLUX Redux) 매 단어보다 강력.
|
||||
- LoRA / fine-tune이 style token 대체.
|
||||
|
||||
* **구조화된 작성법 (Syntax & Structure)**
|
||||
긍정 프롬프트를 작성할 때는 구조를 갖추고 관련된 토큰(Token)들을 그룹화하여 배치하는 것이 권장됩니다 [6]. 관련 키워드들이 프롬프트의 처음과 끝으로 멀리 떨어져 있으면 AI가 이를 누락할 수 있기 때문입니다 [6]. 효율적인 구문의 예시로는 첫 번째 섹션에 주체와 배경(Subject & Setting)을, 두 번째 섹션에 색상·스타일·조명을, 세 번째 섹션에 구도 및 추가 수식어를 묶어서 배치하는 방식이 있습니다 [7, 8].
|
||||
### 매 응용
|
||||
1. Concept art, illustration.
|
||||
2. Marketing asset gen.
|
||||
3. Product mockup, fashion.
|
||||
4. Storyboard, film pre-vis.
|
||||
5. Game asset (texture, character sheet).
|
||||
|
||||
* **부정어 사용의 한계와 주의점**
|
||||
긍정 프롬프트 내에 "원하지 않는 것(예: not, no, without)"을 서술하면 오히려 그 요소가 이미지에 나타나는 역효과가 발생할 수 있습니다 [3, 4]. 특히 DALL-E 3와 같은 시스템은 부정어를 잘 처리하지 못하므로, 피하고 싶은 요소를 적기보다는 원하는 긍정적 속성을 직접적이고 명확하게 묘사하여 AI를 유도해야 합니다 [4, 9]. Stable Diffusion과 같은 모델에서는 이러한 역효과를 방지하기 위해 긍정 프롬프트 대신 전용 네거티브 프롬프트(Negative Prompt) 입력란을 사용합니다 [3].
|
||||
## 💻 패턴
|
||||
|
||||
---
|
||||
### Diffusers SDXL (weighted)
|
||||
```python
|
||||
from diffusers import StableDiffusionXLPipeline
|
||||
import torch
|
||||
|
||||
* **긍정 프롬프트의 역할과 구성 요소:** 긍정 프롬프트는 이미지가 도달해야 할 방향과 목표 지점을 정의합니다 [3, 4]. 효과적인 긍정 프롬프트는 이미지의 중심이 되는 주체(Subject), 매체(Medium), 스타일(Style), 구도(Composition), 그리고 색상 및 조명(Color & Lighting)과 같은 필수적인 세부 정보를 명확하게 포함하여 작성됩니다 [1, 7].
|
||||
* **효율적인 구문 및 논리적 구조화:** 긍정 프롬프트를 작성할 때는 관련된 토큰(단어)들을 논리적인 덩어리로 그룹화하여 배치하는 것이 좋습니다 [8]. 예를 들어, 첫 번째 섹션에서는 주체와 배경(Setting)을 묘사하고, 두 번째 섹션에서는 색상, 스타일, 조명을 정의하며, 마지막 세 번째 섹션에서는 구도와 추가적인 수정자(Modifiers)를 두는 방식으로 프롬프트 구조를 짜면 결과물의 일관성을 높일 수 있습니다 [9, 10].
|
||||
* **부정 프롬프트와의 관계:** 긍정 프롬프트가 '보고 싶은 것'을 묘사한다면, 부정 프롬프트는 '피해야 할 경계(Boundaries)'를 정의하는 역할을 수행합니다 [2, 3]. 만약 긍정 프롬프트 안에 원치 않는 요소를 적으며 "제외하라"고 지시하게 되면 오히려 해당 요소가 이미지에 나타나는 역효과를 낳을 수 있으므로, 원치 않는 요소는 전용 부정 프롬프트(Negative Prompt) 섹션으로 분리해야 합니다 [11].
|
||||
* **모델별 특성 (DALL-E 3 주의사항):** DALL-E 3와 같은 특정 모델은 "not", "no", "don't", "without"과 같은 부정어(Negations)를 처리하는 데 매우 취약합니다 [5]. "사용하지 말 것"이라는 부정 지시어를 긍정 프롬프트 내에 입력하면 모델이 오히려 해당 단어의 피사체를 생성해버리는 경향이 있으므로, DALL-E 3를 사용할 때는 모든 지시를 긍정형 문장으로 구성하여 원하는 속성만을 묘사해야 합니다 [5, 6].
|
||||
pipe = StableDiffusionXLPipeline.from_pretrained(
|
||||
'stabilityai/stable-diffusion-xl-base-1.0', torch_dtype=torch.float16
|
||||
).to('cuda')
|
||||
|
||||
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
||||
No trade-offs available.
|
||||
prompt = ("(masterpiece:1.2), portrait of a samurai warrior, "
|
||||
"intricate armor, cherry blossoms, golden hour, "
|
||||
"cinematic lighting, depth of field")
|
||||
neg = "low quality, blurry, deformed hands, extra fingers"
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
- **Related Topics:** [[Negative Prompt|Negative Prompt]], [[Prompt Structure|Prompt Structure]], Token
|
||||
- **Projects/Contexts:** [[Stable Diffusion|Stable Diffusion]], [[DALL-E 3|DALL-E 3]], Civitai
|
||||
- **Contradictions/Notes:** 소스에 따르면, 긍정 프롬프트 내에서 특정 요소를 배제하기 위해 부정적 지시어("~없는", "no" 등)를 사용하면 AI가 이를 오인하여 오히려 해당 요소를 결과물에 추가하는 모순적 결과가 발생합니다 [3, 4, 9]. 이를 해결하기 위해 긍정 프롬프트에는 철저히 원하는 바만 서술하고, 배제할 요소는 네거티브 프롬프트를 활용하는 것이 필수적입니다 [3, 4].
|
||||
img = pipe(prompt, negative_prompt=neg, num_inference_steps=30,
|
||||
guidance_scale=7.0).images[0]
|
||||
```
|
||||
|
||||
---
|
||||
*Last updated: 2026-04-30*
|
||||
### FLUX.1 (natural language)
|
||||
```python
|
||||
from diffusers import FluxPipeline
|
||||
import torch
|
||||
pipe = FluxPipeline.from_pretrained('black-forest-labs/FLUX.1-dev',
|
||||
torch_dtype=torch.bfloat16).to('cuda')
|
||||
|
||||
---
|
||||
prompt = ("A wide cinematic shot of a samurai standing under cherry "
|
||||
"blossoms at golden hour. He wears intricate red and black "
|
||||
"armor. Soft volumetric light filters through petals. "
|
||||
"Shallow depth of field with the warrior in sharp focus.")
|
||||
|
||||
- **Related Topics:** [[부정 프롬프트 (Negative Prompt)|부정 프롬프트 (Negative Prompt)]], [[프롬프트 구조 (Prompt Structure)|프롬프트 구조 (Prompt Structure)]], [[DALL-E 3|DALL-E 3]], [[프롬프트 엔지니어링 (Prompt Engineering)|프롬프트 엔지니어링 (Prompt Engineering)]]
|
||||
- **Projects/Contexts:** AI 이미지 생성 워크플로우 및 최적화
|
||||
- **Contradictions/Notes:** 긍정 프롬프트 내에 부정적인 단어(예: "no", "without")를 사용하여 특정 요소를 배제하려 하면 모델이 오히려 해당 요소를 이미지에 추가하는 역효과가 발생하므로, 부정적인 지시는 반드시 긍정 프롬프트에서 제외해야 합니다 [5, 6, 11].
|
||||
img = pipe(prompt, guidance_scale=3.5, num_inference_steps=28,
|
||||
max_sequence_length=512).images[0]
|
||||
```
|
||||
|
||||
---
|
||||
*Last updated: 2026-04-30*
|
||||
### Compel (advanced weighting, SD)
|
||||
```python
|
||||
from compel import Compel
|
||||
compel = Compel(tokenizer=pipe.tokenizer, text_encoder=pipe.text_encoder)
|
||||
embeds = compel("a cat++ playing piano in a (jazz bar)1.3")
|
||||
img = pipe(prompt_embeds=embeds).images[0]
|
||||
```
|
||||
|
||||
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
||||
### Midjourney v7 prompt format
|
||||
```text
|
||||
/imagine prompt: a samurai under cherry blossoms, golden hour,
|
||||
volumetric light, cinematic --ar 21:9 --stylize 300 --v 7
|
||||
```
|
||||
|
||||
**언제 이 지식을 쓰는가:**
|
||||
- *(TODO)*
|
||||
### Modular template (programmatic)
|
||||
```python
|
||||
def build_prompt(subject, style, light, mood):
|
||||
return (f"{subject}, {style} style, {light} lighting, "
|
||||
f"{mood} mood, highly detailed composition")
|
||||
|
||||
**언제 쓰면 안 되는가:**
|
||||
- *(TODO)*
|
||||
p = build_prompt("a lone astronaut on Mars",
|
||||
"concept art", "soft sunset", "melancholic")
|
||||
```
|
||||
|
||||
## 🧪 검증 상태 (Validation)
|
||||
### LoRA-augmented (style token)
|
||||
```python
|
||||
pipe.load_lora_weights('artist_style.safetensors')
|
||||
prompt = "<lora:artist_style:0.8> portrait of woman, watercolor"
|
||||
```
|
||||
|
||||
- **정보 상태:** needs_review
|
||||
- **출처 신뢰도:** A
|
||||
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| FLUX / SD3 / DALL-E 3 | Natural paragraph, descriptive |
|
||||
| SDXL / SD 1.5 | Comma-separated, weighted tokens |
|
||||
| Midjourney | Natural + flags (--ar, --stylize) |
|
||||
| Specific style reproduction | LoRA + 짧은 prompt |
|
||||
| Reference matching | img2img / IPAdapter > prompt |
|
||||
| Batch programmatic | Template + parameter slot |
|
||||
|
||||
## 🧬 중복 검사 (Duplicate Check)
|
||||
**기본값**: modern model은 natural sentence, legacy SD는 weighted comma list.
|
||||
|
||||
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
|
||||
- **처리 방식:** UPDATE (자동 정규화)
|
||||
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
|
||||
## 🔗 Graph
|
||||
- 부모: [[Prompt_Engineering]] · [[Image_Generation]] · [[Diffusion_Models]]
|
||||
- 변형: [[Negative_Prompt]] · [[Weighted_Prompts]] · [[Prompt_Templates]]
|
||||
- 응용: [[Stable_Diffusion]] · [[FLUX]] · [[Midjourney]] · [[DALL-E]]
|
||||
- Adjacent: [[LoRA]] · [[IPAdapter]] · [[ControlNet]] · [[ComfyUI]]
|
||||
|
||||
## 🕓 변경 이력 (Changelog)
|
||||
## 🤖 LLM 활용
|
||||
**언제**: image gen API wrapper, batch asset generation, prompt template system, A/B test variation.
|
||||
**언제 X**: 매 reference image가 있으면 img2img / IPAdapter — 매 prompt만으론 매 정확 못 reproduce.
|
||||
|
||||
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
||||
|------|-----------|-----------|--------|
|
||||
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
|
||||
## ❌ 안티패턴
|
||||
- **Keyword spam**: "8k, hyperdetailed, ultra hd, masterpiece, best quality, ..." — 매 modern model에 무의미.
|
||||
- **Contradictory style mix**: "anime, photorealistic, oil painting" — 매 confused output.
|
||||
- **Overweight `(token:2.0)`**: 매 artifact, oversaturation.
|
||||
- **Artist names without consent**: 매 ethical issue + many platforms ban.
|
||||
- **Same prompt for all models**: 매 model별 syntax 다름 — port 필요.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (FLUX.1 model card, SDXL paper, Midjourney v7 docs, diffusers library docs).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — positive prompt structure + model-specific syntax (FLUX, SDXL, MJ v7) |
|
||||
|
||||
Reference in New Issue
Block a user