Stable Diffusion¤Î¥¤¥ó¥¹¥È¡¼¥ë

¹¹¿·Æü2023-08-29 (²Ð) 20:07:40
ºîÀ®Æü:2023ǯ8·î16Æü

¥í¡¼¥«¥ë¥³¥ó¥Ô¥å¡¼¥¿¤ËStable Diffusion Web UI(AUTOMATIC1111)¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¼ê½ç

´Ä¶­

  • OS: Windows11 Pro
  • ¥á¥â¥ê: 32GB
  • CPU: i5 13500
  • GPU: GTX1650
  • ¥°¥é¥Õ¥£¥Ã¥¯¥á¥â¥ê: 4GB

´Ä¶­¹½ÃÛ

Python¡¡Install¤Î¥¤¥ó¥¹¥È¡¼¥ë

°Ê²¼¤Î¤è¤¦¤Ë½é¤á¤Ï3.11.4¤Ç¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¤¬¡¢¥µ¥Ý¡¼¥È¤¬3.10.6¤È¤¢¤ë¤Î¤Ç¡¢3.11.4¤ò¥¢¥ó¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¡¢3.10.6¤ò¥¤¥ó¥¹¥È¡¼¥ë¡£
¤³¤ì¤Ë¹ç¤ï¤»¤Æ¡¢Statable Duffision¤âºÆ¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¡£ Statable Duffision¤Ï¥¤¥ó¥¹¥È¡¼¥ë¥Õ¥©¥ë¥À¡Östable-diffusion-webui-master¡×¤ò¥ê¥Í¡¼¥à¤·¤Æ¡¢
¿·¤¿¤ËZIP²òÅष¤¿¡Östable-diffusion-webui-master¡×¤·¤¿¡£¤½¤ì°Ê³°¤ÎGit¡¢CUDA¤Ï¤½¤Î¤Þ¤Þ»ÈÍѤ·¤¿

  • ¥Ð¡¼¥¸¥ç¥ó¡§3.11.4

°Ê²¼¤«¤épython-3.11.4-amd64.exe¤òDownload¤¹¤ë

pythonDL.png Python_DL_3106.png

DL¥Õ¥¡¥¤¥ë¤ò¼Â¹Ô¤¹¤ë

¥¤¥ó¥¹¥È¡¼¥é¤ò¼Â¹Ô¤¹¤ë¤È¼¡¤Î²èÌ̤¬É½¼¨¤¹¤ë¤Î¤Ç¡ÖAdd python.exe to PATH¡×¤Ë¥Á¥§¥Ã¥¯¤òÆþ¤ì¤ë¡£
¤¢¤È¤Ï¥¤¥ó¥¹¥È¡¼¥ëÀè¤òÊѹ¹¤·¤Æ»Ä¤ê¤Ï¥Ç¥Õ¥©¥ë¥È¤Ç¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£

  • ¡ÖAdd python.exe to PATH¡×¤Î¥Á¥§¥Ã¥¯¤ò˺¤ì¤¿¤é´Ä¶­ÊÑ¿ô¤Ë°Ê²¼¤Î¤è¤¦¤ËÄɲ乤ë

pythonpath.png

Git¤Î¥¤¥ó¥¹¥È¡¼¥ë

Git¤òÍøÍѤǤ­¤ë¤è¤¦¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë

°Ê²¼¤«¤éGit¤Î¥À¥¦¥ó¥í¡¼¥É¤¹¤ë

Git¤Î¥À¥¦¥ó¥í¡¼¥É.png

¥¤¥ó¥¹¥È¡¼¥ë¤Ï´ðËܥǥե©¥ë¥È¤Ç¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£
¡ÖConfiguring extra options¡×¤Ç¤Ï¡ÖEnable symbolic links¡×¤Ë¥Á¥§¥Ã¥¯¤òÆþ¤ì¤ë

Git_Inst1.png¡¡¡¡Git_Inst2.png

Git_Inst3.png¡¡¡¡Git_Inst4.png

Git_Inst5.png¡¡¡¡Git_Inst6.png

Git_Inst7.png¡¡¡¡Git_Inst8.png

Git_Inst9.png¡¡¡¡Git_Inst10.png

Git_Inst11.png¡¡¡¡Git_Inst12.png

