KeiStory

728x90
반응형

Stable Diffusion Web UI 를 Windows 에 설치하는 방법

 

Stable diffusion 을 사용하면 내컴퓨터에서 AI 이미지를 만들 수 있습니다.

로컬에서 만들면 컴퓨터에 장착된 그래픽카드를 사용하게 되므로 그래픽 카드 사양이 좋을수록

이미지 생성 시간이 줄어들고 더 고화질의 이미지를 만들 수 있습니다.

 

Stable Diffusion Web UI 를 Windows 에 설치하는 방법입니다.

 

1. Git for Windows 다운로드 하고 설치합니다.

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

 

Git - Downloading Package

Download for Windows Click here to download the latest (2.40.0) 32-bit version of Git for Windows. This is the most recent maintained build. It was released 20 days ago, on 2023-03-14. Other Git for Windows downloads Standalone Installer 32-bit Git for Win

git-scm.com

위 링크로 가서 64-bit Git for Windows Setup을 다운 받아 설치합니다.

설치 시 기본값으로 두고 모두 NEXT 하면 됩니다.

cmd 창을 열어서 git 명령을 내린 경우 명령을 인식하면 제대로 설치된 것입니다.

 

 

2. 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

페이지 아래쪽에 Windows installer (64-bit)을 다운로드하고 설치합니다.

설치 시 아래 항목을 반드시 체크해야 합니다.

파이썬 또한 cmd 창을 열어서 git 명령을 내린 경우 명령을 인식하면 제대로 설치된 것입니다.

 

3. git을 이용해 webui 소스를 받습니다.

소스를 받기 위해 특정 폴더를 하나 만들고 (전 C:\stablediffusion 경로로 만들었습니다.) 

아래 명령을 cmd 창에서 실행합니다.

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

반드시 git clone 명령을 이용해야합니다.

다운받아서 하는 경우에는 업데이트가 힘들어집니다.

 

4. 이미지 만들 때 사용할 모델 파일을 다운로드합니다.

모델 파일은 여러 가지가 있습니다. 아래 사이트에서 모델 파일을 다운로드할 수 있습니다.

https://civitai.com/

 

Civitai | Stable Diffusion models, embeddings, hypernetworks and more

Civitai is a platform for Stable Diffusion AI Art models. We have a collection of over 1,700 models from 250+ creators. We also have a collection of 1200 reviews from the community along with 12,000+ images with prompts to get you started.

civitai.com

전 이 중에서 Deliberate 모델을 다운로드하였습니다.

https://civitai.com/models/4823/deliberate

 

Deliberate | Stable Diffusion Checkpoint | Civitai

Deliberate All in One / Any Case Version This model provides you the ability to create anything you want. The more power of prompt knowledges you h...

civitai.com

다운로드한 파일을 ..\stable-diffusion-webui\models\Stable-diffusion 폴더에 넣습니다.

전체경로 C:\stablediffusion\stable-diffusion-webui\stable-diffusion-webui\models\Stable-diffusion

 

5. webui-user.bat 수정 및 실행

stable-diffusion-webui 폴더의 webui-user.bat 파일을 메모장으로 열어 첫 번째 줄에 git pull을 넣고 저장한 후 실행합니다.

처음 실행시에는 구동에 필요한 패키지들이 설치됩니다.

시간이 상당히 걸립니다. 기다려줍니다.

설치가 다 끝나면 아래처럼 웹페이지 주소가 하나 나타납니다.

이를 웹주소창에 치면 아래처럼 화면이 나타났다면 설치가 완료된 것입니다.

prompt를 입력하면 내 PC 자원을 이용해 이미지를 생성합니다.

아래는 샘플 프롬프트를 이용해 만들어낸 결과입니다.

모델은 위 소개했던 사이트에서 여러 모델을 다운 받아 사용할 수 있습니다.

또한 Lora, VAE 폴더에 관련 파일을 다운 받아 배치하게되면 이를 이용해 이미지를 생성합니다.

해당 내용은 다음 포스팅에서 다루도록 하겠습니다.^^

728x90

공유하기

facebook twitter kakaoTalk kakaostory naver band