Stable Diffusion WebUI 사용법 정리

yoonene·2025년 2월 5일

1. Stable Diffusion Web UI (AUTOMATIC1111) 설치

  • 설치 방법 (Windows 기준)
    1. Python 3.10.6 설치

      • exe 실행해서 설치할 때 add to 어쩌구 path 체크해야 됨.
    2. Git 설치

    3. Stable Diffusion Web UI 다운로드 & 실행

      git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
      cd stable-diffusion-webui
      ./webui.bat
    4. 브라우저에서 http://127.0.0.1:7860 접속

📌 Mac/Linux 유저는 webui.sh 실행

📌 CUDA 11+ 설치하면 속도 개선됨

2. 모델 다운로드

Stable Diffusion 모델 다운로드

모델특징
SDXL최신 모델, 디테일 뛰어남
SD 1.5ControlNet과 호환성 좋음
SD 2.1사실적인 이미지 생성 가능
  1. 원하는 모델 다운로드:
    • huggingface에서 safetensors 또는 ckpt 다운로드
  2. 다운로드한 .ckpt 또는 .safetensors 파일을 stable-diffusion-webui/models/Stable-diffusion 폴더에 넣기

3. ControlNet 설치

  1. Stable Diffusion Web UI 실행 후 Extensions → Install from URL → URL 입력 “https://github.com/Mikubill/sd-webui-controlnet” → Install → 재시작
  2. 여기에서 ControlNet 모델 다운로드
    • control_v11p_sd15_depth.pth (깊이맵)
    • control_v11p_sd15_openpose.pth (사람 포즈 조정)
  3. .pth 파일을 stable-diffusion-webui/extensions/sd-webui-controlnet/models 폴더에 ControlNet 모델 추가

4. 프롬프트 작성

📌 기본 프롬프트 예시

Aerial view of a disaster scene with rescue workers, firefighters, and emergency responders saving people from a collapsed building. Smoke, debris, and chaos in the background. Helicopters and emergency vehicles in the distance. Highly detailed, ultra-realistic, cinematic lighting.

📌 추가 프롬프트 (ex. 더 사실적으로)

realistic, high-quality, ultra-detailed, 4K, cinematic, photojournalism, emergency response, aerial photography

📌 네거티브 프롬프트 (ex. 비현실적인 요소 제거)

blurry, low-quality, cartoon, painting, anime, distorted face, extra limbs

5. ControlNet 설정

ControlNet을 활용하면 위치, 배경, 조명 등을 컨트롤할 수 있음

1️⃣ Depth (깊이맵) 설정

  • control_v11p_sd15_depth.pth 사용
  • 원근감을 살려서 사실적인 이미지를 만들 수 있음

2️⃣ OpenPose (구조자 포즈 설정)

  • control_v11p_sd15_openpose.pth 사용
  • 어떤 자세를 취하고 있는지 세부적으로 조정 가능

3️⃣ Canny (윤곽선 강조)

  • control_v11p_sd15_canny.pth 사용
  • 기존 사진을 기반으로 디테일한 장면 생성 가능

📌 사용법

  1. ControlNet 활성화
  2. Depth 모델 선택 → Enable 체크
  3. OpenPose 모델 선택 → Enable 체크
  4. 이미지 업로드 후 "Generate"

6. 생성 버튼 (Generate) 클릭

  • 위의 세팅이 완료되면 "Generate" 버튼을 눌러서 이미지를 생성
  • 원하는 퀄리티가 안 나오면 프롬프트 수정 & ControlNet 조정

7. 후처리 (Inpainting 활용)

이미지에서 일부 수정이 필요하면 Inpainting 기능을 사용하면 됨.

  1. img2imgInpainting 선택
  2. 수정할 부분을 마스킹 후 다시 Generate
profile
NLP Researcher / Information Retrieval / Search

0개의 댓글