IT,컴퓨터 이야기

Stable Diffusion WebUI 설치방법 (진행 중)

원소랑 2023. 9. 6. 04:03
728x90

1. Python 3.10.6 설치

2. Git 설치

유의사항 : 기존에 설치된 Python 이 있다면 삭제해야함. webui.bat 실행으로 설치 시 문제가 생길 수 있음.

 

Python 3.10.6

https://www.python.org/downloads/release/python-3106/

 

Python Release Python 3.10.6

The official home of the Python Programming Language

www.python.org

 

Git

https://git-scm.com/download/win

 

Git - Downloading Package

Download for Windows Click here to download the latest (2.42.0) 32-bit version of Git for Windows. This is the most recent maintained build. It was released 6 days ago, on 2023-08-30. Other Git for Windows downloads Standalone Installer 32-bit Git for Wind

git-scm.com

Git Bash Here 체크하고 설치.

 

3. 폴더에서 Shift + 우클릭. PowerShell 오픈. Git 커맨드 입력해서 clone 하고, webui.bat 실행. 4분 정도 걸림.

git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

 

4. 설치가 끝나면 웹브라우저로 로컬호스트 7860 포트로 접속. 기본 설치는 완료.

 

아직은 동작하지 않음.

필수 플러그인을 설치해줘야 함

 

5. 필수 애드온 설치.

필수 애드온
- Checkpoint
- VAE
- Extention(ControlNet 및 기타 애드온)

civitai 에서 Checkpoint, VAE, LoRA 등의 애드온 데이터 다운로드, 설치
https://civitai.com

 

Civitai | Stable Diffusion models, embeddings, LoRAs and more

Civitai is a platform for Stable Diffusion AI Art models. Browse a collection of thousands of models from a growing number of creators. Join an engaged community in reviewing models and sharing images with prompts to get you started.

civitai.com

RealisticVision 검색. V2.0(noVAE) 탭 클릭해서 다운로드.

https://civitai.com/models/4201?modelVersionId=130072 

 

Realistic Vision V5.1 - V5.1 (VAE) | Stable Diffusion Checkpoint | Civitai

RealVisXL V1.0 ( CivitAI | Hugging Face ) Realistic Vision V5.1 (noVAE) is now on Hugging Face Please read the model description of version 5.1 Thi...

civitai.com

 

6. 다운로드 받은 Model 을 적당한 폴더에 저장

stable-diffusion-webui/models/Stable-diffusion 아래에.

다시 webui.bat 실행하고 웹브라우저로 접속.

좌상단에서 모델을 변경할 수 있으면 성공.

이런 방식으로,

Checkpoint와 VAE, LoRA 데이터를 다운로드 받아서 사용할 수 있음.

 

7. Hugging Face에서 에드온 데이터 다운로드, 설치.

VAE 경로 : https://huggingface.co/stabilityai/sd-vae-ft-mse-original/tree/main

> VAE(Variational AutoEncoder)

경로 : ./stable-diffusion-webui/models/VAE

SD Checkpoint 와 VAE 모두 설정된 상태.

 

테스트. 해보려는데, 아래처럼 오류가 뜸.

NansException: A tensor with all NaNs was produced in Unet. This could be either because there's not enough precision to represent the picture, or because your video card does not support half type. Try setting the "Upcast cross attention layer to float32" option in Settings > Stable Diffusion or using the --no-half commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check.

Upcast cross attention layer to float32 옵션을 켜거나, --no-half 인자를 주라는데,

전자로는 해결이 안 됐고, 후자 인자를 넣어서 해결.

 

그리고 또 테스트 해보려는데, 메모리 오류가 뜸.

Hires.fix 열어서 Upscale by 를 2에서 1쪽으로 낮춤.

성공.

 

8. SD 확장 기능인 ControlNet 설치하기.

// 진행 중

ControlNet 구동 프로그램을 설치하고 모델을 다운로드 받아서 설치해줘야함.

 

 

<The Game Graphics AI 비주얼 테크닉>

구입 링크
https://link.coupang.com/a/8NcWO

 

The Game Graphics AI 비주얼 테크닉 + 미니수첩 증정

COUPANG

www.coupang.com

(링크를 통해 도서 구입시 일정액의 수수료를 지급받습니다.)


728x90
반응형