Git_Inst13.png¡¡¡¡Git_Inst14.png

Git_Inst15.png¡¡¡¡Git_Inst16.png

CUDA¤Î¥¤¥ó¥¹¥È¡¼¥ë

CUDA¤ÏStable Diffusion¤ÇGPU¤ò»ÈÍѤ¹¤ë¤¿¤á¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë

CUDA¤Î¥À¥¦¥ó¥í¡¼¥É

  • NVIDIA¤Î¥µ¥¤¥È

Win10:

Win11: ¢«¤³¤Á¤é¤ò»ÈÍÑ

Window11ÍѤòDL¤¹¤ë

CUDA_Win11_DL.png

¥¤¥ó¥¹¥È¡¼¥é¤òµ¯Æ°¤¹¤ë¤È²òÅàÀè¤ò»ØÄê¤Ç¤­¤ë¤Î¤ÇŬÅö¤Ê¥Õ¥©¥ë¥À¤ò»ØÄꤹ¤ë

CUDA_Inst1.png

¥¤¥ó¥¹¥È¡¼¥ë¥Õ¥©¥ë¥À¤Ï¥Ç¥Õ¥©¥ë¥È(C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2)¤Î¤Þ¤Þ»ÈÍѤ·¤¿¡£¡Ê¤³¤Î¤Û¤¦¤¬¤è¤µ¤½¤¦¡Ë

CUDA_Inst2.png¡¡CUDA_Inst3.png

CUDA_Inst4.png¡¡CUDA_Inst5.png

CUDA_Inst6.png¡¡CUDA_Inst7.png

CUDA_Inst8.png¡¡CUDA_Inst9.png

Stable Diffusion Web UI¤Î¥¤¥ó¥¹¥È¡¼¥ë

­¢¤ÎÊý¤¬¡¢º£¸å¤Î¥¢¥Ã¥×¥Ç¡¼¥È¤Ê¤É¤ò¹Í¤¨¤ë¤È­¡¤è¤êÎɤ¤

­¡ Github¤«¤é¥Õ¥©¥ë¥ÀÁ´ÂΤòZIP¤ÇDL¤·¤Æ²òÅह¤ëÊýË¡

Stable Diffusion Web UI¤Î¥À¥¦¥ó¥í¡¼¥É

StableDiffusion_DL.png

Zip¤ò²òÅष¤ÆŬÅö¤Ê¥Õ¥©¥ë¥À¤Ë°ÜÆ°¤¹¤ë

­¢ git clone¤Ç¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ëÊýË¡

  • ¥¤¥ó¥¹¥È¡¼¥ë¥Õ¥©¥ë¥À¤òºîÀ®¡Ê¤³¤ÎÎã¤À¤È c:\SD\stable-diffusion-webui¤Ë¤Ê¤ë)

c:\SD¤òºîÀ®

  • ¥³¥Þ¥ó¥É¥×¥í¥ó¥×¥È¤òµ¯Æ°
> cd \sd
> git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
Cloning into 'stable-diffusion-webui'...
remote: Enumerating objects: 26741, done.
remote: Counting objects: 100% (170/170), done.
remote: Compressing objects: 100% (87/87), done.
remote: Total 26741 (delta 96), reused 135 (delta 83), pack-reused 
26571Receiving objects: 100% (26741/26741), 29.82 MiBReceiving objects: 100% 
(26741/26741), 32.02 MiB | 7.28 MiB/s, done.

Resolving deltas: 100% (18721/18721), done.
> cd .\stable-diffusion-webui\

SD_Inst1.png

> .\webui-user.bat

C:\SD\stable-diffusion-webui>webui-user.bat
Creating venv in directory C:\SD\stable-diffusion-webui\venv using python 
"C:\Usr\Python\Python310\python.exe"
venv "C:\SD\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.5.2
Commit hash: c9c8485bc1e8720aba70f029d25cba1c4abf2b5c
Installing torch and torchvision
 
(ά)

Hash¤Î³Îǧ

>cd \SD\stable-diffusion-webui

