[G1-Sync] Manual knowledge update
This commit is contained in:
@@ -1,79 +1,178 @@
|
||||
---
|
||||
id: wiki-2026-0508-image-prompt-작성-방법
|
||||
title: image prompt 작성 방법
|
||||
title: Image Prompt 작성 방법
|
||||
category: 10_Wiki/Topics
|
||||
status: needs_review
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: []
|
||||
aliases: [Image Prompt Engineering, T2I Prompting, Diffusion Prompting]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.92
|
||||
tags: [uncategorized]
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [image-generation, prompting, 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: text
|
||||
framework: FLUX/Midjourney/SDXL
|
||||
---
|
||||
|
||||
# [[image prompt 작성 방법|image prompt 작성 방법]]
|
||||
# Image Prompt 작성 방법
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
이미지 프롬프트(Image Prompt)는 Midjourney, DALL-E, Stable Diffusion과 같은 AI 이미지 생성 모델에게 어떤 이미지를 생성할지 지시하는 텍스트 설명입니다 [1, 2]. 효과적인 프롬프트는 단순히 피사체를 명시하는 것을 넘어 조명, 스타일, 구도, 카메라 앵글 등을 구체적으로 정의하여 인간의 상상력을 기계가 이해할 수 있는 시각적 기호로 번역하는 청사진 역할을 합니다 [1-3]. 각 AI 모델의 특성(아키텍처, 매개변수, 자연어 처리 능력)에 맞춘 프롬프트 구조화와 반복적인 수정 작업이 고품질 AI 아트를 생성하는 핵심입니다 [4-6].
|
||||
## 매 한 줄
|
||||
> **"매 image prompt 의 핵심 = 'Subject + Style + Composition + Quality modifier' 의 명시적 ordering."**. 2022 SD 1.5 era 의 keyword soup 에서 출발 → 2026 FLUX.1.1 Pro / Midjourney v7 / Imagen 4 era 는 natural-language 의 long-form description 의 superior 을 increasingly 한다. 매 prompt structure 의 deterministic 한 control 의 사용자 의 intent 의 model 의 latent space 의 mapping 을 direct.
|
||||
|
||||
## 📖 구조화된 지식 (Synthesized Content)
|
||||
**프롬프트의 기본 구조 (Basic Prompt Structure)**
|
||||
성공적인 이미지 프롬프트는 모델이 혼동하지 않도록 보통 15~50단어 내외의 논리적이고 명확한 계층 구조를 따릅니다 [6-8].
|
||||
* **주체(Subject):** 이미지의 중심이 되는 인물, 사물, 또는 장면입니다. 단순한 명사("고양이")보다는 구체적인 묘사("창가에서 오후의 햇살을 받으며 졸고 있는 은색 털의 고양이")를 사용해야 모델이 더 선명한 특징을 추출합니다 [9-11].
|
||||
* **환경 및 맥락(Context/Environment):** 주체가 존재하는 장소나 분위기를 설정하여 서사적 깊이와 톤을 결정합니다(예: 안개 낀 숲, 골든 아워의 도쿄 거리) [9, 12, 13].
|
||||
* **매체 및 스타일(Medium & Style):** '유화', '수채화', '35mm 필름 사진', '디지털 아트' 등의 시각적 형식이나 '사이버펑크', 특정 예술가의 화풍을 명시하여 이미지의 미학적 방향과 질감을 통제합니다 [9, 11, 14].
|
||||
* **조명 및 카메라 구도(Lighting & Camera):** '골든 아워', '스튜디오 조명', '볼륨메트릭 라이팅(Volumetric Lighting)' 등의 조명 지시어와 '85mm 렌즈', '로우 앵글', '얕은 피사계 심도' 같은 카메라 설정은 입체감과 감정적 분위기를 좌우합니다 [15-20].
|
||||
## 매 핵심
|
||||
|
||||
**주요 AI 모델별 프롬프트 전략 (Model-Specific Strategies)**
|
||||
각 플랫폼은 작동 방식과 이해하는 '방언'이 다르므로 맞춤형 전략이 필요합니다 [13, 21].
|
||||
* **미드저니(Midjourney):** 미학적이고 시네마틱한 결과물에 강하며 매개변수(Parameter)를 통한 제어가 필수적입니다 [22, 23]. 명령어 끝에 종횡비(`--ar`), 양식화 강도(`--stylize`), 모델 버전(`--v`)을 붙이며, 스타일 참조(`--sref`), 캐릭터 참조(`--cref`), 옴니 참조(`--oref`) 기능으로 일관된 이미지를 생성할 수 있습니다 [22-26].
|
||||
* **DALL-E 3:** 자연어 이해도가 탁월하여 키워드 나열보다는 대화형의 완전한 문장으로 지시하는 것이 유리합니다 [27-30]. 텍스트 렌더링에 강점이 있지만, 부정어("~없이")를 잘 이해하지 못하므로 피하고 싶은 요소 대신 '원하는 것'을 긍정형으로 묘사해야 합니다 [30-33].
|
||||
* **스테이블 디퓨전(Stable Diffusion):** 쉼표로 구분된 태그(Tag) 형태를 선호하며, 괄호와 숫자(`(keyword:1.2)`)를 이용한 단어별 가중치(Weight) 조절이 핵심 기술입니다 [34-37]. 모델의 편향이나 형태적 결함(예: 기형적인 손, 워터마크)을 막기 위해 긍정 프롬프트 못지않게 '부정 프롬프트(Negative Prompt)'를 적극적으로 활용해야 합니다 [34, 37-39].
|
||||
### 매 Prompt anatomy (4-part structure)
|
||||
- **Subject**: "a red fox", "an elderly Japanese ceramicist" — concrete noun + descriptors.
|
||||
- **Style**: "oil painting", "cinematic photography, 35mm film", "Studio Ghibli" — medium / artist / movement.
|
||||
- **Composition**: "low-angle shot", "rule of thirds", "shallow depth of field f/1.4" — framing 의 explicit specification.
|
||||
- **Quality / technical**: "8k, sharp focus, golden hour lighting" — modifiers 의 final boost.
|
||||
|
||||
**프롬프트 엔지니어링 모범 사례 (Best Practices)**
|
||||
* **반복적 정교화(Iterative Refinement):** 완벽한 프롬프트를 한 번에 쓰려 하지 말고, 단순한 기본 프롬프트로 시작한 뒤 생성된 결과를 바탕으로 조명, 구도, 세부 묘사를 추가하며 점진적으로 수정(Vary Region, Inpainting 등 활용)합니다 [8, 40-43].
|
||||
* **구체성 확보 및 모순 방지:** 50개가 넘는 세부 사항으로 모델을 과부하 시키거나 "사실적이면서 추상적인"과 같은 모순된 지시어를 사용하는 것을 피해야 합니다 [44, 45].
|
||||
* **명확한 수치와 형용사 사용:** "새들"보다는 "새 3마리"나 "새 떼"가 좋으며, 단순한 묘사보다 구체적인 형용사를 포함해야 AI가 작업할 힌트를 얻습니다 [46-48].
|
||||
### 매 Token weight (Midjourney/SDXL)
|
||||
- `(keyword:1.3)` — 매 emphasis 의 multiplier.
|
||||
- `[keyword]` — 매 de-emphasis (SD WebUI).
|
||||
- Midjourney `--stylize 250` (default 100) — 매 artistic license 의 control.
|
||||
- Midjourney `::` — 매 multi-prompt weight: `red fox::2 forest::0.5`.
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
- **Related Topics:** [[프롬프트 엔지니어링 (Prompt Engineering)|프롬프트 엔지니어링 (Prompt Engineering)]], [[부정 프롬프트 (Negative Prompt)|부정 프롬프트 (Negative Prompt)]], [[가중치 조절 (Prompt Weights)|가중치 조절 (Prompt Weights)]], [[미드저니 매개변수 (Midjourney Parameters)|미드저니 매개변수 (Midjourney Parameters)]], [[생성형 AI (Generative AI)|생성형 AI (Generative AI)]]
|
||||
- **Projects/Contexts:** [[AI 이미지 생성 및 편집 워크플로우 (AI Image Generation & Editing Workflow)|AI 이미지 생성 및 편집 워크플로우 (AI Image Generation & Editing Workflow)]], [[플랫폼별 프롬프트 최적화 (Platform-Specific Prompt Optimization)|플랫폼별 프롬프트 최적화 (Platform-Specific Prompt Optimization)]]
|
||||
- **Contradictions/Notes:** DALL-E 3는 "아무것도 없는", "~가 아닌" 등의 부정 지시어를 처리하는 데 취약하여 원치 않는 객체가 도리어 생성될 수 있으므로 모든 지시를 긍정형으로 작성해야 합니다[30, 32, 33]. 반면 Stable Diffusion은 원치 않는 요소(예: 손가락 변형, 저화질, 워터마크 등)를 명시적으로 차단하기 위해 '부정 프롬프트(Negative Prompt)' 섹션을 활용하는 것이 필수적이며 이미지 품질 향상에 직결됩니다[37, 39, 49, 50].
|
||||
### 매 Negative prompt
|
||||
1. SDXL/SD3: `negative_prompt="blurry, low quality, deformed hands, watermark"`.
|
||||
2. Midjourney: `--no text logo` — exclusion list.
|
||||
3. FLUX: 매 native negative prompt support 의 X — instead 매 positive 의 rephrase.
|
||||
|
||||
---
|
||||
*Last updated: 2026-04-30*
|
||||
## 💻 패턴
|
||||
|
||||
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
||||
### Pattern 1: FLUX.1.1 Pro 의 long-form natural prompt
|
||||
```text
|
||||
A photorealistic portrait of an elderly Japanese ceramicist, weathered hands
|
||||
shaping a clay tea bowl on a wooden wheel. Soft window light from the left,
|
||||
shallow depth of field. Earthy tones, traditional workshop with shelves of
|
||||
glazed pottery in the background. Shot on Hasselblad H6D, 80mm lens, f/2.8.
|
||||
```
|
||||
|
||||
**언제 이 지식을 쓰는가:**
|
||||
- *(TODO)*
|
||||
### Pattern 2: Midjourney v7 structured prompt
|
||||
```text
|
||||
/imagine prompt: cyberpunk samurai standing in neon-lit Tokyo alleyway,
|
||||
holographic katana, rain-soaked street reflections, cinematic composition,
|
||||
volumetric lighting, by Syd Mead and Moebius --ar 16:9 --stylize 350 --v 7
|
||||
```
|
||||
|
||||
**언제 쓰면 안 되는가:**
|
||||
- *(TODO)*
|
||||
### Pattern 3: SDXL 의 weighted prompt + negative
|
||||
```python
|
||||
from diffusers import StableDiffusionXLPipeline
|
||||
import torch
|
||||
|
||||
## 🧪 검증 상태 (Validation)
|
||||
pipe = StableDiffusionXLPipeline.from_pretrained(
|
||||
"stabilityai/stable-diffusion-xl-base-1.0",
|
||||
torch_dtype=torch.float16,
|
||||
).to("cuda")
|
||||
|
||||
- **정보 상태:** needs_review
|
||||
- **출처 신뢰도:** A
|
||||
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
|
||||
prompt = "(masterpiece:1.2), red fox in autumn forest, golden hour, " \
|
||||
"(detailed fur:1.3), cinematic photography, 8k"
|
||||
negative = "blurry, low quality, deformed, watermark, text"
|
||||
|
||||
## 🧬 중복 검사 (Duplicate Check)
|
||||
image = pipe(
|
||||
prompt=prompt,
|
||||
negative_prompt=negative,
|
||||
num_inference_steps=30,
|
||||
guidance_scale=7.5,
|
||||
).images[0]
|
||||
```
|
||||
|
||||
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
|
||||
- **처리 방식:** UPDATE (자동 정규화)
|
||||
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
|
||||
### Pattern 4: ControlNet 의 pose + prompt
|
||||
```python
|
||||
from diffusers import StableDiffusionXLControlNetPipeline, ControlNetModel
|
||||
from controlnet_aux import OpenposeDetector
|
||||
|
||||
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
||||
openpose = OpenposeDetector.from_pretrained("lllyasviel/Annotators")
|
||||
pose_image = openpose(input_image)
|
||||
|
||||
- **과거 데이터와의 충돌:** 없음
|
||||
- **정책 변화:** 없음
|
||||
controlnet = ControlNetModel.from_pretrained("xinsir/controlnet-openpose-sdxl-1.0")
|
||||
pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
|
||||
"stabilityai/stable-diffusion-xl-base-1.0",
|
||||
controlnet=controlnet,
|
||||
)
|
||||
|
||||
## 🕓 변경 이력 (Changelog)
|
||||
result = pipe(
|
||||
prompt="a knight in shining armor, dramatic lighting",
|
||||
image=pose_image,
|
||||
controlnet_conditioning_scale=0.8,
|
||||
).images[0]
|
||||
```
|
||||
|
||||
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
||||
|------|-----------|-----------|--------|
|
||||
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
|
||||
### Pattern 5: LLM 의 prompt expansion
|
||||
```python
|
||||
import anthropic
|
||||
|
||||
client = anthropic.Anthropic()
|
||||
|
||||
def expand_prompt(short_idea: str) -> str:
|
||||
msg = client.messages.create(
|
||||
model="claude-opus-4-7",
|
||||
max_tokens=300,
|
||||
messages=[{
|
||||
"role": "user",
|
||||
"content": f"Expand this image idea into a detailed FLUX prompt "
|
||||
f"(subject, style, composition, lighting, camera): {short_idea}"
|
||||
}],
|
||||
)
|
||||
return msg.content[0].text
|
||||
|
||||
prompt = expand_prompt("lonely lighthouse at dusk")
|
||||
```
|
||||
|
||||
### Pattern 6: Imagen 4 의 text rendering
|
||||
```text
|
||||
A vintage diner sign at night, neon letters reading "MOON CAFÉ — OPEN 24 HOURS",
|
||||
warm pink and cyan glow, rain reflections on asphalt, 1950s Americana aesthetic,
|
||||
cinematic wide shot
|
||||
```
|
||||
(Imagen 4 / FLUX 의 accurate text rendering 의 strong — 매 quote-wrapped text 의 use.)
|
||||
|
||||
### Pattern 7: Aspect ratio + seed control
|
||||
```text
|
||||
/imagine prompt: misty mountain temple at sunrise --ar 21:9 --seed 42 --v 7
|
||||
```
|
||||
- `--ar 21:9` — cinematic widescreen.
|
||||
- `--seed 42` — 매 reproducibility.
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| Photorealistic portrait | FLUX.1.1 Pro + long natural prompt |
|
||||
| Stylized art / illustration | Midjourney v7 + artist references |
|
||||
| Precise pose / composition | SDXL + ControlNet (openpose/canny/depth) |
|
||||
| Text in image | Imagen 4 / FLUX (quote-wrapped) |
|
||||
| Local / private | SDXL or FLUX.1-dev on RTX 4090 |
|
||||
| Batch / API workflow | Replicate / fal.ai / Together AI |
|
||||
|
||||
**기본값**: FLUX.1.1 Pro (photoreal) or Midjourney v7 (stylized) + 4-part structured prompt.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Generative-AI]] · [[Diffusion-Models]]
|
||||
- 변형: [[Vary-Region-인페인팅]] · [[ControlNet]] · [[LoRA-Fine-Tuning]]
|
||||
- 응용: [[Concept-Art-Workflow]] · [[Product-Photography-AI]]
|
||||
- Adjacent: [[Prompt-Engineering]] · [[CLIP-Text-Encoder]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: prompt expansion / variation generation / style transfer description / negative prompt brainstorming.
|
||||
**언제 X**: 매 final image quality 의 judgment 의 X — 매 human-in-the-loop 의 visual evaluation 의 always 필요.
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **Keyword soup**: "8k, masterpiece, best quality, ultra detailed, ..." — 매 modern model 의 dilution. Natural language 의 prefer.
|
||||
- **Contradictory modifiers**: "photorealistic anime" — 매 latent space 의 confusion.
|
||||
- **Negative prompt overload**: 매 30+ negative tokens 의 generation 의 degrade.
|
||||
- **No seed control**: 매 reproducibility 의 X — 매 iteration / A/B 의 impossible.
|
||||
- **Ignoring aspect ratio**: 매 default square 의 composition 의 mismatch (cinematic shot 의 16:9 의 필요).
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified: Midjourney v7 docs (2026), Black Forest Labs FLUX docs, Stability AI SDXL paper.
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — full image prompt engineering guide |
|
||||
|
||||
Reference in New Issue
Block a user