fahimf / sd-gui Goto Github PK
View Code? Open in Web Editor NEWClean and simple Stable Diffusion GUI for macOS, Windows, and Linux
License: MIT License
Clean and simple Stable Diffusion GUI for macOS, Windows, and Linux
License: MIT License
Can you integrate this diffusion? It is super optimised!
Great new interface! Thanks for your hard work beautiful job!
Here is what I had to do to run in on my M1
after the auto-installation script, I had to manually install darkdetect and skimage.
Instructions:
pip install darkdetect
conda install -c conda-forge scikit-image
Everything works nice but the it/s rate is super slow on m1 Mac (Monterey / mbpro). Did you activate the MPS tweaks available?
https://github.com/Birch-san/k-diffusion <= Birch-san offers a MPS enabled k-diffusion branch for m1. please integrate this into your great tool! it will speed up the generation time tremendously.
I'm getting this error on a M1 Pro 2021 MacBook
Intel MKL FATAL ERROR: This system does not meet the minimum requirements for use of the Intel(R) Math Kernel Library.
The processor must support the Intel(R) Supplemental Streaming SIMD Extensions 3 (Intel(R) SSSE3) instructions.
The processor must support the Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) instructions.
The processor must support the Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.
Firstly, thanks for the great tool. It serves all my needs for an Apple Silicon optimized GUI which is great π .
A feature that I'm sorely missing though is the ability to upscale images (using ESRGAN model). I'm a TypeScript developer and not the best with Python, so if it's possible for you to outline in some detail what needs to happen to make this available, I'll gladly open a PR to try and add this feature myself.
Thanks again!
I've been able to go through the whole process without issues, but can't launch the script. I've checked and pytorch with other dependencies were installed without issues, but for some reason it can't be accessed it seems. Do you maybe know what I'm doing wrong? Thank you <3
(ml) phylyp@Phylyps-MacBook-Pro sd-gui % python gui.py
Traceback (most recent call last):
File "/Users/phylyp/sd-gui/sd-gui/gui.py", line 2, in <module>
import torch
ModuleNotFoundError: No module named 'torch'
(ml) phylyp@Phylyps-MacBook-Pro sd-gui %
Last login: Mon Oct 3 16:39:15 on ttys000
(base) β ~ cd sd-gui
(base) β sd-gui git:(main) β ./install.sh
Create conda environment (y/n)?yWARNING: A conda environment already exists at '/Users/bamboozle/opt/miniconda3/envs/ml'
Remove existing environment (y/[n])? y
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /Users/bamboozle/opt/miniconda3/envs/ml
added / updated specs:
- python=3.9.13
The following NEW packages will be INSTALLED:
ca-certificates pkgs/main/osx-arm64::ca-certificates-2022.07.19-hca03da5_0 None
certifi pkgs/main/osx-arm64::certifi-2022.9.14-py39hca03da5_0 None
libcxx pkgs/main/osx-arm64::libcxx-14.0.6-h848a8c0_0 None
libffi pkgs/main/osx-arm64::libffi-3.4.2-hc377ac9_4 None
ncurses pkgs/main/osx-arm64::ncurses-6.3-h1a28f6b_3 None
openssl pkgs/main/osx-arm64::openssl-1.1.1q-h1a28f6b_0 None
pip pkgs/main/osx-arm64::pip-22.2.2-py39hca03da5_0 None
python pkgs/main/osx-arm64::python-3.9.13-hbdb9e5c_1 None
readline pkgs/main/osx-arm64::readline-8.1.2-h1a28f6b_1 None
setuptools pkgs/main/osx-arm64::setuptools-63.4.1-py39hca03da5_0 None
sqlite pkgs/main/osx-arm64::sqlite-3.39.3-h1058600_0 None
tk pkgs/main/osx-arm64::tk-8.6.12-hb8d0fd4_0 None
tzdata pkgs/main/noarch::tzdata-2022c-h04d1e81_0 None
wheel pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0 None
xz pkgs/main/osx-arm64::xz-5.2.6-h1a28f6b_0 None
zlib pkgs/main/osx-arm64::zlib-1.2.12-h5a0b063_3 None
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate ml
#
# To deactivate an active environment, use
#
# $ conda deactivate
Retrieving notices: ...working... done
Activate new conda environment (y/n)?y
Could not find conda environment: ml
You can list all discoverable environments with `conda info --envs`.
Continue (y/n)?Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.12.0
latest version: 22.9.0
Please update conda by running
$ conda update -n base -c defaults conda
## Package Plan ##
environment location: /Users/bamboozle/opt/miniconda3
added / updated specs:
- pytorch
The following packages will be SUPERSEDED by a higher-priority channel:
openssl conda-forge::openssl-1.1.1q-ha287fd2_0 --> pkgs/main::openssl-1.1.1q-h1a28f6b_0
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.12.0
latest version: 22.9.0
Please update conda by running
$ conda update -n base -c defaults conda
## Package Plan ##
environment location: /Users/bamboozle/opt/miniconda3
added / updated specs:
- pyqt
The following packages will be downloaded:
package | build
---------------------------|-----------------
certifi-2022.9.14 | py39hca03da5_0 156 KB
------------------------------------------------------------
Total: 156 KB
The following packages will be SUPERSEDED by a higher-priority channel:
ca-certificates conda-forge::ca-certificates-2022.9.2~ --> pkgs/main::ca-certificates-2022.07.19-hca03da5_0
certifi conda-forge/noarch::certifi-2022.9.24~ --> pkgs/main/osx-arm64::certifi-2022.9.14-py39hca03da5_0
Downloading and Extracting Packages
certifi-2022.9.14 | 156 KB | ##################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.12.0
latest version: 22.9.0
Please update conda by running
$ conda update -n base -c defaults conda
## Package Plan ##
environment location: /Users/bamboozle/opt/miniconda3
added / updated specs:
- diffusers
- flask
- ftfy
- scipy
- transformers
The following packages will be downloaded:
package | build
---------------------------|-----------------
ca-certificates-2022.9.24 | h4653dfc_0 150 KB conda-forge
certifi-2022.9.24 | pyhd8ed1ab_0 155 KB conda-forge
openssl-1.1.1q | ha287fd2_0 1.8 MB conda-forge
------------------------------------------------------------
Total: 2.0 MB
The following packages will be UPDATED:
ca-certificates pkgs/main::ca-certificates-2022.07.19~ --> conda-forge::ca-certificates-2022.9.24-h4653dfc_0
certifi pkgs/main/osx-arm64::certifi-2022.9.1~ --> conda-forge/noarch::certifi-2022.9.24-pyhd8ed1ab_0
The following packages will be SUPERSEDED by a higher-priority channel:
openssl pkgs/main::openssl-1.1.1q-h1a28f6b_0 --> conda-forge::openssl-1.1.1q-ha287fd2_0
Downloading and Extracting Packages
openssl-1.1.1q | 1.8 MB | ##################################### | 100%
ca-certificates-2022 | 150 KB | ##################################### | 100%
certifi-2022.9.24 | 155 KB | ##################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Requirement already satisfied: opencv-python in /Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages (4.6.0.66)
Requirement already satisfied: numpy>=1.17.3 in /Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages (from opencv-python) (1.23.1)
Revert PyTorch to good nightly (y/n)?yLooking in links: https://download.pytorch.org/whl/nightly/torch_nightly.html
Collecting torch==1.13.0.dev20220922
Using cached https://download.pytorch.org/whl/nightly/cpu/torch-1.13.0.dev20220922-cp39-none-macosx_11_0_arm64.whl (54.6 MB)
Requirement already satisfied: torchaudio==0.13.0.dev20220922 in /Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages (from -r requirements.txt (line 2)) (0.13.0.dev20220922)
Requirement already satisfied: torchvision==0.14.0.dev20220923 in /Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages (from -r requirements.txt (line 3)) (0.14.0.dev20220923)
Requirement already satisfied: typing-extensions in /Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages (from torch==1.13.0.dev20220922->-r requirements.txt (line 1)) (4.3.0)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages (from torchvision==0.14.0.dev20220923->-r requirements.txt (line 3)) (9.2.0)
Requirement already satisfied: requests in /Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages (from torchvision==0.14.0.dev20220923->-r requirements.txt (line 3)) (2.27.1)
Requirement already satisfied: numpy in /Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages (from torchvision==0.14.0.dev20220923->-r requirements.txt (line 3)) (1.23.1)
Requirement already satisfied: certifi>=2017.4.17 in /Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages (from requests->torchvision==0.14.0.dev20220923->-r requirements.txt (line 3)) (2022.9.24)
Requirement already satisfied: charset-normalizer~=2.0.0 in /Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages (from requests->torchvision==0.14.0.dev20220923->-r requirements.txt (line 3)) (2.0.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages (from requests->torchvision==0.14.0.dev20220923->-r requirements.txt (line 3)) (1.26.9)
Requirement already satisfied: idna<4,>=2.5 in /Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages (from requests->torchvision==0.14.0.dev20220923->-r requirements.txt (line 3)) (3.3)
Installing collected packages: torch
Attempting uninstall: torch
Found existing installation: torch 1.13.0.dev20220924
Uninstalling torch-1.13.0.dev20220924:
Successfully uninstalled torch-1.13.0.dev20220924
Successfully installed torch-1.13.0.dev20220922
Download the Stable Diffusion model (y/n)?yUpdated Git hooks.
Git LFS initialized.
Cloning into 'stable-diffusion-v1-4'...
remote: Enumerating objects: 638, done.
remote: Counting objects: 100% (638/638), done.
remote: Compressing objects: 100% (624/624), done.
remote: Total 638 (delta 73), reused 494 (delta 5), pack-reused 0
Receiving objects: 100% (638/638), 670.90 KiB | 1.37 MiB/s, done.
Resolving deltas: 100% (73/73), done.
Filtering content: 100% (4/4), 5.10 GiB | 34.46 MiB/s, done.
(base) β sd-gui git:(main) β python app.py
/Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.23.1
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
Traceback (most recent call last):
File "/Users/bamboozle/sd-gui/app.py", line 5, in <module>
from tools.config import Config
File "/Users/bamboozle/sd-gui/tools/config.py", line 7, in <module>
from tools.sd_engine import GeneratorType
File "/Users/bamboozle/sd-gui/tools/sd_engine.py", line 2, in <module>
from diffusers import StableDiffusionPipeline, StableDiffusionInpaintPipeline, StableDiffusionImg2ImgPipeline
File "/Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages/diffusers/__init__.py", line 26, in <module>
from .pipelines import DDIMPipeline, DDPMPipeline, KarrasVePipeline, LDMPipeline, PNDMPipeline, ScoreSdeVePipeline
File "/Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages/diffusers/pipelines/__init__.py", line 4, in <module>
from .latent_diffusion_uncond import LDMPipeline
File "/Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages/diffusers/pipelines/latent_diffusion_uncond/__init__.py", line 2, in <module>
from .pipeline_latent_diffusion_uncond import LDMPipeline
File "/Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages/diffusers/pipelines/latent_diffusion_uncond/pipeline_latent_diffusion_uncond.py", line 9, in <module>
from ...schedulers import DDIMScheduler
File "/Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages/diffusers/schedulers/__init__.py", line 26, in <module>
from .scheduling_lms_discrete import LMSDiscreteScheduler
File "/Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages/diffusers/schedulers/scheduling_lms_discrete.py", line 20, in <module>
from scipy import integrate
File "/Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages/scipy/integrate/__init__.py", line 90, in <module>
from ._quadrature import *
File "/Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages/scipy/integrate/_quadrature.py", line 12, in <module>
from scipy.special import roots_legendre
File "/Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages/scipy/special/__init__.py", line 643, in <module>
from . import _ufuncs
ImportError: dlopen(/Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages/scipy/special/_ufuncs.cpython-39-darwin.so, 0x0002): Library not loaded: '@rpath/liblapack.3.dylib'
Referenced from: '/Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages/scipy/special/_ufuncs.cpython-39-darwin.so'
Reason: tried: '/Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages/scipy/special/../../../../liblapack.3.dylib' (no such file), '/Users/bamboozle/opt/miniconda3/lib/python3.9/site-packages/scipy/special/../../../../liblapack.3.dylib' (no such file), '/Users/bamboozle/opt/miniconda3/bin/../lib/liblapack.3.dylib' (no such file), '/Users/bamboozle/opt/miniconda3/bin/../lib/liblapack.3.dylib' (no such file), '/usr/local/lib/liblapack.3.dylib' (no such file), '/usr/lib/liblapack.3.dylib' (no such file)
(base) β sd-gui git:(main) β conda activate ml
(ml) β sd-gui git:(main) β python app.py
Traceback (most recent call last):
File "/Users/bamboozle/sd-gui/app.py", line 5, in <module>
from tools.config import Config
File "/Users/bamboozle/sd-gui/tools/config.py", line 7, in <module>
from tools.sd_engine import GeneratorType
File "/Users/bamboozle/sd-gui/tools/sd_engine.py", line 1, in <module>
import torch
ModuleNotFoundError: No module named 'torch'
(ml) β sd-gui git:(main) β ./install.sh
Create conda environment (y/n)?yWARNING: A conda environment already exists at '/Users/bamboozle/opt/miniconda3/envs/ml'
Remove existing environment (y/[n])? n
CondaSystemExit: Exiting.
Activate new conda environment (y/n)?yContinue (y/n)?yCollecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.12.0
latest version: 22.9.0
Please update conda by running
$ conda update -n base -c defaults conda
## Package Plan ##
environment location: /Users/bamboozle/miniconda/envs/ml
added / updated specs:
- pytorch
The following packages will be downloaded:
package | build
---------------------------|-----------------
pytorch-1.13.0.dev20221003 | py3.10_0 46.4 MB pytorch-nightly
typing_extensions-4.3.0 | py310hca03da5_0 42 KB
------------------------------------------------------------
Total: 46.4 MB
The following NEW packages will be INSTALLED:
bzip2 pkgs/main/osx-arm64::bzip2-1.0.8-h620ffc9_4
ca-certificates pkgs/main/osx-arm64::ca-certificates-2022.07.19-hca03da5_0
certifi pkgs/main/osx-arm64::certifi-2022.9.14-py310hca03da5_0
libcxx pkgs/main/osx-arm64::libcxx-14.0.6-h848a8c0_0
libffi pkgs/main/osx-arm64::libffi-3.4.2-hc377ac9_4
ncurses pkgs/main/osx-arm64::ncurses-6.3-h1a28f6b_3
openssl pkgs/main/osx-arm64::openssl-1.1.1q-h1a28f6b_0
pip pkgs/main/osx-arm64::pip-22.2.2-py310hca03da5_0
python pkgs/main/osx-arm64::python-3.10.4-hbdb9e5c_0
pytorch pytorch-nightly/osx-arm64::pytorch-1.13.0.dev20221003-py3.10_0
readline pkgs/main/osx-arm64::readline-8.1.2-h1a28f6b_1
setuptools pkgs/main/osx-arm64::setuptools-63.4.1-py310hca03da5_0
sqlite pkgs/main/osx-arm64::sqlite-3.39.3-h1058600_0
tk pkgs/main/osx-arm64::tk-8.6.12-hb8d0fd4_0
typing_extensions pkgs/main/osx-arm64::typing_extensions-4.3.0-py310hca03da5_0
tzdata pkgs/main/noarch::tzdata-2022c-h04d1e81_0
wheel pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0
xz pkgs/main/osx-arm64::xz-5.2.6-h1a28f6b_0
zlib pkgs/main/osx-arm64::zlib-1.2.12-h5a0b063_3
Downloading and Extracting Packages
pytorch-1.13.0.dev20 | 46.4 MB | ##################################### | 100%
typing_extensions-4. | 42 KB | ##################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.12.0
latest version: 22.9.0
Please update conda by running
$ conda update -n base -c defaults conda
## Package Plan ##
environment location: /Users/bamboozle/miniconda/envs/ml
added / updated specs:
- pyqt
The following packages will be downloaded:
package | build
---------------------------|-----------------
gettext-0.21.0 | h826f4ad_0 2.6 MB
giflib-5.2.1 | h1a28f6b_0 69 KB
glib-2.69.1 | h98b2900_1 2.7 MB
gst-plugins-base-1.14.1 | hf0a386a_0 1.4 MB
gstreamer-1.14.1 | he09cfb7_0 1.1 MB
icu-68.1 | hc377ac9_0 10.7 MB
jpeg-9e | h1a28f6b_0 223 KB
krb5-1.19.2 | h3b8d789_0 1.1 MB
lerc-3.0 | hc377ac9_0 115 KB
libclang-12.0.0 |default_hc321e17_4 5.5 MB
libdeflate-1.8 | h1a28f6b_5 35 KB
libedit-3.1.20210910 | h1a28f6b_0 135 KB
libiconv-1.16 | h1a28f6b_2 706 KB
libllvm12-12.0.0 | h12f7ac0_4 17.6 MB
libpng-1.6.37 | hb8d0fd4_0 256 KB
libpq-12.9 | h65cfe13_3 2.0 MB
libtiff-4.4.0 | had003b8_0 428 KB
libwebp-1.2.2 | h68602c7_0 72 KB
libwebp-base-1.2.2 | h1a28f6b_0 329 KB
libxml2-2.9.14 | h8c5e841_0 607 KB
libxslt-1.1.35 | h9833966_0 437 KB
llvm-openmp-14.0.6 | hc6e5704_0 253 KB
lz4-c-1.9.3 | hc377ac9_0 126 KB
nspr-4.33 | hc377ac9_0 222 KB
nss-3.74 | h142855e_0 1.7 MB
packaging-21.3 | pyhd3eb1b0_0 36 KB
pcre-8.45 | hc377ac9_0 185 KB
ply-3.11 | py310hca03da5_0 81 KB
pyparsing-3.0.9 | py310hca03da5_0 151 KB
pyqt-5.15.7 | py310hc377ac9_0 3.9 MB
pyqt5-sip-12.11.0 | py310hc377ac9_0 74 KB
qt-main-5.15.2 | ha2d02b5_7 32.7 MB
qt-webengine-5.15.9 | h2903aaf_4 42.0 MB
qtwebkit-5.212 | h0f11f3c_4 9.0 MB
sip-6.6.2 | py310hc377ac9_0 419 KB
toml-0.10.2 | pyhd3eb1b0_0 20 KB
zstd-1.5.2 | h8574219_0 371 KB
------------------------------------------------------------
Total: 139.2 MB
The following NEW packages will be INSTALLED:
gettext pkgs/main/osx-arm64::gettext-0.21.0-h826f4ad_0
giflib pkgs/main/osx-arm64::giflib-5.2.1-h1a28f6b_0
glib pkgs/main/osx-arm64::glib-2.69.1-h98b2900_1
gst-plugins-base pkgs/main/osx-arm64::gst-plugins-base-1.14.1-hf0a386a_0
gstreamer pkgs/main/osx-arm64::gstreamer-1.14.1-he09cfb7_0
icu pkgs/main/osx-arm64::icu-68.1-hc377ac9_0
jpeg pkgs/main/osx-arm64::jpeg-9e-h1a28f6b_0
krb5 pkgs/main/osx-arm64::krb5-1.19.2-h3b8d789_0
lerc pkgs/main/osx-arm64::lerc-3.0-hc377ac9_0
libclang pkgs/main/osx-arm64::libclang-12.0.0-default_hc321e17_4
libdeflate pkgs/main/osx-arm64::libdeflate-1.8-h1a28f6b_5
libedit pkgs/main/osx-arm64::libedit-3.1.20210910-h1a28f6b_0
libiconv pkgs/main/osx-arm64::libiconv-1.16-h1a28f6b_2
libllvm12 pkgs/main/osx-arm64::libllvm12-12.0.0-h12f7ac0_4
libpng pkgs/main/osx-arm64::libpng-1.6.37-hb8d0fd4_0
libpq pkgs/main/osx-arm64::libpq-12.9-h65cfe13_3
libtiff pkgs/main/osx-arm64::libtiff-4.4.0-had003b8_0
libwebp pkgs/main/osx-arm64::libwebp-1.2.2-h68602c7_0
libwebp-base pkgs/main/osx-arm64::libwebp-base-1.2.2-h1a28f6b_0
libxml2 pkgs/main/osx-arm64::libxml2-2.9.14-h8c5e841_0
libxslt pkgs/main/osx-arm64::libxslt-1.1.35-h9833966_0
llvm-openmp pkgs/main/osx-arm64::llvm-openmp-14.0.6-hc6e5704_0
lz4-c pkgs/main/osx-arm64::lz4-c-1.9.3-hc377ac9_0
nspr pkgs/main/osx-arm64::nspr-4.33-hc377ac9_0
nss pkgs/main/osx-arm64::nss-3.74-h142855e_0
packaging pkgs/main/noarch::packaging-21.3-pyhd3eb1b0_0
pcre pkgs/main/osx-arm64::pcre-8.45-hc377ac9_0
ply pkgs/main/osx-arm64::ply-3.11-py310hca03da5_0
pyparsing pkgs/main/osx-arm64::pyparsing-3.0.9-py310hca03da5_0
pyqt pkgs/main/osx-arm64::pyqt-5.15.7-py310hc377ac9_0
pyqt5-sip pkgs/main/osx-arm64::pyqt5-sip-12.11.0-py310hc377ac9_0
qt-main pkgs/main/osx-arm64::qt-main-5.15.2-ha2d02b5_7
qt-webengine pkgs/main/osx-arm64::qt-webengine-5.15.9-h2903aaf_4
qtwebkit pkgs/main/osx-arm64::qtwebkit-5.212-h0f11f3c_4
sip pkgs/main/osx-arm64::sip-6.6.2-py310hc377ac9_0
toml pkgs/main/noarch::toml-0.10.2-pyhd3eb1b0_0
zstd pkgs/main/osx-arm64::zstd-1.5.2-h8574219_0
Downloading and Extracting Packages
pcre-8.45 | 185 KB | ##################################### | 100%
gstreamer-1.14.1 | 1.1 MB | ##################################### | 100%
llvm-openmp-14.0.6 | 253 KB | ##################################### | 100%
nspr-4.33 | 222 KB | ##################################### | 100%
libpq-12.9 | 2.0 MB | ##################################### | 100%
toml-0.10.2 | 20 KB | ##################################### | 100%
nss-3.74 | 1.7 MB | ##################################### | 100%
libpng-1.6.37 | 256 KB | ##################################### | 100%
libxml2-2.9.14 | 607 KB | ##################################### | 100%
jpeg-9e | 223 KB | ##################################### | 100%
pyparsing-3.0.9 | 151 KB | ##################################### | 100%
giflib-5.2.1 | 69 KB | ##################################### | 100%
libxslt-1.1.35 | 437 KB | ##################################### | 100%
zstd-1.5.2 | 371 KB | ##################################### | 100%
libwebp-base-1.2.2 | 329 KB | ##################################### | 100%
krb5-1.19.2 | 1.1 MB | ##################################### | 100%
ply-3.11 | 81 KB | ##################################### | 100%
pyqt5-sip-12.11.0 | 74 KB | ##################################### | 100%
qtwebkit-5.212 | 9.0 MB | ##################################### | 100%
pyqt-5.15.7 | 3.9 MB | ##################################### | 100%
libedit-3.1.20210910 | 135 KB | ##################################### | 100%
glib-2.69.1 | 2.7 MB | ##################################### | 100%
libtiff-4.4.0 | 428 KB | ##################################### | 100%
gettext-0.21.0 | 2.6 MB | ##################################### | 100%
libclang-12.0.0 | 5.5 MB | ##################################### | 100%
icu-68.1 | 10.7 MB | ##################################### | 100%
packaging-21.3 | 36 KB | ##################################### | 100%
sip-6.6.2 | 419 KB | ##################################### | 100%
libllvm12-12.0.0 | 17.6 MB | ##################################### | 100%
libwebp-1.2.2 | 72 KB | ##################################### | 100%
qt-main-5.15.2 | 32.7 MB | ##################################### | 100%
lz4-c-1.9.3 | 126 KB | ##################################### | 100%
lerc-3.0 | 115 KB | ##################################### | 100%
gst-plugins-base-1.1 | 1.4 MB | ##################################### | 100%
libdeflate-1.8 | 35 KB | ##################################### | 100%
libiconv-1.16 | 706 KB | ##################################### | 100%
qt-webengine-5.15.9 | 42.0 MB | ##################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.12.0
latest version: 22.9.0
Please update conda by running
$ conda update -n base -c defaults conda
## Package Plan ##
environment location: /Users/bamboozle/miniconda/envs/ml
added / updated specs:
- diffusers
- flask
- ftfy
- scipy
- transformers
The following packages will be downloaded:
package | build
---------------------------|-----------------
backports-1.0 | py_2 4 KB conda-forge
backports.functools_lru_cache-1.6.4| pyhd8ed1ab_0 9 KB conda-forge
blas-2.116 | openblas 13 KB conda-forge
blas-devel-3.9.0 |16_osxarm64_openblas 13 KB conda-forge
brotlipy-0.7.0 |py310h1a28f6b_1002 312 KB
cffi-1.15.1 | py310h22df2f2_0 223 KB
charset-normalizer-2.1.1 | pyhd8ed1ab_0 36 KB conda-forge
click-8.0.4 | py310hca03da5_0 152 KB
colorama-0.4.5 | pyhd8ed1ab_0 18 KB conda-forge
cryptography-37.0.1 | py310h834c97f_0 1.1 MB
diffusers-0.3.0 | pyhd8ed1ab_0 90 KB conda-forge
fftw-3.3.10 | nompi_h3046061_4 1.2 MB conda-forge
filelock-3.8.0 | pyhd8ed1ab_0 13 KB conda-forge
flask-2.2.2 | pyhd8ed1ab_0 74 KB conda-forge
freetype-2.12.1 | hd633e50_0 852 KB conda-forge
ftfy-6.1.1 | pyhd8ed1ab_0 57 KB conda-forge
huggingface_hub-0.10.0 | pyhd8ed1ab_0 114 KB conda-forge
idna-3.4 | pyhd8ed1ab_0 55 KB conda-forge
importlib-metadata-4.11.3 | py310hca03da5_0 35 KB
importlib_metadata-4.11.3 | hd3eb1b0_0 12 KB
itsdangerous-2.1.2 | pyhd8ed1ab_0 16 KB conda-forge
jinja2-3.1.2 | pyhd8ed1ab_1 99 KB conda-forge
joblib-1.2.0 | pyhd8ed1ab_0 205 KB conda-forge
lcms2-2.12 | had6a04f_0 369 KB conda-forge
libblas-3.9.0 |16_osxarm64_openblas 13 KB conda-forge
libcblas-3.9.0 |16_osxarm64_openblas 13 KB conda-forge
libgfortran-5.0.0 |11_3_0_hd922786_25 146 KB conda-forge
libgfortran5-11.3.0 | hdaf2cc0_25 1.3 MB conda-forge
liblapack-3.9.0 |16_osxarm64_openblas 13 KB conda-forge
liblapacke-3.9.0 |16_osxarm64_openblas 13 KB conda-forge
libopenblas-0.3.21 |openmp_hc731615_3 3.9 MB conda-forge
libzlib-1.2.12 | h03a7124_3 51 KB conda-forge
markupsafe-2.1.1 | py310h1a28f6b_0 22 KB
numpy-1.21.5 | py310h220015d_3 11 KB
numpy-base-1.21.5 | py310h742c864_3 4.4 MB
openblas-0.3.21 |openmp_hf78f355_3 4.3 MB conda-forge
pillow-9.2.0 | py310h4d1bdd5_1 623 KB
pycparser-2.21 | pyhd8ed1ab_0 100 KB conda-forge
pyopenssl-22.0.0 | pyhd8ed1ab_1 120 KB conda-forge
pysocks-1.7.1 | pyha2e5f31_6 19 KB conda-forge
pyyaml-6.0 | py310h1a28f6b_0 164 KB
regex-2022.7.9 | py310h1a28f6b_0 317 KB
requests-2.28.1 | pyhd8ed1ab_1 53 KB conda-forge
sacremoses-0.0.53 | pyhd8ed1ab_0 427 KB conda-forge
scipy-1.7.3 | py310h4af22ef_2 15.2 MB
six-1.16.0 | pyh6c4a22f_0 14 KB conda-forge
tokenizers-0.11.4 | py310h5c5695e_1 2.5 MB
tqdm-4.64.1 | pyhd8ed1ab_0 82 KB conda-forge
transformers-4.18.0 | py310hca03da5_0 2.9 MB
typing-extensions-4.3.0 | py310hca03da5_0 9 KB
urllib3-1.26.11 | pyhd8ed1ab_0 102 KB conda-forge
wcwidth-0.2.5 | pyh9f0ad1d_2 33 KB conda-forge
werkzeug-2.2.2 | pyhd8ed1ab_0 249 KB conda-forge
yaml-0.2.5 | h3422bc3_2 86 KB conda-forge
zipp-3.8.1 | pyhd8ed1ab_0 13 KB conda-forge
------------------------------------------------------------
Total: 42.0 MB
The following NEW packages will be INSTALLED:
backports conda-forge/noarch::backports-1.0-py_2
backports.functoo~ conda-forge/noarch::backports.functools_lru_cache-1.6.4-pyhd8ed1ab_0
blas conda-forge/osx-arm64::blas-2.116-openblas
blas-devel conda-forge/osx-arm64::blas-devel-3.9.0-16_osxarm64_openblas
brotlipy pkgs/main/osx-arm64::brotlipy-0.7.0-py310h1a28f6b_1002
cffi pkgs/main/osx-arm64::cffi-1.15.1-py310h22df2f2_0
charset-normalizer conda-forge/noarch::charset-normalizer-2.1.1-pyhd8ed1ab_0
click pkgs/main/osx-arm64::click-8.0.4-py310hca03da5_0
colorama conda-forge/noarch::colorama-0.4.5-pyhd8ed1ab_0
cryptography pkgs/main/osx-arm64::cryptography-37.0.1-py310h834c97f_0
diffusers conda-forge/noarch::diffusers-0.3.0-pyhd8ed1ab_0
fftw conda-forge/osx-arm64::fftw-3.3.10-nompi_h3046061_4
filelock conda-forge/noarch::filelock-3.8.0-pyhd8ed1ab_0
flask conda-forge/noarch::flask-2.2.2-pyhd8ed1ab_0
freetype conda-forge/osx-arm64::freetype-2.12.1-hd633e50_0
ftfy conda-forge/noarch::ftfy-6.1.1-pyhd8ed1ab_0
huggingface_hub conda-forge/noarch::huggingface_hub-0.10.0-pyhd8ed1ab_0
idna conda-forge/noarch::idna-3.4-pyhd8ed1ab_0
importlib-metadata pkgs/main/osx-arm64::importlib-metadata-4.11.3-py310hca03da5_0
importlib_metadata pkgs/main/noarch::importlib_metadata-4.11.3-hd3eb1b0_0
itsdangerous conda-forge/noarch::itsdangerous-2.1.2-pyhd8ed1ab_0
jinja2 conda-forge/noarch::jinja2-3.1.2-pyhd8ed1ab_1
joblib conda-forge/noarch::joblib-1.2.0-pyhd8ed1ab_0
lcms2 conda-forge/osx-arm64::lcms2-2.12-had6a04f_0
libblas conda-forge/osx-arm64::libblas-3.9.0-16_osxarm64_openblas
libcblas conda-forge/osx-arm64::libcblas-3.9.0-16_osxarm64_openblas
libgfortran conda-forge/osx-arm64::libgfortran-5.0.0-11_3_0_hd922786_25
libgfortran5 conda-forge/osx-arm64::libgfortran5-11.3.0-hdaf2cc0_25
liblapack conda-forge/osx-arm64::liblapack-3.9.0-16_osxarm64_openblas
liblapacke conda-forge/osx-arm64::liblapacke-3.9.0-16_osxarm64_openblas
libopenblas conda-forge/osx-arm64::libopenblas-0.3.21-openmp_hc731615_3
libzlib conda-forge/osx-arm64::libzlib-1.2.12-h03a7124_3
markupsafe pkgs/main/osx-arm64::markupsafe-2.1.1-py310h1a28f6b_0
numpy pkgs/main/osx-arm64::numpy-1.21.5-py310h220015d_3
numpy-base pkgs/main/osx-arm64::numpy-base-1.21.5-py310h742c864_3
openblas conda-forge/osx-arm64::openblas-0.3.21-openmp_hf78f355_3
pillow pkgs/main/osx-arm64::pillow-9.2.0-py310h4d1bdd5_1
pycparser conda-forge/noarch::pycparser-2.21-pyhd8ed1ab_0
pyopenssl conda-forge/noarch::pyopenssl-22.0.0-pyhd8ed1ab_1
pysocks conda-forge/noarch::pysocks-1.7.1-pyha2e5f31_6
pyyaml pkgs/main/osx-arm64::pyyaml-6.0-py310h1a28f6b_0
regex pkgs/main/osx-arm64::regex-2022.7.9-py310h1a28f6b_0
requests conda-forge/noarch::requests-2.28.1-pyhd8ed1ab_1
sacremoses conda-forge/noarch::sacremoses-0.0.53-pyhd8ed1ab_0
scipy pkgs/main/osx-arm64::scipy-1.7.3-py310h4af22ef_2
six conda-forge/noarch::six-1.16.0-pyh6c4a22f_0
tokenizers pkgs/main/osx-arm64::tokenizers-0.11.4-py310h5c5695e_1
tqdm conda-forge/noarch::tqdm-4.64.1-pyhd8ed1ab_0
transformers pkgs/main/osx-arm64::transformers-4.18.0-py310hca03da5_0
typing-extensions pkgs/main/osx-arm64::typing-extensions-4.3.0-py310hca03da5_0
urllib3 conda-forge/noarch::urllib3-1.26.11-pyhd8ed1ab_0
wcwidth conda-forge/noarch::wcwidth-0.2.5-pyh9f0ad1d_2
werkzeug conda-forge/noarch::werkzeug-2.2.2-pyhd8ed1ab_0
yaml conda-forge/osx-arm64::yaml-0.2.5-h3422bc3_2
zipp conda-forge/noarch::zipp-3.8.1-pyhd8ed1ab_0
The following packages will be UPDATED:
ca-certificates pkgs/main::ca-certificates-2022.07.19~ --> conda-forge::ca-certificates-2022.9.24-h4653dfc_0
certifi pkgs/main/osx-arm64::certifi-2022.9.1~ --> conda-forge/noarch::certifi-2022.9.24-pyhd8ed1ab_0
The following packages will be SUPERSEDED by a higher-priority channel:
openssl pkgs/main::openssl-1.1.1q-h1a28f6b_0 --> conda-forge::openssl-1.1.1q-ha287fd2_0
Downloading and Extracting Packages
libzlib-1.2.12 | 51 KB | ##################################### | 100%
libblas-3.9.0 | 13 KB | ##################################### | 100%
idna-3.4 | 55 KB | ##################################### | 100%
werkzeug-2.2.2 | 249 KB | ##################################### | 100%
brotlipy-0.7.0 | 312 KB | ##################################### | 100%
liblapacke-3.9.0 | 13 KB | ##################################### | 100%
ftfy-6.1.1 | 57 KB | ##################################### | 100%
charset-normalizer-2 | 36 KB | ##################################### | 100%
zipp-3.8.1 | 13 KB | ##################################### | 100%
importlib-metadata-4 | 35 KB | ##################################### | 100%
six-1.16.0 | 14 KB | ##################################### | 100%
openblas-0.3.21 | 4.3 MB | ##################################### | 100%
tokenizers-0.11.4 | 2.5 MB | ##################################### | 100%
libgfortran5-11.3.0 | 1.3 MB | ##################################### | 100%
libgfortran-5.0.0 | 146 KB | ##################################### | 100%
jinja2-3.1.2 | 99 KB | ##################################### | 100%
pysocks-1.7.1 | 19 KB | ##################################### | 100%
transformers-4.18.0 | 2.9 MB | ##################################### | 100%
backports.functools_ | 9 KB | ##################################### | 100%
cryptography-37.0.1 | 1.1 MB | ##################################### | 100%
numpy-base-1.21.5 | 4.4 MB | ##################################### | 100%
importlib_metadata-4 | 12 KB | ##################################### | 100%
scipy-1.7.3 | 15.2 MB | ##################################### | 100%
typing-extensions-4. | 9 KB | ##################################### | 100%
sacremoses-0.0.53 | 427 KB | ##################################### | 100%
urllib3-1.26.11 | 102 KB | ##################################### | 100%
itsdangerous-2.1.2 | 16 KB | ##################################### | 100%
huggingface_hub-0.10 | 114 KB | ##################################### | 100%
colorama-0.4.5 | 18 KB | ##################################### | 100%
numpy-1.21.5 | 11 KB | ##################################### | 100%
blas-2.116 | 13 KB | ##################################### | 100%
diffusers-0.3.0 | 90 KB | ##################################### | 100%
pillow-9.2.0 | 623 KB | ##################################### | 100%
flask-2.2.2 | 74 KB | ##################################### | 100%
tqdm-4.64.1 | 82 KB | ##################################### | 100%
libopenblas-0.3.21 | 3.9 MB | ##################################### | 100%
pycparser-2.21 | 100 KB | ##################################### | 100%
fftw-3.3.10 | 1.2 MB | ##################################### | 100%
click-8.0.4 | 152 KB | ##################################### | 100%
joblib-1.2.0 | 205 KB | ##################################### | 100%
pyyaml-6.0 | 164 KB | ##################################### | 100%
freetype-2.12.1 | 852 KB | ##################################### | 100%
cffi-1.15.1 | 223 KB | ##################################### | 100%
yaml-0.2.5 | 86 KB | ##################################### | 100%
markupsafe-2.1.1 | 22 KB | ##################################### | 100%
liblapack-3.9.0 | 13 KB | ##################################### | 100%
blas-devel-3.9.0 | 13 KB | ##################################### | 100%
wcwidth-0.2.5 | 33 KB | ##################################### | 100%
lcms2-2.12 | 369 KB | ##################################### | 100%
requests-2.28.1 | 53 KB | ##################################### | 100%
libcblas-3.9.0 | 13 KB | ##################################### | 100%
filelock-3.8.0 | 13 KB | ##################################### | 100%
regex-2022.7.9 | 317 KB | ##################################### | 100%
backports-1.0 | 4 KB | ##################################### | 100%
pyopenssl-22.0.0 | 120 KB | ##################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Collecting opencv-python
Using cached opencv_python-4.6.0.66-cp37-abi3-macosx_11_0_arm64.whl (30.0 MB)
Requirement already satisfied: numpy>=1.21.2 in /Users/bamboozle/miniconda/envs/ml/lib/python3.10/site-packages (from opencv-python) (1.21.5)
Installing collected packages: opencv-python
Successfully installed opencv-python-4.6.0.66
Revert PyTorch to good nightly (y/n)?yLooking in links: https://download.pytorch.org/whl/nightly/torch_nightly.html
Collecting torch==1.13.0.dev20220922
Using cached https://download.pytorch.org/whl/nightly/cpu/torch-1.13.0.dev20220922-cp310-none-macosx_11_0_arm64.whl (54.6 MB)
Collecting torchaudio==0.13.0.dev20220922
Downloading https://download.pytorch.org/whl/nightly/cpu/torchaudio-0.13.0.dev20220922-cp310-cp310-macosx_12_0_arm64.whl (3.4 MB)
ββββββββββββββββββββββββββββββββββββββββ 3.4/3.4 MB 5.9 MB/s eta 0:00:00
Collecting torchvision==0.14.0.dev20220923
Downloading https://download.pytorch.org/whl/nightly/cpu/torchvision-0.14.0.dev20220923-cp310-cp310-macosx_11_0_arm64.whl (1.5 MB)
ββββββββββββββββββββββββββββββββββββββββ 1.5/1.5 MB 3.1 MB/s eta 0:00:00
Requirement already satisfied: typing-extensions in /Users/bamboozle/miniconda/envs/ml/lib/python3.10/site-packages (from torch==1.13.0.dev20220922->-r requirements.txt (line 1)) (4.3.0)
Requirement already satisfied: requests in /Users/bamboozle/miniconda/envs/ml/lib/python3.10/site-packages (from torchvision==0.14.0.dev20220923->-r requirements.txt (line 3)) (2.28.1)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /Users/bamboozle/miniconda/envs/ml/lib/python3.10/site-packages (from torchvision==0.14.0.dev20220923->-r requirements.txt (line 3)) (9.2.0)
Requirement already satisfied: numpy in /Users/bamboozle/miniconda/envs/ml/lib/python3.10/site-packages (from torchvision==0.14.0.dev20220923->-r requirements.txt (line 3)) (1.21.5)
Requirement already satisfied: idna<4,>=2.5 in /Users/bamboozle/miniconda/envs/ml/lib/python3.10/site-packages (from requests->torchvision==0.14.0.dev20220923->-r requirements.txt (line 3)) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Users/bamboozle/miniconda/envs/ml/lib/python3.10/site-packages (from requests->torchvision==0.14.0.dev20220923->-r requirements.txt (line 3)) (1.26.11)
Requirement already satisfied: certifi>=2017.4.17 in /Users/bamboozle/miniconda/envs/ml/lib/python3.10/site-packages (from requests->torchvision==0.14.0.dev20220923->-r requirements.txt (line 3)) (2022.9.24)
Requirement already satisfied: charset-normalizer<3,>=2 in /Users/bamboozle/miniconda/envs/ml/lib/python3.10/site-packages (from requests->torchvision==0.14.0.dev20220923->-r requirements.txt (line 3)) (2.1.1)
Installing collected packages: torch, torchvision, torchaudio
Attempting uninstall: torch
Found existing installation: torch 1.13.0.dev20221003
Uninstalling torch-1.13.0.dev20221003:
Successfully uninstalled torch-1.13.0.dev20221003
Successfully installed torch-1.13.0.dev20220922 torchaudio-0.13.0.dev20220922 torchvision-0.14.0.dev20220923
Download the Stable Diffusion model (y/n)?yUpdated Git hooks.
Git LFS initialized.
fatal: destination path 'stable-diffusion-v1-4' already exists and is not an empty directory.
(ml) β sd-gui git:(main) β python app.py
Traceback (most recent call last):
File "/Users/bamboozle/sd-gui/app.py", line 5, in <module>
from tools.config import Config
File "/Users/bamboozle/sd-gui/tools/config.py", line 7, in <module>
from tools.sd_engine import GeneratorType
File "/Users/bamboozle/sd-gui/tools/sd_engine.py", line 1, in <module>
import torch
ModuleNotFoundError: No module named 'torch'
(ml) β sd-gui git:(main) β
Installation ran without errors, but I canβt start gui.py because of a missing module.
Traceback (most recent call last):
File "/Users/mkaiser/sd-gui/gui.py", line 2, in
import torch
ModuleNotFoundError: No module named 'torch'
I already installed pytorch-nightly but it did not help.
It's great that the app can run on Linux. However, the current installation process:
Hello. Finally got it up and running under Windows. I LOVE IT. Wish it could follow Windows' theme though. for a dark interface, easier on the eyes.
I am getting an error that I don't understand:
{'trained_betas'} was not found in config. Values will be initialized to default values.
I guess I need to install some 'trained betas'? Or am I incorrect?
Also, what is the 'Prompts' tab used for? Do I just copy/paste from there or is it click to add the prompt?
Suggestion: Using a more optimized SD repo for better memory management and less resource usage.
This UI is excellent!
Windows 10 Here,
Followed the windows guide but when I run "python app.py" I get the following:
Traceback (most recent call last):
File "E:\Machine Learning\SDGUI-FahimF\sd-gui\app.py", line 5, in <module>
from tools.config import Config
File "E:\Machine Learning\SDGUI-FahimF\sd-gui\tools\config.py", line 7, in <module>
from tools.sd_engine import GeneratorType
File "E:\Machine Learning\SDGUI-FahimF\sd-gui\tools\sd_engine.py", line 2, in <module>
from diffusers import StableDiffusionPipeline, StableDiffusionInpaintPipeline, StableDiffusionImg2ImgPipeline
ModuleNotFoundError: No module named 'diffusers'
(base) β sd-gui git:(main) β conda activate ml
(ml) β sd-gui git:(main) β pip install --upgrade --pre torch==1.13.0.dev20220924 --extra-index-url https://download.pytorch.org/whl/nightly/cpu
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/nightly/cpu
Collecting torch==1.13.0.dev20220924
Using cached https://download.pytorch.org/whl/nightly/cpu/torch-1.13.0.dev20220924-cp39-none-macosx_11_0_arm64.whl (54.7 MB)
Collecting typing-extensions
Using cached typing_extensions-4.3.0-py3-none-any.whl (25 kB)
Installing collected packages: typing-extensions, torch
Successfully installed torch-1.13.0.dev20220924 typing-extensions-4.3.0
(ml) β sd-gui git:(main) β python app.py
Traceback (most recent call last):
File "/Users/bamboozle/sd-gui/app.py", line 5, in <module>
from tools.config import Config
File "/Users/bamboozle/sd-gui/tools/config.py", line 7, in <module>
from tools.sd_engine import GeneratorType
File "/Users/bamboozle/sd-gui/tools/sd_engine.py", line 2, in <module>
from diffusers import StableDiffusionPipeline, StableDiffusionInpaintPipeline, StableDiffusionImg2ImgPipeline
ModuleNotFoundError: No module named 'diffusers'
(ml) β sd-gui git:(main) β
Thanks Fahim for putting all this together.
here is the fix for the seeds to work properly.
Seeds don't seem to work very well on M1s, but you can re-generate an image by changing in txt2img.py
Change
start_code = torch.randn([opt.n_samples, opt.C, opt.H // opt.f, opt.W // opt.f], device=device)
to:
start_code = torch.randn([opt.n_samples, opt.C, opt.H // opt.f, opt.W // opt.f], device="cpu").to(torch.device("mps"))
And then, move
seed_everything(opt.seed) ``below model = load_model_from_config(config, f"{opt.ckpt}")
below
model = load_model_from_config(config, f"{opt.ckpt}")
For img2img.py
, change
z_enc = sampler.stochastic_encode(init_latent, torch.tensor([t_enc]*batch_size).to(device))
to:
z_enc = sampler.stochastic_encode(init_latent, torch.tensor([t_enc] * batch_size).to(device), noise=torch.randn_like(init_latent, device="cpu").to(device) if opt.fixed_code else None,)
Thanks again Fahim !
(ml) β sd-gui git:(main) python app.py
Traceback (most recent call last):
File "/Users/bamboozle/sd-gui/app.py", line 5, in <module>
from tools.config import Config
File "/Users/bamboozle/sd-gui/tools/config.py", line 7, in <module>
from tools.sd_engine import GeneratorType
File "/Users/bamboozle/sd-gui/tools/sd_engine.py", line 1, in <module>
import torch
ModuleNotFoundError: No module named 'torch'
I spent a long time to start this project, and finally managed to start it without any errors. However, all I can see is an icon of a drawing board in the taskbar, which does not respond when clicked, and the server.py has also been started.
my device is MacBook Pro 2015,macos version 12.6.3.
Great project! I look forward to seeing how this grows with Stable Diffusion. I can get the UI to load and it looks amazing, but I was hoping to use a locally stored version of Stable-Diffusion-v1-4, without the need to authenticate into Hugging Face. Is there anything I can do to allow me to point to my local copy to use as an offline source??
Getting error below
(ml) C:\Users\me\StableDiffusion\sd-gui>python app.py
Traceback (most recent call last):
File "C:\Users\me\StableDiffusion\sd-gui\app.py", line 11, in <module>
from ui.generator_tab import GeneratorTab
File "C:\Users\me\StableDiffusion\sd-gui\ui\generator_tab.py", line 11, in <module>
from ui.expander import Expander
File "C:\Users\me\StableDiffusion\sd-gui\ui\expander.py", line 1, in <module>
import darkdetect
ModuleNotFoundError: No module named 'darkdetect'
I had the following issues with the install on my MBP M1. I thought I would share with you along with my workarounds.
conda activate ml
would not work unless conda was explicitly on the path.ImportError: cannot import name 'EntryNotFoundError' from 'huggingface_hub.utils'
. I followed the instructions to pip install diffusers
which resolved the issue. I am not on an Intel Mac thoughGood news. It works now! Thank you for putting this together and sharing it. I hope my install instructions are a help to you.
Generating got too 100% done, but then the app crashed with this error message:
`Traceback (most recent call last):
File "/Users//code/sd-gui/ui/base_tab.py", line 32, in generate
image.save(self.parent.file_name)
File "/opt/homebrew/Caskroom/miniforge/base/envs/ml/lib/python3.9/site-packages/PIL/Image.py", line 2317, in save
fp = builtins.open(filename, "w+b")
FileNotFoundError: [Errno 2] No such file or directory: 'output/sample_2022_10_03_12_41_34.png'
Abort trap: 6
(ml) glgpcadmins-MacBook-Pro:sd-gui $ /opt/homebrew/Caskroom/miniforge/base/envs/ml/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '`
Hello Fahim. Finally I managed to install everything without errors but when the image is generated it gives me an error and the GUI closes. If you have any ideas I appreciate your help, I'm so close. This is the log:
(ml) dnlbrv@dMBP16 sd-gui % python app.py
Output folder exists
Type: GeneratorType.txt2img
Scheduler: Default
Prompt: car in the sky, Canon50
Width: 512
Height: 512
Strength: 0.6
Num Stpes: 99
Guidance: 7.5
Copies: 1
Seed: -1
Seed for new image: 14014266794435115304
100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 100/100 [01:21<00:00, 1.22it/s]
Traceback (most recent call last):
File "/Users/dnlbrv/sd-gui/ui/base_tab.py", line 21, in generate
image, self.parent.is_nsfw, self.parent.seed = self.parent.sd.generate(cfg.prompt.prompt, cfg.width, cfg.height, cfg.seed,
File "/Users/dnlbrv/sd-gui/tools/sd_engine.py", line 83, in generate
img = result["sample"][0]
File "/Users/dnlbrv/miniconda3/envs/ml/lib/python3.9/site-packages/diffusers/utils/outputs.py", line 88, in getitem
return inner_dict[k]
KeyError: 'sample'
zsh: abort python app.py
(ml) dnlbrv@dMBP16 sd-gui % /Users/dnlbrv/miniconda3/envs/ml/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
Thanxs in advance.
Last login: Mon Oct 3 18:43:52 on ttys000
(base) β ~ conda activate ml
(ml) β ~ cd sd-gui
(ml) β sd-gui git:(main) β python app.py
Init mode: edge_pad
Traceback (most recent call last):
File "/Users/bamboozle/sd-gui/ui/editor_tab.py", line 366, in do_outpaint
iarr, marr = self.edge_pad(iarr, marr)
File "/Users/bamboozle/sd-gui/ui/editor_tab.py", line 544, in edge_pad
res = scipy.signal.convolve2d(
AttributeError: module 'scipy' has no attribute 'signal'
Hello, in advance congrats for the hard work.
I install everything on my M1 max, everything is fine and the GUI opens, but when I hit the Build button the window closes and gives me this error:
(ml) dnlbrv@dMBP16 sd-gui % python app.py
Output folder exists
Type: GeneratorType.txt2img
Scheduler: Default
Prompt: a car in the sky
Width: 512
Height: 64
Strength: 0.6
Num Stpes: 99
Guidance: 8.0
Copies: 1
Seed: -1
Traceback (most recent call last):
File "/Users/dnlbrv/Stable Difusion GUI/sd-gui/ui/generator_tab.py", line 393, in do_generate
self.sd = self.get_server(self.server_type.value())
File "/Users/dnlbrv/Stable Difusion GUI/sd-gui/ui/base_tab.py", line 70, in get_server
return SDEngine(self.cfg.type, self.cfg.scheduler, self.cfg.num_inference_steps)
File "/Users/dnlbrv/Stable Difusion GUI/sd-gui/tools/sd_engine.py", line 48, in init
self.pipe = StableDiffusionPipeline.from_pretrained("stable-diffusion-v1-4").to(self.device)
File "/Users/dnlbrv/miniconda3/envs/ml/lib/python3.9/site-packages/diffusers/pipeline_utils.py", line 517, in from_pretrained
loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)
File "/Users/dnlbrv/miniconda3/envs/ml/lib/python3.9/site-packages/transformers/modeling_utils.py", line 1843, in from_pretrained
model = cls(config, *model_args, **model_kwargs)
TypeError: init() got an unexpected keyword argument 'device_map'
zsh: abort python app.py
Any idea?
Thanxs a lot
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.