AI 이미지 생성 - DALL-E, Midjourney, Stable Diffusion
텍스트 프롬프트로 고품질 이미지를 생성하는 AI 도구들의 특징과 사용법을 비교합니다.
언제 사용하나요?
- 마케팅 이미지, 배너 제작
- 프로토타입 UI/UX 디자인
- 블로그 썸네일, SNS 콘텐츠
- 프레젠테이션 일러스트
- 게임, 앱 에셋 초안
주요 서비스 비교
| 서비스 | 특징 | 가격 |
|---|
| DALL-E 3 | API 제공, 텍스트 정확도 높음 | 이미지당 /bin/zsh.04~ |
| Midjourney | 예술적 품질 최고 | 월 ~ |
| Stable Diffusion | 오픈소스, 로컬 실행 | 무료 |
| Adobe Firefly | 상업적 사용 안전 | 월 .99~ |
DALL-E 3 (OpenAI)
from openai import OpenAI
client = OpenAI()
response = client.images.generate(
model="dall-e-3",
prompt="한국 전통 한옥 마을의 가을 풍경, 단풍과 고즈넉한 분위기",
size="1024x1024", # 1024x1024, 1024x1792, 1792x1024
quality="hd", # standard, hd
n=1
)
image_url = response.data[0].url
print(image_url)
# 수정된 프롬프트 확인 (DALL-E 3는 프롬프트 자동 개선)
print(response.data[0].revised_prompt)
Midjourney (Discord)
# Discord에서 /imagine 명령어 사용
/imagine prompt: Korean traditional hanok village
in autumn, falling maple leaves, peaceful atmosphere,
cinematic lighting --ar 16:9 --v 6
# 주요 파라미터
--ar 16:9 # 가로세로 비율
--v 6 # 버전 (최신)
--q 2 # 품질 (0.25~2)
--stylize 100 # 스타일 강도 (0~1000)
--no text # 특정 요소 제외
--seed 12345 # 재현성
Stable Diffusion (로컬)
# 설치 (AUTOMATIC1111 WebUI)
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
cd stable-diffusion-webui
./webui.sh
# Python으로 직접 사용
from diffusers import StableDiffusionPipeline
import torch
pipe = StableDiffusionPipeline.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0",
torch_dtype=torch.float16
)
pipe = pipe.to("cuda")
image = pipe(
prompt="한국 전통 한옥 마을 가을 풍경",
negative_prompt="blurry, low quality",
num_inference_steps=30,
guidance_scale=7.5
).images[0]
image.save("output.png")
프롬프트 작성 팁
# 좋은 프롬프트 구조
[주제] + [스타일] + [분위기] + [조명] + [카메라 설정]
# 예시
"A cozy Korean cafe interior,
warm lighting, wooden furniture,
plants, afternoon sunlight through windows,
shot on Fujifilm, bokeh background"
# 부정 프롬프트 (Negative Prompt)
"blurry, low quality, distorted,
ugly, watermark, text, signature"
스타일 키워드
| 스타일 | 키워드 |
|---|
| 사실적 | photorealistic, 8k, detailed |
| 애니메이션 | anime style, studio ghibli |
| 일러스트 | digital illustration, concept art |
| 유화 | oil painting, impressionist |
| 수채화 | watercolor, soft edges |
이미지 편집 (Inpainting)
# DALL-E 이미지 편집
response = client.images.edit(
model="dall-e-2",
image=open("original.png", "rb"),
mask=open("mask.png", "rb"), # 수정할 영역
prompt="빨간 자동차를 파란 자동차로 변경",
n=1,
size="1024x1024"
)
상업적 사용 주의사항
- DALL-E: OpenAI 정책에 따라 상업적 사용 가능
- Midjourney: 유료 플랜에서 상업적 사용 가능
- Stable Diffusion: 모델별 라이선스 확인 필요
- 저작권 침해 우려되는 프롬프트 피하기
비용 최적화
- 초안은 저품질로, 최종본만 고품질
- Stable Diffusion 로컬 실행으로 비용 절감
- 배치 생성 후 선별