質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Q&A

1回答

4158閲覧

stable-diffusion-webuiからstable diffusionをエラーなくダウンロードをしたいです。

papara

総合スコア0

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

0グッド

0クリップ

投稿2023/05/07 15:58

編集2023/05/07 16:13

実現したいこと

stable-diffusion-webuiからダウンロードをしたいです。

発生している問題・エラーメッセージ

Using cached https://download.pytorch.org/whl/sympy-1.11.1-py3-none-any.whl (6.5 MB) Collecting networkx Using cached networkx-3.1-py3-none-any.whl (2.1 MB) Collecting pillow!=8.3.*,>=5.3.0 Using cached Pillow-9.5.0-cp310-cp310-win_amd64.whl (2.5 MB) Collecting requests Using cached requests-2.30.0-py3-none-any.whl (62 kB) Collecting numpy Using cached numpy-1.24.3-cp310-cp310-win_amd64.whl (14.8 MB) Collecting MarkupSafe>=2.0 Using cached https://download.pytorch.org/whl/MarkupSafe-2.1.2-cp310-cp310-win_amd64.whl (16 kB) Collecting urllib3<3,>=1.21.1 Using cached urllib3-2.0.2-py3-none-any.whl (123 kB) Collecting certifi>=2017.4.17 Using cached certifi-2023.5.7-py3-none-any.whl (156 kB) Collecting charset-normalizer<4,>=2 Using cached charset_normalizer-3.1.0-cp310-cp310-win_amd64.whl (97 kB) Collecting idna<4,>=2.5 Using cached https://download.pytorch.org/whl/idna-3.4-py3-none-any.whl (61 kB) Collecting mpmath>=0.19 Using cached mpmath-1.3.0-py3-none-any.whl (536 kB) Installing collected packages: mpmath, urllib3, typing-extensions, sympy, pillow, numpy, networkx, MarkupSafe, idna, filelock, charset-normalizer, certifi, requests, jinja2, torch, torchvision Successfully installed MarkupSafe-2.1.2 certifi-2023.5.7 charset-normalizer-3.1.0 filelock-3.12.0 idna-3.4 jinja2-3.1.2 mpmath-1.3.0 networkx-3.1 numpy-1.24.3 pillow-9.5.0 requests-2.30.0 sympy-1.11.1 torch-2.0.0+cu118 torchvision-0.15.1+cu118 typing-extensions-4.5.0 urllib3-2.0.2 [notice] A new release of pip available: 22.2.1 -> 23.1.2 [notice] To update, run: C:\Users\Padparadscha\sssss\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip Traceback (most recent call last): File "C:\Users\Padparadscha\sssss\stable-diffusion-webui\launch.py", line 352, in <module> prepare_environment() File "C:\Users\Padparadscha\sssss\stable-diffusion-webui\launch.py", line 257, in prepare_environment run_python("import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'") File "C:\Users\Padparadscha\sssss\stable-diffusion-webui\launch.py", line 120, in run_python return run(f'"{python}" -c "{code}"', desc, errdesc) File "C:\Users\Padparadscha\sssss\stable-diffusion-webui\launch.py", line 96, in run raise RuntimeError(message) RuntimeError: Error running command. Command: "C:\Users\Padparadscha\sssss\stable-diffusion-webui\venv\Scripts\python.exe" -c "import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'" Error code: 1 stdout: <empty> stderr: C:\Users\Padparadscha\sssss\stable-diffusion-webui\venv\lib\site-packages\torch\cuda\__init__.py:107: UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 9010). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at ..\c10\cuda\CUDAFunctions.cpp:109.) return torch._C._cuda_getDeviceCount() > 0 Traceback (most recent call last): File "<string>", line 1, in <module> AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check 続行するには何かキーを押してください . . .

試したこと

NVIDIA ドライバーGeForcee GTX 480 バージョン391.35のダウンロード
python3.10.6の再ダウンロード
Gitの再ダウンロード
再ダウンロード前のpython、Gitの削除
プロキシをオフにした。

補足情報(FW/ツールのバージョンなど)

Windowsは10です。
pcのスペックも古いものではありますがゲーミングpcで足りていると思います。
また二度目からは下記のコードになります。

venv "C:\Users\Padparadscha\sssss\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)]
Commit hash: 5ab7f213bec2f816f9c5644becb32eb72c8ffb89
Traceback (most recent call last):
File "C:\Users\Padparadscha\sssss\stable-diffusion-webui\launch.py", line 352, in <module>
prepare_environment()
File "C:\Users\Padparadscha\sssss\stable-diffusion-webui\launch.py", line 257, in prepare_environment
run_python("import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'")
File "C:\Users\Padparadscha\sssss\stable-diffusion-webui\launch.py", line 120, in run_python
return run(f'"{python}" -c "{code}"', desc, errdesc)
File "C:\Users\Padparadscha\sssss\stable-diffusion-webui\launch.py", line 96, in run
raise RuntimeError(message)
RuntimeError: Error running command.
Command: "C:\Users\Padparadscha\sssss\stable-diffusion-webui\venv\Scripts\python.exe" -c "import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'"
Error code: 1
stdout: <empty>
stderr: C:\Users\Padparadscha\sssss\stable-diffusion-webui\venv\lib\site-packages\torch\cuda_init_.py:107: UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 9010). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at ..\c10\cuda\CUDAFunctions.cpp:109.)
return torch._C._cuda_getDeviceCount() > 0
Traceback (most recent call last):
File "<string>", line 1, in <module>
AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check