C:\SD\stable-diffusion-webui>git log
commit c9c8485bc1e8720aba70f029d25cba1c4abf2b5c (HEAD -> master, tag: v1.5.2, 
origin/master, origin/HEAD) ¢«¡¡°ìÈ־夬¸½ºß¤ÎHashÃÍ
Merge: 68f336bd 31f2be3d
Author: AUTOMATIC1111 <16777216c@gmail.com>
Date:   Wed Aug 23 15:48:09 2023 +0300

    Merge branch 'release_candidate'

commit 31f2be3dcedf85c036c5f784c640208d122b62ed (tag: v1.5.2-RC)
Author: AUTOMATIC1111 <16777216c@gmail.com>
Date:   Wed Aug 23 15:47:11 2023 +0300

    update changelog
(°Ê¹ßά)

³Ø½¬¥â¥Ç¥ë¤ò¥À¥¦¥ó¥í¡¼¥É

°Ê²¼¤«¤é¥â¥Ç¥ë(sd-v1-4.ckpt)¤òDL¤¹¤ë

¥â¥Ç¥ë(sd-v1-4.ckpt)¤ò°Ê²¼¤Î¥Õ¥©¥ë¥À¤Ë°ÜÆ°¤¹¤ë

stable-diffusion-webui-master\stable-diffusion-webui-master\models\Stable-diffusion\

GFPGAN¤ÎÀßÄê

¿Íʪ¤Î´é¤òåºÎï¡Ê¹â²è¼Á¡Ë¤Ë¤¹¤ë¤ß¤¿¤¤

°Ê²¼¤«¤éZIP¥Õ¥¡¥¤¥ë(GFPGAN-master.zip)¤òDL

GFPGAN_DL.png

²òÅष¤ÆGFPGAN-master¥Õ¥©¥ë¥À¤òstable-diffusion-webui-master¤ËÆþ¤ì¤ë

stable-diffusion-webui-master\GFPGAN-master\(¤³¤ÎÃæ¤ËÊ£¿ô¤Î¥Õ¥¡¥¤¥ë¤ä¥Õ¥©¥ë¥À¤¬¤¢¤ë)

Stable Diffusion¼Â¹Ô¼ê½ç

stable-diffusion-webui-master¤ÎÃæ¤Î

  • webui-user.bat¥Õ¥¡¥¤¥ë¤ò¼Â¹Ô¤¹¤ë

¼Â¹Ô¤¹¤ë¤È°Ê²¼¤Î¤è¤¦¤Ê¥³¥Þ¥ó¥É¤ÎÁ뤬ɽ¼¨¤¹¤ë

Stable Diffusion¼Â¹Ô1.png

¤·¤Ð¤é¤¯¤¹¤ë¤È°Ê²¼¤ÎURL¤¬É½¼¨¤¹¤ë

Stable Diffusion¼Â¹Ô2.png

ɽ¼¨¤·¤¿URL¤ò¥Ö¥é¥¦¥¶¤Ç³«¤¯

Stable Diffusion¼Â¹Ô3.png

¥×¥í¥ó¥×¥È¤òÆþ¤ì¤Æ¡ÖGenerate¡×¤¹¤ë

Stable_Diffusion¼Â¹Ô4.png

°Ê¸åµ¯Æ°»þ¤Ï¤³¤ó¤Ê´¶¤¸

