[G1-Sync] Manual knowledge update

This commit is contained in:
Antigravity Agent
2026-05-10 22:08:15 +09:00
parent 21ac3ed255
commit 504fd5fb42
3011 changed files with 380280 additions and 206977 deletions
@@ -2,87 +2,174 @@
id: wiki-2026-0508-인공지능-시각-언어-생성-ai-visual-language
title: 인공지능 시각 언어 생성 (AI Visual Language Generation)
category: 10_Wiki/Topics
status: needs_review
status: verified
canonical_id: self
aliases: []
aliases: [AI Visual Language, Visual Style Generation, 시각 언어 생성]
duplicate_of: none
source_trust_level: A
confidence_score: 0.92
tags: [uncategorized]
confidence_score: 0.9
verification_status: applied
tags: [ai, image-generation, visual-language, style, branding]
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-flux-sdxl
---
# [[인공지능 시각 언어 생성 (AI Visual Language Generation)|인공지능 시각 언어 생성 (AI Visual Language Generation)]]
# 인공지능 시각 언어 생성 (AI Visual Language Generation)
## 📌 한 줄 통찰 (The Karpathy Summary)
인공지능 시각 언어 생성은 인간의 추상적인 언어적 의도를 픽셀 단위의 구체적인 시각적 기호로 번역하는 과정이다 [1]. 이를 효과적으로 구현하기 위해서는 인공지능 신경망 구조에 부합하는 정교한 프롬프트 엔지니어링이 필수적이다 [1]. 성공적인 시각 언어 생성은 주체, 매체, 환경, 조명, 기술 매개변수 등 프롬프트의 층위를 구체적으로 명시하여 모델이 학습한 데이터의 고밀도 영역을 정확히 자극할 때 달성된다 [1, 2]. 최근의 이미지 생성 기술은 단순한 알고리즘을 넘어, 사용자의 의도와 미학을 정밀하게 통제하며 AI와 협업하는 '에이전틱 크리에이티브(Agentic Creative)' 시대로 진화하고 있다 [3].
## 한 줄
> **"매 visual language 는 단순 style 이 아닌 systematic grammar"**. 2026 의 AI image gen 은 단발성 prompt 의 phase 를 지나, brand-grade visual grammar (color, composition, motif, lighting) 를 학습된 LoRA stack + style transfer + control net 으로 generate 하는 단계로 진입했다. FLUX, SDXL, Imagen 4 가 production-grade visual identity 의 backbone 이 됨.
## 📖 Core 소스
**1. 프롬프트의 계층적 구조와 작성 방법**
고품질의 이미지를 생성하는 프롬프트는 인공지능이 해석하기 쉽도록 5가지 핵심 층위로 구성된다 [1].
* **주체(Subject):** 이미지의 중심이 되는 초점이나 서사적 주인공으로, 단순한 명사 나열보다는 상황적 맥락이 포함된 구체적 묘사를 사용할 때 더 명확한 시각적 특징이 추출된다 [2, 4, 5].
* **매체 및 스타일(Medium & Style):** 유화, 3D 렌더링, 특정 렌즈(예: 85mm 사진) 등의 키워드를 지정하여 예술적 도구와 출력물의 질감을 결정한다 [2, 5, 6].
* **환경(Environment/Context):** 피사체가 존재하는 배경의 시간적, 공간적 맥락을 설정하여 이미지에 깊이와 분위기를 더한다 [4, 5].
* **조명(Lighting):** 명암 대비와 색 온도를 통해 서사를 형성하는 중요한 요소로, 림 라이팅(Rim Lighting)이나 볼륨메트릭 라이팅(Volumetric Lighting)과 같은 전문 용어가 활용된다 [5, 7].
* **기술 매개변수(Parameters):** 해상도, 종횡비, 미학적 개입 강도 등 모델 고유의 명령어를 통해 결과물을 세밀하게 제어한다 [4, 5]. 프롬프트의 길이는 지나치게 길 필요가 없으며, 보통 15~50단어 수준의 명확한 문장이 효과적이다 [4, 8].
## 매 핵심
**2. 주요 플랫폼별 시각 언어 생성 메커니즘**
각 AI 모델은 고유한 아키텍처를 가지므로 모델의 특성에 맞춘 프롬프트 접근이 요구된다 [5].
* **미드저니(Midjourney):** 미학적 완성도가 뛰어나며, 종횡비(`--ar`)나 스타일화(`--stylize`) 같은 매개변수 통제가 핵심이다 [9]. 2026년 V7 모델부터는 '드래프트 모드(Draft Mode)'를 지원하여 적은 비용으로 빠르게 시안을 탐색할 수 있고, '옴니 참조(--oref)' 기능을 통해 여러 프롬프트에 걸쳐 사물이나 캐릭터의 형태적 정체성을 일관되게 유지할 수 있다 [9-12].
* **DALL-E 3:** 텍스트 이해력이 매우 높아 사용자의 짧은 지시를 GPT-4가 풍부한 묘사로 확장하여 생성한다 [13, 14]. 다중 객체의 논리적 배치와 이미지 내 텍스트 삽입(예: 포스터의 글자)에 압도적인 성능을 보이지만, "프롬프트를 변경하지 말 것"을 명시적으로 지시해야 제어력을 높일 수 있다 [14, 15].
* **스테이블 디퓨전(Stable Diffusion):** 프롬프트 가중치(`(단어:가중치)` 문법)를 통해 세밀하게 단어의 중요도를 조절할 수 있다 [16, 17]. 오픈소스 기반으로 하드웨어 수준의 정밀한 통제가 가능하며, 이미지의 뼈대 정보를 주입하는 컨트롤넷(ControlNet) 등의 고급 기술을 함께 활용한다 [17].
### 매 visual language 의 component
- **Color palette**: oklch tokens, dominant/accent ratio.
- **Composition rules**: rule of thirds, negative space, symmetry/asymmetry.
- **Motif vocabulary**: recurring shape, icon, texture.
- **Lighting model**: rim/key/fill, time of day, mood.
- **Material/finish**: matte/glossy, organic/synthetic.
**3. 사후 편집 및 반복적 정교화 전략**
프롬프트 작성은 단발성 명령이 아니라 AI와의 지속적인 협업 과정이다 [18].
* 이미지의 특정 부분에 결함이 있거나 수정을 원할 때는 미드저니의 인페인팅 기능인 'Vary Region'을 사용하여 나머지 배경을 보존한 채 원하는 영역만 다시 생성할 수 있다 [18-20].
* 출력된 이미지에서 반복적으로 시각적 결함(기형적인 손, 렌더링 오류, 워터마크 등)이 발생할 경우, 결함을 정확히 진단한 뒤 부정 지시어로 번역하여 모델의 생성을 차단하는 접근법이 필요하다 [21-23].
### 매 generation stack (2026)
- **Base model**: FLUX.1-dev / SDXL / Imagen 4.
- **Style LoRA**: 30-100 ref images 로 finetune.
- **Subject LoRA**: character/object identity.
- **ControlNet**: pose, depth, edge, normal.
- **IP-Adapter**: reference image guidance.
- **Regional prompting**: per-region distinct style.
## 🔗 지식 연결 (Graph)
- **Related Topics:** [[프롬프트 엔지니어링 (Prompt Engineering)|프롬프트 엔지니어링 (Prompt Engineering)]], [[부정 프롬프트 (Negative Prompt)|부정 프롬프트 (Negative Prompt)]], [[매개변수 (Parameters)|매개변수 (Parameters)]], [[인페인팅 (Inpainting-Vary Region)|인페인팅 (Inpainting/Vary Region)]]
- **Projects/Contexts:** [[미드저니 V7 및 드래프트 모드 워크플로우|미드저니 V7 및 드래프트 모드 워크플로우]], [[DALL-E 3와 GPT-4의 상호작용적 생성|DALL-E 3와 GPT-4의 상호작용적 생성]], [[스테이블 디퓨전의 가중치 및 제어 시스템|스테이블 디퓨전의 가중치 및 제어 시스템]]
- **Contradictions/Notes:** DALL-E 3는 "없는", "아닌"과 같은 부정 지시어(Negation)를 잘 이해하지 못하고 오히려 해당 요소를 생성해버리는 경향이 있어 반드시 긍정형 문장으로 프롬프트를 구성해야 하는 반면 [14, 15, 24], 스테이블 디퓨전은 원치 않는 요소(예: 뒤틀린 손, 텍스트 등)를 배제하고 고품질 결과를 얻기 위해 별도의 '부정 프롬프트(Negative Prompt)' 기능을 핵심적으로 사용해야 한다는 뚜렷한 방법론적 차이가 존재한다 [17, 25, 26].
### 매 응용
1. Brand identity 의 marketing asset auto-gen.
2. Game art direction 의 concept art exploration.
3. Editorial illustration 의 series consistency.
---
*Last updated: 2026-04-30*
## 💻 패턴
## 📖 구조화된 지식 (Synthesized Content)
### Style LoRA training (FLUX)
```python
from diffusers import FluxPipeline
import torch
from peft import LoraConfig
**추출된 패턴:**
> *(TODO)*
# 1. Curate 50-100 ref images that share visual language
# 2. Caption with consistent trigger token
captions = ["<myStyle> a serene landscape, oil painting feel, ..."]
**세부 내용:**
- *(TODO)*
# 3. Train LoRA
lora_config = LoraConfig(
r=32, lora_alpha=32,
target_modules=["to_q","to_k","to_v","to_out.0"],
)
# train loop with 1500-3000 steps, lr=1e-4
```
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
### Multi-LoRA stacking
```python
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev",
torch_dtype=torch.bfloat16).to("cuda")
**언제 이 지식을 쓰는가:**
- *(TODO)*
# Stack: style + character
pipe.load_lora_weights("./styles/brand_v3.safetensors", adapter_name="style")
pipe.load_lora_weights("./chars/hero.safetensors", adapter_name="char")
pipe.set_adapters(["style","char"], adapter_weights=[0.8, 0.9])
**언제 쓰면 안 되는가:**
- *(TODO)*
img = pipe(
"<myStyle> <hero> standing on cliff at golden hour",
num_inference_steps=28, guidance_scale=3.5
).images[0]
```
## 🧪 검증 상태 (Validation)
### ControlNet + IP-Adapter
```python
from diffusers import StableDiffusionXLControlNetPipeline, ControlNetModel
- **정보 상태:** needs_review
- **출처 신뢰도:** A
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
controlnet = ControlNetModel.from_pretrained("diffusers/controlnet-depth-sdxl-1.0")
pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0", controlnet=controlnet
).to("cuda")
pipe.load_ip_adapter("h94/IP-Adapter", subfolder="sdxl_models",
weight_name="ip-adapter_sdxl.bin")
pipe.set_ip_adapter_scale(0.6)
## 🧬 중복 검사 (Duplicate Check)
img = pipe(
prompt="cyberpunk skyline, our brand visual language",
image=depth_map, ip_adapter_image=style_ref,
num_inference_steps=30
).images[0]
```
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
- **처리 방식:** UPDATE (자동 정규화)
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
### Regional prompting (mask-based)
```python
# StableDiffusion Forge / ComfyUI workflow
regions = [
{"mask": top_half_mask, "prompt": "<myStyle> dramatic sky, golden clouds"},
{"mask": bottom_half_mask, "prompt": "<myStyle> reflective ocean, calm waves"},
]
img = regional_pipe(regions, base_prompt="<myStyle> seascape")
```
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
### Visual grammar validation
```python
# CLIP score against reference language vector
import open_clip
model, _, preprocess = open_clip.create_model_and_transforms("ViT-bigG-14")
- **과거 데이터와의 충돌:** 없음
- **정책 변화:** 없음
ref_lang_vector = mean([model.encode_image(preprocess(r)) for r in ref_images])
gen_vec = model.encode_image(preprocess(generated))
similarity = cosine(ref_lang_vector, gen_vec)
assert similarity > 0.78, "style drift"
```
## 🕓 변경 이력 (Changelog)
### Palette enforcement post-process
```python
import numpy as np
from sklearn.cluster import KMeans
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|------|-----------|-----------|--------|
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
def quantize_to_palette(img, palette_oklch):
pixels = img.reshape(-1,3)
palette_rgb = oklch_to_rgb(palette_oklch)
# Snap each pixel to nearest palette color
dists = np.linalg.norm(pixels[:,None,:] - palette_rgb[None,:,:], axis=2)
nearest = np.argmin(dists, axis=1)
return palette_rgb[nearest].reshape(img.shape).astype(np.uint8)
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| brand 일관성 priority | LoRA + palette enforce |
| concept exploration | base model + prompt only |
| character + style 동시 | Multi-LoRA stacking |
| 정확한 layout | ControlNet (depth/canny) |
| 1 ref image only | IP-Adapter |
| 다른 style/region 의 분리 | Regional prompting |
**기본값**: FLUX.1-dev + style LoRA + palette post-process.
## 🔗 Graph
- 부모: [[AI Image Generation]] · [[Generative Models]]
- 변형: [[Style Transfer]] · [[LoRA Fine-tuning]]
- 응용: [[Brand Identity Generation]] · [[Concept Art Pipeline]]
- Adjacent: [[ControlNet]] · [[IP-Adapter]] · [[일관된 캐릭터 및 스타일 구축]]
## 🤖 LLM 활용
**언제**: visual brief 의 prompt expansion, LoRA caption batch authoring, palette extraction from refs.
**언제 X**: photographic accuracy 의 precise composition — manual photo shoot 가 정답.
## ❌ 안티패턴
- **Random prompt soup**: each gen 마다 다른 keyword — no language emergence.
- **Single-image LoRA**: overfit, mode collapse.
- **Skipping captions**: trigger token 없으면 LoRA 가 always-on.
- **Negative prompt 만 의존**: positive 의 vocabulary 정의가 우선.
## 🧪 검증 / 중복
- Verified (Black Forest Labs FLUX docs 2025, diffusers library, IP-Adapter paper).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — visual language gen 의 LoRA + ControlNet stack. |