続行するには何かキーを押してください . . .

よろしくお願いいたします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

meg_

2023/05/07 16:28

下記コードを実行した結果はどうなりますか? import torch torch.cuda.is_available()
papara

2023/05/07 17:02

Padparadscha@DESKTOP-FVS083S MINGW64 ~/sssss $ ^[[200~import torch bash: $'\E[200~import': command not found Padparadscha@DESKTOP-FVS083S MINGW64 ~/sssss $ torch.cuda.is_available()~ このようになりました。
PondVillege

2023/05/07 19:22 編集

質問者さん,そのコードはコマンド上ではなくPythonの構文として実行して欲しく思います. また,そちらのコードを正しく実行した結果は概ね予測出来て,質問文エラー中段の Command: "C:\Users\Padparadscha\sssss\stable-diffusion-webui\venv\Scripts\python.exe" -c "import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'" によって既に実行済みです.これで得られた UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 9010). Please update your GPU driver by downloading and installing a new version から解決の方法はドライバの更新にあると思われます. 試したことの欄に, NVIDIA ドライバーGeForcee GTX 480 バージョン391.35のダウンロード とありますが,ドライバが正しくインストールされているところまで確認できたのでしょうか?found version 9010と言われていることから,現在のバージョンを確認すると古い方のドライバが確認できてしまうはずです. ちなみに,「ゲーミングpcで足りていると思います」とおっしゃっているところ申し訳ないのですが,GTX 480のメモリは1536[MB]なのでstable-diffusion-webuiのWiki https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Troubleshooting#low-vram-video-cards で示される「When running on video cards with a low amount of VRAM (<=4GB), out of memory errors may arise.」からOOMが生じる可能性に注意してください.
PondVillege

2023/05/08 09:20

知恵袋解答の「その時代のGeForceはCUDAが使えないので、基本的に動きません。」が真であるならば,普通はミドルエンド以上のGPUを用意するか,金をかけずにGoogle Colaboratoryで動かすかの2択になります.CPUのスペックやメモリ次第ではCPUしか使わないようにオプション変更しても,動かないに等しい可能性があることを指摘しておきます.あとめっちゃ遅い https://shigedosicks.net/sdff-all/
jbpb0

2023/05/08 10:40 編集

https://androgamer.net/2018/01/24/post-8026/ 「NVDIA Geforce GTX480 は2010年に発売されたFermiアーキテクチャのハイエンドGPUだ。」 2010年。。。 > その時代のGeForceはCUDAが使えない https://qiita.com/k_ikasumipowder/items/1142dadba01b42ac6012 を見たらcuda 8までは対応してたようで、 https://pytorch.org/get-started/previous-versions/ を見たらpytorch 1.0.0とかはcuda 8でもインストールできるので、もしかしたらメモリー使用量が非常に少ないモデルなら動くのかも (Stable Diffusionみたいなのはムリですが) 【追記】 https://www.tensorflow.org/install/source_windows?hl=ja#gpu を見たらtensorflow 1.4.0とかもcuda 8対応
papara

2023/05/09 15:34

沢山のコメントありがとうございます。 tensorflow 1.4.0を入れてみようと思うのですが、調べてみてもよくわかりません。 CUDA8をインストールするところまでは出来ました。 お手数ですが、どなたかご享受いただけますでしょうか。
jbpb0

2023/05/10 15:11 編集

> tensorflow 1.4.0を入れてみようと思うのですが、調べてみてもよくわかりません。 https://pypi.org/project/tensorflow-gpu/1.4.0/#files を見ると、windowsだとpython 3.5, 3.6用のしかありませんので、そのどちらかの環境を用意して、そこに https://pypi.org/project/tensorflow-gpu/1.4.0/ に書かれてるようにしてpipでインストールします 上記で分からなければ、Stable Diffusionとは関係無い話なので、別の質問にしてください
guest

回答1

0

下の方の翻訳
AssertionError: トーチは GPU を使用できません。このチェックを無効にするには、 --skip-torch-cuda-test を COMMANDLINE_ARGS 変数に追加します。
webui-user.batをメモ等で開き、
@echo off

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=

call webui.bat
この
set COMMANDLINE_AGGS=
の所に
--skip-torch-cuda-test
をそのまま追加すれば出来ると思います!
@echo off

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_AGGS=--skip-torch-cuda-test

call webui.bat
こんな風になるはず。
自分もこの方法で出来たので出来るはず...

投稿2023/07/15 11:48

as_azu

総合スコア2

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

as_azu

2023/07/15 12:03

もしこれ[half]が付いてるエラーなら あくまで例→ RuntimeError: "LayerNormKernelImpl" not implemented for 'Half' @echo off set PYTHON= set GIT= set VENV_DIR= set COMMANDLINE_AGGS=--skip-torch-cuda-test --precision full --no-half call webui.bat
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問