''' ¤Ï¡¢ÆâÉô¥³¥Þ¥ó¥É¤Þ¤¿¤Ï³°Éô¥³¥Þ¥ó¥É¡¢
Áàºî²Äǽ¤Ê¥×¥í¥°¥é¥à¤Þ¤¿¤Ï¥Ð¥Ã¥Á ¥Õ¥¡¥¤¥ë¤È¤·¤Æǧ¼±¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£
''set' ¤Ï¡¢ÆâÉô¥³¥Þ¥ó¥É¤Þ¤¿¤Ï³°Éô¥³¥Þ¥ó¥É¡¢
Áàºî²Äǽ¤Ê¥×¥í¥°¥é¥à¤Þ¤¿¤Ï¥Ð¥Ã¥Á ¥Õ¥¡¥¤¥ë¤È¤·¤Æǧ¼±¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£
''Edit' ¤Ï¡¢ÆâÉô¥³¥Þ¥ó¥É¤Þ¤¿¤Ï³°Éô¥³¥Þ¥ó¥É¡¢
Áàºî²Äǽ¤Ê¥×¥í¥°¥é¥à¤Þ¤¿¤Ï¥Ð¥Ã¥Á ¥Õ¥¡¥¤¥ë¤È¤·¤Æǧ¼±¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£
venv "C:\Usr\stable-diffusion-webui-master\venv\Scripts\Python.exe"
==============================================================================================================
INCOMPATIBLE PYTHON VERSION

This program is tested with 3.10.6 Python, but you have 3.11.4.
If you encounter an error with "RuntimeError: Couldn't install torch." message,
or any other error regarding unsuccessful package (library) installation,
please downgrade (or upgrade) to the latest version of 3.10 Python
and delete current Python and "venv" folder in WebUI's directory.

You can download 3.10 Python from here: https://www.python.org/downloads/release/python-3106/

Alternatively, use a binary release of WebUI: https://github.com/AUTOMATIC1111/stable-diffusion-webui/releases

Use --skip-python-version-check to suppress this warning.
=============================================================================== ===============================
fatal: not a git repository (or any of the parent directories): .git 
fatal: not a git repository (or any of the parent directories): .git
Python 3.11.4 (tags/v3.11.4:d2340ef, Jun  7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)]
Version: 1.5.1
Commit hash: <none>



Launching Web UI with arguments: --medvram --no-half
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
[-] ADetailer initialized. version: 23.8.0, num models: 9
2023-08-27 04:39:42,445 - ControlNet - INFO - ControlNet v1.1.312
ControlNet preprocessor location: C:\Usr\stable-diffusion-webui-master\extensions\sd-webui-controlnet\annotator\downloads
2023-08-27 04:39:42,755 - ControlNet - INFO - ControlNet v1.1.312
dirname:  C:\Usr\stable-diffusion-webui-master\localizations
localizations:  {'ja_JP': 'C:\\Usr\\stable-diffusion-webui-master\\extensions\\stable-diffusion-webui-localization-ja_JP\\localizations\\ja_JP.json', 'ks_JP': 'C:\\Usr\\stable-diffusion-webui-master\\extensions\\stable-diffusion-webui-localization-ja_JP\\localizations\\ks_JP.json', 'zh_CN': 'C:\\Usr\\stable-diffusion-webui-master\\extensions\\stable-diffusion-webui-localization-ja_JP\\localizations\\zh_CN.json', 'zh_TW': 'C:\\Usr\\stable-diffusion-webui-master\\extensions\\stable-diffusion-webui-localization-ja_JP\\localizations\\zh_TW.json'}
Loading weights [bc2f30f4ad] from C:\Usr\stable-diffusion-webui-master\models\Stable-diffusion\beautifulRealistic_v60.safetensors
Creating model from config: C:\Usr\stable-diffusion-webui-master\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 16.9s (launcher: 5.0s, import torch: 3.6s, import gradio: 1.0s, s etup paths: 1.2s, other imports: 1.1s, list SD models: 0.2s, load scripts: 3.6s, create ui: 0.9s, gradio launch: 0.2s).
Applying attention optimization: Doggettx... done

GTX1650¤Ç¤ÎɬÍ×¥ª¥×¥·¥ç¥óÄɲÃ

GTX1650»ÈÍÑ»þ¤Ï¤¤¤«¤Î¤è¤¦¤Ëµ¯Æ°¥Ð¥Ã¥Á¤òÊѹ¹¤¹¤ë¤è¤¦¤ÊÀâÌÀ¤¬¤¢¤Ã¤¿¤¬¡¢¤È¤­¤¯¤ËÊѹ¹¤·¤Ê¤¯¤Æ¤â²èÁüÀ¸À®¤Ç¤­¤¿ (Pyhton 3.6.10¤Ç¤ÏɬÍפǡ¢3.11.4¤Ç¤ÏÉÔÍפÀ¤Ã¤¿)

  • webui-user.bat
set COMMANDLINE_ARGS=
¤ò°Ê²¼¤ËÊѹ¹¤¹¤ë
set COMMANDLINE_ARGS=--precision full --no-half --medvram --opt-split-attention

³ÈÄ¥µ¡Ç½¤ò¹¹¿·¤·¤Æ¡ÖÆɤ߹þ¤ßÃæ¡×¤Ç»ß¤Þ¤ëÂбþ

  • ¥³¥Þ¥ó¥É¥×¥í¥ó¥×¥ÈÆâ¤Îɽ¼¨
ERROR:    Exception in ASGI application Traceback 
¡Êά)
KeyError: 'dataset'

Âбþºö

  • ¡Östable-diffusion-webui-master\venv\Lib\site-packages\gradio_client\serializing.py¡×¤ÎʸËö¤Ë¡Ö"dataset": StringSerializable,¡×¤òÄɲÃ
    "code": StringSerializable,
    "annotatedimage": JSONSerializable,
    "dataset": StringSerializable,  ¢«¤³¤³¤òÄɲÃ
}

»²¹Í

»²¹Í¥Ú¡¼¥¸


źÉÕ¥Õ¥¡¥¤¥ë: fileSD_Inst1.png 48·ï [¾ÜºÙ] filePython_DL_3106.png 46·ï [¾ÜºÙ] fileStable_Diffusion¼Â¹Ô4.png 45·ï [¾ÜºÙ] fileStableDiffusion_DL.png 48·ï [¾ÜºÙ] fileStable Diffusion¼Â¹Ô3.png 46·ï [¾ÜºÙ] fileStable Diffusion¼Â¹Ô2.png 48·ï [¾ÜºÙ] fileStable Diffusion¼Â¹Ô1.png 45·ï [¾ÜºÙ] filepythonpath.png 44·ï [¾ÜºÙ] filepythonInst.png 10·ï [¾ÜºÙ] filepythonDL.png 49·ï [¾ÜºÙ] fileModel_DL.png 6·ï [¾ÜºÙ] fileGit¤Î¥À¥¦¥ó¥í¡¼¥É.png 47·ï [¾ÜºÙ] fileGit_Inst16.png 43·ï [¾ÜºÙ] fileGit_Inst15.png 48·ï [¾ÜºÙ] fileGit_Inst14.png 47·ï [¾ÜºÙ] fileGit_Inst13.png 43·ï [¾ÜºÙ] fileGit_Inst12.png 46·ï [¾ÜºÙ] fileGit_Inst11.png 44·ï [¾ÜºÙ] fileGit_Inst10.png 41·ï [¾ÜºÙ] fileGit_Inst9.png 49·ï [¾ÜºÙ] fileGit_Inst8.png 44·ï [¾ÜºÙ] fileGit_Inst7.png 43·ï [¾ÜºÙ] fileGit_Inst6.png 50·ï [¾ÜºÙ] fileGit_Inst5.png 47·ï [¾ÜºÙ] fileGit_Inst4.png 46·ï [¾ÜºÙ] fileGit_Inst3.png 46·ï [¾ÜºÙ] fileGit_Inst2.png 52·ï [¾ÜºÙ] fileGit_Inst1.png 44·ï [¾ÜºÙ] fileGFPGAN_DL.png 44·ï [¾ÜºÙ] fileCUDA_Inst7.png 47·ï [¾ÜºÙ] fileCUDA_Win11_DL.png 45·ï [¾ÜºÙ] fileCUDA_Inst9.png 49·ï [¾ÜºÙ] fileCUDA_Inst8.png 47·ï [¾ÜºÙ] fileCUDA_Inst6.png 46·ï [¾ÜºÙ] fileCUDA_Inst5.png 47·ï [¾ÜºÙ] fileCUDA_Inst4.png 43·ï [¾ÜºÙ] fileCUDA_Inst3.png 49·ï [¾ÜºÙ] fileCUDA_Inst2.png 43·ï [¾ÜºÙ] fileCUDA_Inst1.png 49·ï [¾ÜºÙ]

¥È¥Ã¥×   ÊÔ½¸ Åà·ë º¹Ê¬ ¥Ð¥Ã¥¯¥¢¥Ã¥× źÉÕ Ê£À½ ̾Á°Êѹ¹ ¥ê¥í¡¼¥É   ¿·µ¬ °ìÍ÷ ¸¡º÷ ºÇ½ª¹¹¿·   ¥Ø¥ë¥×   ºÇ½ª¹¹¿·¤ÎRSS
Last-modified: 2023-08-29 (²Ð) 20:07:40