Files
2nd/10_Wiki/Topics/AI_and_ML/AI 이미지 생성 및 편집 워크플로우 (AI Image Generation & Editing Workflow).md
T
koriweb d8a80f6272 chore(wiki): dangling 링크 canonical 정규화 (768파일/1200건)
이름만 다른(표기 변형) [[위키링크]]를 대상 문서의 canonical 제목으로 치환해
끊겼던 1,200개 링크를 연결. 제목/파일명 정규화 일치만 적용하고 별칭 매칭은
과병합 위험으로 제외(애매성 가드). 원본은 _link_reconcile_backup/ 에 백업.
도구: Datacollect/scripts/link_reconcile_apply.mjs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 12:24:15 +09:00

6.4 KiB

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, inferred_by
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit inferred_by
wiki-2026-0508-ai-이미지-생성-및-편집-워크플로우-ai-image-ge AI Image Generation & Editing Workflow 10_Wiki/Topics verified self
AI 이미지 워크플로우
image generation workflow
draft mode
iterative refinement
none B 0.85 conceptual
image-generation
workflow
midjourney
stable-diffusion
draft-mode
iterative
post-editing
2026-05-09 pending Claude Opus 4.7 (manual cleanup 2026-05-09)

AI Image Generation & Editing Workflow

📌 한 줄 통찰

Single perfect prompt 의 myth → iterative loop. Draft (cheap variant) → select → refine → upscale → polish (post-edit). 매 round 의 quality ↑.

📖 핵심

매 5-stage workflow

Stage 1: Concept + ideation

  • 매 reference (Pinterest, ArtStation).
  • 매 mood board.
  • 매 prompt sketch.

Stage 2: Draft generation (cheap)

  • 매 dozen variant.
  • Midjourney --draft mode (10x speed).
  • Flux Schnell (fast).
  • 매 4-8 candidate.

Stage 3: Select + iterate

  • 매 best candidate.
  • 매 prompt 의 refine.
  • 매 next round.

Stage 4: Refine (full quality)

  • 매 selected 의 high-quality regenerate.
  • 매 final aspect ratio.

Stage 5: Post-edit

  • 매 inpaint (specific fix).
  • 매 outpaint (extend).
  • 매 upscale (resolution).
  • 매 retouch (Photoshop).

→ 매 stage 의 different speed / cost.

매 cost saving

Draft mode

  • Midjourney V7 --draft: 10x faster, ~50% GPU cost.
  • Flux Schnell: 4-step (vs 50).
  • Latent Consistency Models (LCM).

→ 매 idea 의 cheap exploration.

Generation 의 cost

  • Midjourney: $10-60 / month subscription.
  • DALL-E 3: ~$0.08 / image.
  • Stable Diffusion (self-host): GPU 운영 cost.
  • Flux Pro (Replicate): $0.05 / image.

Compute optimization

  • 매 quality preset (4 step LCM, 20 step DPM++, 50 step DDIM).
  • 매 resolution (512 → 1024 → 4K).
  • 매 batch size.

매 reference 의 활용

Style reference (sref)

  • Midjourney --sref [URL].
  • 매 brand 의 mood board.
  • 매 campaign 의 visual cohesion.

Character reference (cref)

  • Midjourney --cref [URL].
  • 매 character 의 consistency.

Omni reference (oref)

  • Midjourney V7+.
  • 매 specific object identity.

IP-Adapter (Stable Diffusion)

  • 매 reference image 의 style + structure.

LoRA

  • 매 specific style / character 의 fine-tune.

매 quality control

Negative prompt (Stable Diffusion)

  • 매 known defect 의 explicit.
  • "ugly, deformed, watermark, low quality, blurry, extra fingers".

Specific defect 의 inpaint

  • 매 detected defect 의 mask.
  • 매 targeted prompt.

Upscale + face restore

  • Real-ESRGAN (background).
  • GFPGAN / CodeFormer (face).

Production workflow example

Marketing campaign

  1. Mood board (brand 의 reference).
  2. Draft 30 variants (Midjourney draft).
  3. Select 5 (different angle / composition).
  4. Full HD generate.
  5. Inpaint defects.
  6. Upscale 4K.
  7. Photoshop final touch.

→ 30+ image / hour.

Product mockup

  1. Real product photo (input).
  2. Img2Img (style transfer).
  3. Background outpaint (lifestyle context).
  4. Inpaint shadow / reflection.
  5. Upscale.

Concept art (game)

  1. Quick sketch (artist).
  2. ControlNet 의 line art.
  3. Generate variations.
  4. Select + paint over (Photoshop).

💻 Code

Iterative loop (Diffusers)

from diffusers import StableDiffusionXLPipeline
import torch

pipe = StableDiffusionXLPipeline.from_pretrained("model")

# Stage 1: Draft (low quality, fast)
prompts = [base_prompt + variation for variation in style_variations]
drafts = pipe(prompts, num_inference_steps=10, guidance_scale=5).images

# Stage 2: Select (manual or ML score)
best_idx = select_best(drafts)
best_prompt = prompts[best_idx]

# Stage 3: Full quality
final = pipe(best_prompt, num_inference_steps=50, guidance_scale=7.5).images[0]

# Stage 4: Post-edit (inpaint specific defect)
mask = detect_face_defect(final)
inpaint_pipe = StableDiffusionXLInpaintPipeline.from_pretrained("inpaint")
fixed = inpaint_pipe(prompt="perfect face", image=final, mask_image=mask).images[0]

# Stage 5: Upscale
from realesrgan import RealESRGANer
upscaler = RealESRGANer(scale=4, ...)
upscaled, _ = upscaler.enhance(np.array(fixed))

Batch + cost-aware

def smart_generate(prompt, target_quality='final'):
    if target_quality == 'draft':
        return pipe(prompt, num_inference_steps=10).images[0]
    elif target_quality == 'preview':
        return pipe(prompt, num_inference_steps=25).images[0]
    elif target_quality == 'final':
        img = pipe(prompt, num_inference_steps=50).images[0]
        return upscale(img)

Reference-driven (Flux + IP-Adapter)

from diffusers import FluxPipeline

pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev")
pipe.load_ip_adapter("flux-ip-adapter")

style_ref = Image.open("brand_mood.jpg")
result = pipe(
    prompt="product on table, professional photo",
    ip_adapter_image=style_ref,
    ip_adapter_scale=0.6,
).images[0]

🤔 결정 기준

Stage 추천
Ideation Free + reference
Draft Midjourney draft / Flux Schnell
Refine Full quality
Post-edit Inpaint + upscale
Production Photoshop final

기본값: Draft 30 → Select 5 → Final + post-edit. 매 cost 의 80% saving + quality 의 maintain.

🔗 Graph

🤖 LLM 활용

언제: 매 commercial creative project. 매 brand campaign. 언제 X: 매 single-shot idea (no iteration). 매 highly specific artist style (legal).

안티패턴

  • Single prompt + accept: low quality.
  • Full quality from start: cost 폭발.
  • No reference: brand inconsistency.
  • No post-edit: defect in production.
  • Upscale 의 detail invent: hallucinated artifact.

🧪 검증 / 중복

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-09 Manual cleanup — 5-stage workflow + cost + reference + code