Paperspaceで Stable Diffusion WebUI Forge が動かなくなった時のメモ(ChatGPTでトラブルシュート)
本日、Paperspaceで Stable Diffusion WebUI Forgeを起動しようとすると、エラーが出て動かなくなりました。エラー内容をChatGPTに送り、トラブルシュートしていただきました。
実行環境
こちらに記載した環境です。
ChatGPTへ問い合わせた内容と回答
実行したスクリプトと、結果を、ChatGPT4に問い合わせました。
Paperspace で 以下を実行しました。
#(3) WebUI起動
!apt update
!apt -y install python3.10
!apt -y install libpython3.10-dev
!apt -y install build-essential
!apt -y install ffmpeg
!curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
!python3.10 -m pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 -U
!python3.10 -m pip install xformers==0.0.20 triton==2.0.0 -U
!python3.10 -m pip install httpx==0.24.1
#!python3.10 -m pip install insightface -U
!python3.10 -m pip install matplotlib -U
!python3.10 -m pip install ipython -U
from IPython import get_ipython
get_ipython().run_line_magic('matplotlib', 'inline')
%cd /notebooks/stable-diffusion-webui-forge
!python3.10 launch.py --xformers --enable-insecure-extension-access --share --gradio-queue --reinstall-xformers
すると、以下のエラーで動きません。トラブルシュート願います。
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InRelease
Hit:5 https://deb.nodesource.com/node_16.x focal InRelease
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:7 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
176 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3.10 is already the newest version (3.10.14-1+focal1).
0 upgraded, 0 newly installed, 0 to remove and 176 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
libpython3.10-dev is already the newest version (3.10.14-1+focal1).
0 upgraded, 0 newly installed, 0 to remove and 176 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.8ubuntu1.1).
0 upgraded, 0 newly installed, 0 to remove and 176 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
ffmpeg is already the newest version (7:4.2.7-0ubuntu0.1).
0 upgraded, 0 newly installed, 0 to remove and 176 not upgraded.
Collecting pip
Using cached pip-24.0-py3-none-any.whl.metadata (3.6 kB)
Using cached pip-24.0-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 24.0
Uninstalling pip-24.0:
Successfully uninstalled pip-24.0
Successfully installed pip-24.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu118
Requirement already satisfied: torch==2.0.1+cu118 in /usr/local/lib/python3.10/dist-packages (2.0.1+cu118)
Requirement already satisfied: torchvision==0.15.2+cu118 in /usr/local/lib/python3.10/dist-packages (0.15.2+cu118)
Requirement already satisfied: torchaudio==2.0.2+cu118 in /usr/local/lib/python3.10/dist-packages (2.0.2+cu118)
Requirement already satisfied: torchtext==0.15.2 in /usr/local/lib/python3.10/dist-packages (0.15.2+cpu)
Requirement already satisfied: torchdata==0.6.1 in /usr/local/lib/python3.10/dist-packages (0.6.1)
Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1+cu118) (3.14.0)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1+cu118) (4.12.0)
Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1+cu118) (1.12)
Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1+cu118) (3.3)
Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1+cu118) (3.1.4)
Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1+cu118) (2.0.0)
Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from torchvision==0.15.2+cu118) (1.26.2)
Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from torchvision==0.15.2+cu118) (2.32.2)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /usr/local/lib/python3.10/dist-packages (from torchvision==0.15.2+cu118) (9.5.0)
Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from torchtext==0.15.2) (4.66.4)
Requirement already satisfied: urllib3>=1.25 in /usr/local/lib/python3.10/dist-packages (from torchdata==0.6.1) (2.2.1)
Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch==2.0.1+cu118) (3.29.3)
Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch==2.0.1+cu118) (18.1.6)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch==2.0.1+cu118) (2.1.5)
Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->torchvision==0.15.2+cu118) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests->torchvision==0.15.2+cu118) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests->torchvision==0.15.2+cu118) (2019.11.28)
Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch==2.0.1+cu118) (1.3.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Requirement already satisfied: xformers==0.0.20 in /usr/local/lib/python3.10/dist-packages (0.0.20)
Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (2.0.0)
Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from xformers==0.0.20) (1.26.2)
Requirement already satisfied: pyre-extensions==0.0.29 in /usr/local/lib/python3.10/dist-packages (from xformers==0.0.20) (0.0.29)
Requirement already satisfied: torch==2.0.1 in /usr/local/lib/python3.10/dist-packages (from xformers==0.0.20) (2.0.1+cu118)
Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0) (3.29.3)
Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0) (3.14.0)
Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0) (18.1.6)
Requirement already satisfied: typing-inspect in /usr/local/lib/python3.10/dist-packages (from pyre-extensions==0.0.29->xformers==0.0.20) (0.9.0)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from pyre-extensions==0.0.29->xformers==0.0.20) (4.12.0)
Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1->xformers==0.0.20) (1.12)
Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1->xformers==0.0.20) (3.3)
Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1->xformers==0.0.20) (3.1.4)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch==2.0.1->xformers==0.0.20) (2.1.5)
Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch==2.0.1->xformers==0.0.20) (1.3.0)
Requirement already satisfied: mypy-extensions>=0.3.0 in /usr/local/lib/python3.10/dist-packages (from typing-inspect->pyre-extensions==0.0.29->xformers==0.0.20) (1.0.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Requirement already satisfied: httpx==0.24.1 in /usr/local/lib/python3.10/dist-packages (0.24.1)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from httpx==0.24.1) (2019.11.28)
Requirement already satisfied: httpcore<0.18.0,>=0.15.0 in /usr/local/lib/python3.10/dist-packages (from httpx==0.24.1) (0.15.0)
Requirement already satisfied: idna in /usr/lib/python3/dist-packages (from httpx==0.24.1) (2.8)
Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx==0.24.1) (1.3.1)
Requirement already satisfied: h11<0.13,>=0.11 in /usr/local/lib/python3.10/dist-packages (from httpcore<0.18.0,>=0.15.0->httpx==0.24.1) (0.12.0)
Requirement already satisfied: anyio==3.* in /usr/local/lib/python3.10/dist-packages (from httpcore<0.18.0,>=0.15.0->httpx==0.24.1) (3.7.1)
Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio==3.*->httpcore<0.18.0,>=0.15.0->httpx==0.24.1) (1.2.1)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Requirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (3.9.0)
Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (1.2.1)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (4.52.1)
Requirement already satisfied: kiwisolver>=1.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (1.4.5)
Requirement already satisfied: numpy>=1.23 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (1.26.2)
Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (24.0)
Requirement already satisfied: pillow>=8 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (9.5.0)
Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (3.1.2)
Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (2.9.0.post0)
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib) (1.14.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Requirement already satisfied: ipython in /usr/local/lib/python3.10/dist-packages (8.24.0)
Requirement already satisfied: decorator in /usr/local/lib/python3.10/dist-packages (from ipython) (5.1.1)
Requirement already satisfied: jedi>=0.16 in /usr/local/lib/python3.10/dist-packages (from ipython) (0.19.1)
Requirement already satisfied: matplotlib-inline in /usr/local/lib/python3.10/dist-packages (from ipython) (0.1.7)
Requirement already satisfied: prompt-toolkit<3.1.0,>=3.0.41 in /usr/local/lib/python3.10/dist-packages (from ipython) (3.0.43)
Requirement already satisfied: pygments>=2.4.0 in /usr/local/lib/python3.10/dist-packages (from ipython) (2.18.0)
Requirement already satisfied: stack-data in /usr/local/lib/python3.10/dist-packages (from ipython) (0.6.3)
Requirement already satisfied: traitlets>=5.13.0 in /usr/local/lib/python3.10/dist-packages (from ipython) (5.14.3)
Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from ipython) (1.2.1)
Requirement already satisfied: typing-extensions>=4.6 in /usr/local/lib/python3.10/dist-packages (from ipython) (4.12.0)
Requirement already satisfied: pexpect>4.3 in /usr/local/lib/python3.10/dist-packages (from ipython) (4.9.0)
Requirement already satisfied: parso<0.9.0,>=0.8.3 in /usr/local/lib/python3.10/dist-packages (from jedi>=0.16->ipython) (0.8.4)
Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.10/dist-packages (from pexpect>4.3->ipython) (0.7.0)
Requirement already satisfied: wcwidth in /usr/local/lib/python3.10/dist-packages (from prompt-toolkit<3.1.0,>=3.0.41->ipython) (0.2.13)
Requirement already satisfied: executing>=1.2.0 in /usr/local/lib/python3.10/dist-packages (from stack-data->ipython) (2.0.1)
Requirement already satisfied: asttokens>=2.1.0 in /usr/local/lib/python3.10/dist-packages (from stack-data->ipython) (2.4.1)
Requirement already satisfied: pure-eval in /usr/local/lib/python3.10/dist-packages (from stack-data->ipython) (0.2.2)
Requirement already satisfied: six>=1.12.0 in /usr/lib/python3/dist-packages (from asttokens>=2.1.0->stack-data->ipython) (1.14.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
/notebooks/stable-diffusion-webui-forge
Python 3.10.14 (main, Apr 6 2024, 18:45:05) [GCC 9.4.0]
Version: f0.0.12-latest-155-gd81e353d
Commit hash: d81e353d8928147bbd973068d0efbb2802affe0f
Installing xformers
Collecting protobuf<=3.9999,>=3.20
Using cached protobuf-3.20.3-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.metadata (679 bytes)
Using cached protobuf-3.20.3-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.1 MB)
Installing collected packages: protobuf
Attempting uninstall: protobuf
Found existing installation: protobuf 4.25.3
Uninstalling protobuf-4.25.3:
Successfully uninstalled protobuf-4.25.3
Successfully installed protobuf-3.20.3
Legacy Preprocessor init warning: Unable to install insightface automatically. Please try run `pip install insightface` manually.
Launching Web UI with arguments: --xformers --enable-insecure-extension-access --share --gradio-queue --reinstall-xformers
Total VRAM 16273 MB, total RAM 30068 MB
WARNING:xformers:WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.1.2+cu121 with CUDA 1201 (you have 2.0.1+cu118)
Python 3.10.13 (you have 3.10.14)
Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
Memory-efficient attention, SwiGLU, sparse and more won't be available.
Set XFORMERS_MORE_DETAILS=1 for more details
xformers version: 0.0.23.post1
Set vram state to: NORMAL_VRAM
Device: cuda:0 Quadro P5000 : native
VAE dtype: torch.float32
/usr/local/lib/python3.10/dist-packages/pytorch_lightning/utilities/distributed.py:258: LightningDeprecationWarning: `pytorch_lightning.utilities.distributed.rank_zero_only` has been deprecated in v1.8.1 and will be removed in v2.0.0. You can import it from `pytorch_lightning.utilities` instead.
rank_zero_deprecation(
Using pytorch cross attention
Traceback (most recent call last):
File "/notebooks/stable-diffusion-webui-forge/launch.py", line 51, in <module>
main()
File "/notebooks/stable-diffusion-webui-forge/launch.py", line 47, in main
start()
File "/notebooks/stable-diffusion-webui-forge/modules/launch_utils.py", line 541, in start
import webui
File "/notebooks/stable-diffusion-webui-forge/webui.py", line 19, in <module>
initialize.imports()
File "/notebooks/stable-diffusion-webui-forge/modules/initialize.py", line 53, in imports
from modules import processing, gradio_extensons, ui # noqa: F401
File "/notebooks/stable-diffusion-webui-forge/modules/processing.py", line 18, in <module>
import modules.sd_hijack
File "/notebooks/stable-diffusion-webui-forge/modules/sd_hijack.py", line 5, in <module>
from modules import devices, sd_hijack_optimizations, shared, script_callbacks, errors, sd_unet, patches
File "/notebooks/stable-diffusion-webui-forge/modules/sd_hijack_optimizations.py", line 13, in <module>
from modules.hypernetworks import hypernetwork
File "/notebooks/stable-diffusion-webui-forge/modules/hypernetworks/hypernetwork.py", line 13, in <module>
from modules import devices, sd_models, shared, sd_samplers, hashes, sd_hijack_checkpoint, errors
File "/notebooks/stable-diffusion-webui-forge/modules/sd_samplers.py", line 1, in <module>
from modules import sd_samplers_kdiffusion, sd_samplers_timesteps, sd_samplers_lcm, shared
File "/notebooks/stable-diffusion-webui-forge/modules/sd_samplers_kdiffusion.py", line 3, in <module>
import k_diffusion.sampling
File "/notebooks/stable-diffusion-webui-forge/repositories/k-diffusion/k_diffusion/__init__.py", line 1, in <module>
from . import augmentation, config, evaluation, external, gns, layers, models, sampling, utils
File "/notebooks/stable-diffusion-webui-forge/repositories/k-diffusion/k_diffusion/evaluation.py", line 6, in <module>
import clip
File "/usr/local/lib/python3.10/dist-packages/clip/__init__.py", line 1, in <module>
from .clip import *
File "/usr/local/lib/python3.10/dist-packages/clip/clip.py", line 6, in <module>
from pkg_resources import packaging
ImportError: cannot import name 'packaging' from 'pkg_resources' (/usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py)
回答は以下でした。
エラーメッセージから、問題が発生しているのは `packaging` モジュールを `pkg_resources` からインポートできない点にあるようです。これは、`setuptools` パッケージの一部である `pkg_resources` が適切にインストールまたは更新されていない可能性があります。
以下の手順に従って問題を解決することができます:
1. **`setuptools` の更新**
Python 環境で `setuptools` を更新して、`pkg_resources` が適切に機能するようにします。ターミナルで以下のコマンドを実行してください:
```
!python3.10 -m pip install --upgrade setuptools
```
2. **依存関係の確認**
`setuptools` の更新後、`clip` パッケージが `packaging` モジュールに依存しているか確認してください。依存関係が存在しない場合、`clip` パッケージが最新であるか、または正しいバージョンがインストールされているか確認してください。必要に応じて `clip` パッケージを再インストールすることが役立つかもしれません:
```
!python3.10 -m pip uninstall clip
!python3.10 -m pip install clip
```
これらのステップを実行した後、再度スクリプトを実行して問題が解決しているか確認してください。それでも問題が解決しない場合、他の依存関係の不足や競合が原因である可能性がありますので、さらに調査が必要です。
対処結果
指示されたコードをそのまま埋め込んで実行したところ、
!python3.10 -m pip uninstall clip
のところで、確認(Y/n)の入力を求められて進まなくなったので、
!python3.10 -m pip uninstall clip -y に替えました。
#(3) WebUI起動
!apt update
!apt -y install python3.10
!apt -y install libpython3.10-dev
!apt -y install build-essential
!apt -y install ffmpeg
!curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
!python3.10 -m pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 -U
!python3.10 -m pip install xformers==0.0.20 triton==2.0.0 -U
!python3.10 -m pip install httpx==0.24.1
#!python3.10 -m pip install insightface -U
!python3.10 -m pip install matplotlib -U
!python3.10 -m pip install ipython -U
!python3.10 -m pip install --upgrade setuptools
!python3.10 -m pip uninstall clip -y
!python3.10 -m pip install clip
from IPython import get_ipython
get_ipython().run_line_magic('matplotlib', 'inline')
%cd /notebooks/stable-diffusion-webui-forge
!python3.10 launch.py --xformers --enable-insecure-extension-access --share --gradio-queue --reinstall-xformers
その結果が以下です。動きました。
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:5 https://deb.nodesource.com/node_16.x focal InRelease
Hit:6 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InRelease
Hit:7 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
176 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3.10 is already the newest version (3.10.14-1+focal1).
0 upgraded, 0 newly installed, 0 to remove and 176 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
libpython3.10-dev is already the newest version (3.10.14-1+focal1).
0 upgraded, 0 newly installed, 0 to remove and 176 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.8ubuntu1.1).
0 upgraded, 0 newly installed, 0 to remove and 176 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
ffmpeg is already the newest version (7:4.2.7-0ubuntu0.1).
0 upgraded, 0 newly installed, 0 to remove and 176 not upgraded.
Collecting pip
Using cached pip-24.0-py3-none-any.whl.metadata (3.6 kB)
Using cached pip-24.0-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 24.0
Uninstalling pip-24.0:
Successfully uninstalled pip-24.0
Successfully installed pip-24.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu118
Requirement already satisfied: torch==2.0.1+cu118 in /usr/local/lib/python3.10/dist-packages (2.0.1+cu118)
Requirement already satisfied: torchvision==0.15.2+cu118 in /usr/local/lib/python3.10/dist-packages (0.15.2+cu118)
Requirement already satisfied: torchaudio==2.0.2+cu118 in /usr/local/lib/python3.10/dist-packages (2.0.2+cu118)
Requirement already satisfied: torchtext==0.15.2 in /usr/local/lib/python3.10/dist-packages (0.15.2+cpu)
Requirement already satisfied: torchdata==0.6.1 in /usr/local/lib/python3.10/dist-packages (0.6.1)
Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1+cu118) (3.14.0)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1+cu118) (4.12.0)
Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1+cu118) (1.12)
Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1+cu118) (3.3)
Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1+cu118) (3.1.4)
Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1+cu118) (2.0.0)
Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from torchvision==0.15.2+cu118) (1.26.2)
Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from torchvision==0.15.2+cu118) (2.32.2)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /usr/local/lib/python3.10/dist-packages (from torchvision==0.15.2+cu118) (9.5.0)
Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from torchtext==0.15.2) (4.66.4)
Requirement already satisfied: urllib3>=1.25 in /usr/local/lib/python3.10/dist-packages (from torchdata==0.6.1) (2.2.1)
Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch==2.0.1+cu118) (3.29.3)
Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch==2.0.1+cu118) (18.1.6)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch==2.0.1+cu118) (2.1.5)
Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->torchvision==0.15.2+cu118) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests->torchvision==0.15.2+cu118) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests->torchvision==0.15.2+cu118) (2019.11.28)
Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch==2.0.1+cu118) (1.3.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Requirement already satisfied: xformers==0.0.20 in /usr/local/lib/python3.10/dist-packages (0.0.20)
Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (2.0.0)
Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from xformers==0.0.20) (1.26.2)
Requirement already satisfied: pyre-extensions==0.0.29 in /usr/local/lib/python3.10/dist-packages (from xformers==0.0.20) (0.0.29)
Requirement already satisfied: torch==2.0.1 in /usr/local/lib/python3.10/dist-packages (from xformers==0.0.20) (2.0.1+cu118)
Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0) (3.29.3)
Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0) (3.14.0)
Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0) (18.1.6)
Requirement already satisfied: typing-inspect in /usr/local/lib/python3.10/dist-packages (from pyre-extensions==0.0.29->xformers==0.0.20) (0.9.0)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from pyre-extensions==0.0.29->xformers==0.0.20) (4.12.0)
Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1->xformers==0.0.20) (1.12)
Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1->xformers==0.0.20) (3.3)
Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1->xformers==0.0.20) (3.1.4)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch==2.0.1->xformers==0.0.20) (2.1.5)
Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch==2.0.1->xformers==0.0.20) (1.3.0)
Requirement already satisfied: mypy-extensions>=0.3.0 in /usr/local/lib/python3.10/dist-packages (from typing-inspect->pyre-extensions==0.0.29->xformers==0.0.20) (1.0.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Requirement already satisfied: httpx==0.24.1 in /usr/local/lib/python3.10/dist-packages (0.24.1)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from httpx==0.24.1) (2019.11.28)
Requirement already satisfied: httpcore<0.18.0,>=0.15.0 in /usr/local/lib/python3.10/dist-packages (from httpx==0.24.1) (0.15.0)
Requirement already satisfied: idna in /usr/lib/python3/dist-packages (from httpx==0.24.1) (2.8)
Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx==0.24.1) (1.3.1)
Requirement already satisfied: h11<0.13,>=0.11 in /usr/local/lib/python3.10/dist-packages (from httpcore<0.18.0,>=0.15.0->httpx==0.24.1) (0.12.0)
Requirement already satisfied: anyio==3.* in /usr/local/lib/python3.10/dist-packages (from httpcore<0.18.0,>=0.15.0->httpx==0.24.1) (3.7.1)
Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio==3.*->httpcore<0.18.0,>=0.15.0->httpx==0.24.1) (1.2.1)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Requirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (3.9.0)
Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (1.2.1)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (4.52.1)
Requirement already satisfied: kiwisolver>=1.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (1.4.5)
Requirement already satisfied: numpy>=1.23 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (1.26.2)
Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (24.0)
Requirement already satisfied: pillow>=8 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (9.5.0)
Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (3.1.2)
Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (2.9.0.post0)
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib) (1.14.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Requirement already satisfied: ipython in /usr/local/lib/python3.10/dist-packages (8.24.0)
Requirement already satisfied: decorator in /usr/local/lib/python3.10/dist-packages (from ipython) (5.1.1)
Requirement already satisfied: jedi>=0.16 in /usr/local/lib/python3.10/dist-packages (from ipython) (0.19.1)
Requirement already satisfied: matplotlib-inline in /usr/local/lib/python3.10/dist-packages (from ipython) (0.1.7)
Requirement already satisfied: prompt-toolkit<3.1.0,>=3.0.41 in /usr/local/lib/python3.10/dist-packages (from ipython) (3.0.43)
Requirement already satisfied: pygments>=2.4.0 in /usr/local/lib/python3.10/dist-packages (from ipython) (2.18.0)
Requirement already satisfied: stack-data in /usr/local/lib/python3.10/dist-packages (from ipython) (0.6.3)
Requirement already satisfied: traitlets>=5.13.0 in /usr/local/lib/python3.10/dist-packages (from ipython) (5.14.3)
Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from ipython) (1.2.1)
Requirement already satisfied: typing-extensions>=4.6 in /usr/local/lib/python3.10/dist-packages (from ipython) (4.12.0)
Requirement already satisfied: pexpect>4.3 in /usr/local/lib/python3.10/dist-packages (from ipython) (4.9.0)
Requirement already satisfied: parso<0.9.0,>=0.8.3 in /usr/local/lib/python3.10/dist-packages (from jedi>=0.16->ipython) (0.8.4)
Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.10/dist-packages (from pexpect>4.3->ipython) (0.7.0)
Requirement already satisfied: wcwidth in /usr/local/lib/python3.10/dist-packages (from prompt-toolkit<3.1.0,>=3.0.41->ipython) (0.2.13)
Requirement already satisfied: executing>=1.2.0 in /usr/local/lib/python3.10/dist-packages (from stack-data->ipython) (2.0.1)
Requirement already satisfied: asttokens>=2.1.0 in /usr/local/lib/python3.10/dist-packages (from stack-data->ipython) (2.4.1)
Requirement already satisfied: pure-eval in /usr/local/lib/python3.10/dist-packages (from stack-data->ipython) (0.2.2)
Requirement already satisfied: six>=1.12.0 in /usr/lib/python3/dist-packages (from asttokens>=2.1.0->stack-data->ipython) (1.14.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (70.0.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Found existing installation: clip 1.0
Uninstalling clip-1.0:
Successfully uninstalled clip-1.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Collecting clip
Downloading clip-0.2.0.tar.gz (5.5 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: clip
Building wheel for clip (setup.py) ... done
Created wheel for clip: filename=clip-0.2.0-py3-none-any.whl size=6989 sha256=4eea70cba506e77be53de2b70409dfc9891d8ca7cfe8b5ae268daee1b04d796b
Stored in directory: /root/.cache/pip/wheels/7f/5c/e6/2c0fdb453a3569188864b17e9676bea8b3b7e160c037117869
Successfully built clip
Installing collected packages: clip
Successfully installed clip-0.2.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
/notebooks/stable-diffusion-webui-forge
Python 3.10.14 (main, Apr 6 2024, 18:45:05) [GCC 9.4.0]
Version: f0.0.12-latest-155-gd81e353d
Commit hash: d81e353d8928147bbd973068d0efbb2802affe0f
Installing xformers
Legacy Preprocessor init warning: Unable to install insightface automatically. Please try run `pip install insightface` manually.
Launching Web UI with arguments: --xformers --enable-insecure-extension-access --share --gradio-queue --reinstall-xformers
Total VRAM 16273 MB, total RAM 30068 MB
WARNING:xformers:WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.1.2+cu121 with CUDA 1201 (you have 2.0.1+cu118)
Python 3.10.13 (you have 3.10.14)
Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
Memory-efficient attention, SwiGLU, sparse and more won't be available.
Set XFORMERS_MORE_DETAILS=1 for more details
xformers version: 0.0.23.post1
Set vram state to: NORMAL_VRAM
Device: cuda:0 Quadro P5000 : native
VAE dtype: torch.float32
/usr/local/lib/python3.10/dist-packages/pytorch_lightning/utilities/distributed.py:258: LightningDeprecationWarning: `pytorch_lightning.utilities.distributed.rank_zero_only` has been deprecated in v1.8.1 and will be removed in v2.0.0. You can import it from `pytorch_lightning.utilities` instead.
rank_zero_deprecation(
Using pytorch cross attention
==============================================================================
You are running torch 2.0.1+cu118.
The program is tested to work with torch 2.1.2.
To reinstall the desired version, run with commandline flag --reinstall-torch.
Beware that this will cause a lot of large files to be downloaded, as well as
there are reports of issues with training tab on the latest version.
Use --skip-version-check commandline argument to disable this check.
==============================================================================
ControlNet preprocessor location: /notebooks/stable-diffusion-webui-forge/models/ControlNetPreprocessor
face_yolov8n.pt: 100%|██████████████████████| 6.23M/6.23M [00:00<00:00, 199MB/s]
face_yolov8s.pt: 100%|██████████████████████| 22.5M/22.5M [00:00<00:00, 264MB/s]
hand_yolov8n.pt: 100%|██████████████████████| 6.24M/6.24M [00:00<00:00, 198MB/s]
person_yolov8n-seg.pt: 100%|████████████████| 6.78M/6.78M [00:00<00:00, 275MB/s]
person_yolov8s-seg.pt: 100%|████████████████| 23.9M/23.9M [00:00<00:00, 298MB/s]
[-] ADetailer initialized. version: 24.1.2, num models: 9
Loading weights [c2f257d26b] from /notebooks/stable-diffusion-webui-forge/models/Stable-diffusion/_BRD_V03j.safetensors
/notebooks/stable-diffusion-webui-forge/extensions/sdweb-easy-prompt-selector/scripts/easy_prompt_selector.py:97: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
reload_button.style(size='sm')
2024-05-26 10:20:21,742 - ControlNet - INFO - ControlNet UI callback registered.
Running on local URL: http://127.0.0.1:7860
model_type EPS
UNet ADM Dimension 0
Running on public URL: https://00aa88b09927430774.gradio.live
This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)
Startup time: 31.6s (prepare environment: 9.1s, import torch: 7.0s, other imports: 1.2s, list SD models: 0.2s, load scripts: 5.6s, create ui: 2.8s, gradio launch: 5.3s).
Using pytorch attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using pytorch attention in VAE
extra {'cond_stage_model.clip_l.logit_scale', 'cond_stage_model.clip_l.text_projection'}
left over keys: dict_keys(['alphas_cumprod', 'alphas_cumprod_prev', 'betas', 'log_one_minus_alphas_cumprod', 'model_ema.decay', 'model_ema.num_updates', 'posterior_log_variance_clipped', 'posterior_mean_coef1', 'posterior_mean_coef2', 'posterior_variance', 'sqrt_alphas_cumprod', 'sqrt_one_minus_alphas_cumprod', 'sqrt_recip_alphas_cumprod', 'sqrt_recipm1_alphas_cumprod'])
Loading VAE weights specified in settings: /notebooks/stable-diffusion-webui-forge/models/VAE/vae-ft-mse-840000-ema-pruned.safetensors
To load target model SD1ClipModel
Begin to load 1 model
Model loaded in 17.0s (load weights from disk: 7.7s, forge load real models: 5.3s, load VAE: 2.5s, calculate empty prompt: 1.5s).
https://00aa88b09927430774.gradio.live/
にアクセスして、WebUI画面が表示されました。
画像生成もできました。
よく見るとWarningもいろいろでているので、調べて直した方が良いのでしょうが、それは後程、、
この記事が気に入ったらサポートをしてみませんか?