본문 바로가기
프로그램

한줄 문장으로 이미지 자동으로 만들자(Stable Diffusion)

by 오디세이99 2022. 10. 4.
728x90
반응형

 

설치

GitHub - cmdr2/stable-diffusion-ui: A simple 1-click way to install and use Stable Diffusion on your own computer. Provides a browser UI for generating images from text prompts and images. Just enter your text prompt, and see the generated image.

 

GitHub - cmdr2/stable-diffusion-ui: A simple 1-click way to install and use Stable Diffusion on your own computer. Provides a br

A simple 1-click way to install and use Stable Diffusion on your own computer. Provides a browser UI for generating images from text prompts and images. Just enter your text prompt, and see the gen...

github.com

 

 

Download  에서 저는 Windows를 클릭해서 설치 파일을 다운 받습니다.

 

다운된 설치 파일 입니다.

 

C드라이브 등에 압축을 풀면 아래와 같이 폴더에 풀립니다.

설치 실행 : Start Dttable Diffusion UI.cmd 를 더블 클릭해서 설치를 실행 합니다.

 

cmd 창에서 설치가 진행 됩니다.

done
Retrieving notices: ...working... done

"Downloading data files (weights) for Stable Diffusion.."

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 4067M  100 4067M    0     0  10.4M      0  0:06:27  0:06:27 --:--:-- 10.8M

"Downloading data files (weights) for GFPGAN (Face Correction).."

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  332M  100  332M    0     0  8041k      0  0:00:42  0:00:42 --:--:-- 8815k

"Downloading data files (weights) for ESRGAN (Resolution Upscaling) x4plus.."

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 63.9M  100 63.9M    0     0  6645k      0  0:00:09  0:00:09 --:--:-- 9378k

"Downloading data files (weights) for ESRGAN (Resolution Upscaling) x4plus_anime.."

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 17.1M  100 17.1M    0     0  4388k      0  0:00:03  0:00:03 --:--:-- 6093k

"Stable Diffusion is ready!"

PYTHONPATH=E:\stable-diffusion-ui\stable-diffusion;E:\stable-diffusion-ui\stable-diffusion\env\Lib\site-packages
Python 3.8.5
started in  E:\stable-diffusion-ui\stable-diffusion
INFO:     Started server process [22908]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:9000 (Press CTRL+C to quit)
INFO:     127.0.0.1:57680 - "GET / HTTP/1.1" 200 OK
INFO:     127.0.0.1:57687 - "GET /drawingboard.min.css HTTP/1.1" 200 OK
INFO:     127.0.0.1:57680 - "GET /main.css?v=10 HTTP/1.1" 200 OK
INFO:     127.0.0.1:57681 - "GET /jquery-3.6.1.min.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:57687 - "GET /drawingboard.min.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:57681 - "GET /main.js?v=15 HTTP/1.1" 200 OK
INFO:     127.0.0.1:57687 - "GET /kofi.png HTTP/1.1" 200 OK
INFO:     127.0.0.1:57681 - "GET /modifiers.json?v=2 HTTP/1.1" 200 OK
INFO:     127.0.0.1:57681 - "GET /output_dir HTTP/1.1" 200 OK
INFO:     127.0.0.1:57680 - "GET /app_config HTTP/1.1" 200 OK
GPU detected:  GeForce GTX 1080
Loading model from sd-v1-4.ckpt
Global Step: 470000
UNet: Running in eps-prediction mode
CondStage: Running in eps-prediction mode
Downloading: "https://github.com/DagnyT/hardnet/raw/master/pretrained/train_liberty_with_aug/checkpoint_liberty_with_aug.pth" to C:\Users\admin/.cache\torch\hub\checkpoints\checkpoint_liberty_with_aug.pth
100%|█████████████████████████████████████████████████████████████████████████████| 5.10M/5.10M [00:01<00:00, 3.34MB/s]
Downloading: 100%|███████████████████████████████████████████████████████████████████| 939k/939k [00:01<00:00, 825kB/s]
Downloading: 100%|███████████████████████████████████████████████████████████████████| 512k/512k [00:00<00:00, 540kB/s]
Downloading: 100%|█████████████████████████████████████████████████████████████████████| 389/389 [00:00<00:00, 194kB/s]
Downloading: 100%|█████████████████████████████████████████████████████████████████████| 905/905 [00:00<00:00, 906kB/s]
Downloading: 100%|████████████████████████████████████████████████████████████████| 4.41k/4.41k [00:00<00:00, 1.50MB/s]
Downloading: 100%|████████████████████████████████████████████████████████████████| 1.59G/1.59G [02:40<00:00, 10.7MB/s]
FirstStage: Running in eps-prediction mode
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
loaded  sd-v1-4 to cuda precision autocast
INFO:     127.0.0.1:57704 - "GET /ding.mp3 HTTP/1.1" 200 OK
INFO:     127.0.0.1:57680 - "GET /favicon-32x32.png HTTP/1.1" 200 OK

 

설치가 끝나면 브라우저에 다음과 같은 창이 열립니다.

 

 

이미지 만들기

- 문장 : a photograph of an astronaut riding a horse 

(Default로 위 문장이 있습니다)

- 'Make Image' 버튼을 클릭합니다.

cmd창에 이미지를 만들기 위해 진행 합니다.

    session_id: 1664843574184
    prompt: a photograph of an astronaut riding a horse
    negative_prompt:
    seed: 7889137
    num_inference_steps: 50
    sampler: plms
    guidance_scale: 7.5
    w: 512
    h: 512
    precision: autocast
    save_to_disk_path: None
    turbo: True
    use_cpu: False
    use_full_precision: False
    use_face_correction: None
    use_upscale: None
    show_only_filtered_image: True

    stream_progress_updates: True
    stream_image_progress: False
    device cuda


    Using precision: autocast
Global seed set to 7889137
Sampling:   0%|                                                                                  | 0/1 [00:00<?, ?it/s]seeds used =  [7889137]                                                                           | 0/1 [00:00<?, ?it/s]
Data shape for PLMS sampling is [1, 4, 64, 64]
Running PLMS Sampling with 50 timesteps
PLMS Sampler: 100%|████████████████████████████████████████████████████████████████████| 50/50 [00:38<00:00,  1.29it/s]
saving images
memory_final =  0.544256███████████████████████████████████████████████████████████████| 50/50 [00:38<00:00,  1.58it/s]
data: 100%|██████████████████████████████████████████████████████████████████████████████| 1/1 [00:54<00:00, 54.03s/it]
Sampling: 100%|██████████████████████████████████████████████████████████████████████████| 1/1 [00:54<00:00, 54.03s/it]
Task completed
INFO:     127.0.0.1:59314 - "GET /ding.mp3 HTTP/1.1" 304 Not Modified

1분 정도 걸려서 아래의 이미지가 만들어 집니다.

 

 

추가 실험

구글 번역기에서 번역해서 문장을 넣고 실행해 봤습니다.

문장 : photo of a whale flying in the sky (고래가 하늘을 나르는 사진)

 

 

문장 : Photo of a whale flying through a sky with crushed clouds (고래가 뭉개 구름이 있는 하늘을 날고 있는 사진)

728x90
반응형

댓글