Paperspace版導入

Last-modified: 2024-04-30 (火) 12:09:02

メモ
 Colab用のノートブックでは、「ngrok」というプログラムが使用されることがありますが、Paperspaceのマシンでngrokを実行すると、即座にBANされます。ただし、問い合わせれば復旧可能です。ngrokは、ローカルで動作しているサーバーにインターネットからアクセスできるようにするツールですが、過去に悪用されたことがあるため、自動的にBANされる仕組みになっています。Web UIのGradioも同様のことを行っていますが、とりあえずngrokさえ使用しなければ、BANされるようなことは起こらないようです。

2022/11/26 情報
ここが今後更新される可能性は低い(適度に修正は入ります)
PCのスペックが低い。GPUがNvidiaでは無い。等スレのとしと同じような設定が使える場所で戦いたい!という人向け?
Google Colabの仕様が変わって、使用制限が厳しくなったりでPaperspaceの方で試してみたい人用

  • アカウント登録(googleアカウントやgithubアカウントでも可)が必要
  • 1日の使用時間制限はないが、一度立ち上げた環境は最長6時間で自動シャットダウン
  • 自動シャットダウンされた場合も、永続ストレージのデータは保持される
  • 無料で借りられるGPUはQuadro M4000 8GB(GTX970相当)だから学習にはちょっと辛いかも(TI/HNぐらいならワンチャン?)
  • 無料コースでもメモリがcolabの2倍あるので大きなモデルを読み込んだり、colabでは不可能なモデルマージも可能
  • 利用規約的には明らかな違法行為での使用は禁止されている(一般的なクラウドの規約と大差ない)のでまあ常識の範囲で使用しようね

英語だけどここ読むといいよ。「馬鹿たれのためのPaperspaceガイド」ですって。
https://github.com/Engineer-of-Stuff/stable-diffusion-paperspace/blob/master/docs/Paperspace%20Guide%20for%20Idiots.md

colabとpaperspaceどっちがいいの

・即応性のcolab、量産のpaperspace
paperspaceには追加料金のかからないGPUが用意されていますがcolabは完全従量課金性です。
colabで一番良いGPUに接続すると1000円強支払っても6時間半しか接続できないためcolabで画像を量産しようとするとローカル環境を構築できてしまえるくらいのお金がかかります。
しかしpaperspaceのfree GPUは空きがなければ接続できないのでピークタイムにはなかなか繋がりません。時間の都合の融通がきくのはcolabといえるでしょう。
寝る前や仕事に行く前に無料GPUをツモってgenerate foreverするならpaperspace、思い立ったらいつでもすぐ使えるのはcolabとなります。
またcolabは生成AI目的の利用を追い出したいらしくstable diffusionの使用に様々な妨害を行っており、その対策を各自で行う必要があります。
paperspaceは有料プランでも永続ストレージが15GBと狭い上にうっかり容量超過していまうと追加料金を取られてしまいます。
google drive(2500円/年で100GB)をモデルの保存場所として用いgdownで必要なファイルをpaperspaceに適宜転送して使うなどハイブリッドな利用も検討してみましょう。

導入

マシンスペック

基本的にその時空いているマシンを最長6時間借りられる。課金コースによって借りられるマシンの最高性能が変わってくる

  • 無料コース
    GPU Quadro M4000 8GB(GTX970相当、運が悪いと埋まってるのでその時はまた来ようね)
    メモリ 30GB
    ディスク(永続ストレージ) 5GB
  • $8コース
    GPU NVIDIA A4000 16GB(RTX3070相当。埋まってたら下位のGPUを選ぼう。大概は空いてるけど)
    メモリ 45GB
    ディスク(永続ストレージ) 15GB
  • $40コース
    GPU NVIDIA A6000 48GB(RTX3090相当。運が良ければ最強GPUのA100 80GBが空いてることも)
    メモリ 45GB
    ディスク(永続ストレージ) 50GB

40ドルコースにして、最強GPUのA100 80GBを数日使用してみた。速い気がするが、8ドルコースの A4000とそこまで速度差がない印象…。
額を考えたら8ドルのもので十分な気がした。
ちなみにストレージについては、月またぎで料金発生が決まるという話。月末までにストレージ削除しておけば追加料金は取られない、とのこと
サブスクリプションごとの制限を超えるストレージには、$0.29/GB/月が課金されます。これらの料金は、バケットの現在の使用量で時間ごとに発生します。
Storage and datasets | Paperspace
月末までにファイルを削除して整理すればいいのかと思っていたら、しっかり請求されたので注意してね(2023年7月1日付の請求からそうなってる?)。

(追記)2023年5月以降は、コースに付属する(月額料金を払えば追加料金がかからない)GPUを確保するのが大変困難になった。従量課金の金を払ってGPUを借りるつもりでいたほうがいいかもしれない。

Paperspaceアカウント作成

https://www.paperspace.com/ から「SIGN UP FREE」を選択。メアドで登録するかgoogleかgithubアカウントでも可
携帯認証が必要なので携帯番号を入れる。国を日本にして、頭の0を抜いた番号(090-1234-5678なら9012345678)を入れてね
SMSが飛んでくるから番号を入れてアカウント作成完了

Project/Notebook作成

アカウントを作って最初の画面(プロジェクト一覧)の右上にある赤い「CREATE PROJECT」をクリック
適当な名前をつけてプロジェクト作成
プロジェクトが出来たらまた右上にある赤い「CREATE」をクリックしてノートを作成
「Select a Runtime」にテンプレートがずらっと並んでるけど、ここは右下の「Start from Scrach」を選択
次に下のプルダウンからGPU選択。頭に「Free」がついている奴を選ばないと従量課金が発生するので注意
無料版であれば「Free GPU(Quadro M4000)」しか選べないはず(P5000選べたかもしれないが忘れた)
課金コースであればその時空いてる一番いいFree GPUを選択
Auto Shutdown Timeは「6 hours」にすること(デフォルトだと1hourでシャットダウンされる)
最後に左下の「START NOTEBOOK」を押して開始
スタートするとノートブック画面に遷移し、マシンが起動するので、左サイドバーの一番下のオレンジのわっかのようなボタンをクリックして実際のノート画面に移動する

Terminalの起動とノートのコピー

ノート画面に遷移するとランチャー画面になるので、「Others」の「Terminal」をクリック
Linuxのshell(コマンドプロンプトのようなもの)が出るので、以下のコマンドを実行

wget https://raw.githubusercontent.com/Engineer-of-Stuff/stable-diffusion-paperspace/main/StableDiffusionUI_Voldemort_paperspace.ipynb -O /notebooks/StableDiffusionUI_Voldemort_paperspace.ipynb

notebookがダウンロードされて、左側のファイルビューに出てくるはずなので、ファイルビューからダウンロードされたノートをダブルクリック

2回目以降はダウンロードは不要。永続ストレージにノートが残っているからそれをダブルクリックするだけでおk。

環境設定(初回)

まず初回はモデルや生成物の置き場所を設定する必要がある
最初のセルにある

# Free tier
# symlink_to_notebooks = True                          # Enables the creation of symlinks back to /notebooks/
# model_storage_dir = '/tmp/stable-diffusion/models'   # Where the models will be downloaded to.
# repo_storage_dir = '/notebooks'                      # Where the repository will be downloaded to.

# Paid Tier
# symlink_to_notebooks = False
# model_storage_dir = '/storage/models'
# repo_storage_dir = '/notebooks'

の部分を、無料版($8コースもモデルたくさん使う気ならこっちがいいかも)なら

# Free tier
symlink_to_notebooks = True                          # Enables the creation of symlinks back to /notebooks/
model_storage_dir = '/tmp/stable-diffusion/models'   # Where the models will be downloaded to.
repo_storage_dir = '/notebooks'                      # Where the repository will be downloaded to.

# Paid Tier
# symlink_to_notebooks = False
# model_storage_dir = '/storage/models'
# repo_storage_dir = '/notebooks'

有料版なら

# Free tier
# symlink_to_notebooks = True                          # Enables the creation of symlinks back to /notebooks/
# model_storage_dir = '/tmp/stable-diffusion/models'   # Where the models will be downloaded to.
# repo_storage_dir = '/notebooks'                      # Where the repository will be downloaded to.

# Paid Tier
symlink_to_notebooks = False
model_storage_dir = '/storage/models'
repo_storage_dir = '/notebooks'

というようにコメントアウトをはずす
これはモデルを永続ストレージに置くか、マシン終了時に消える一時領域に置くかを決めている
無料版は特にストレージが少ないので一時領域に置かないと厳しい

書き換えたら該当セルを実行(notebook一番上の三角ボタンをクリック)。
続いて、「Clone the central repository」と「Install requirements and download repositories」のセルを実行
(こちらは特に書き換え不要)

モデルのダウンロード

各種モデルのダウンロード用セルがあるので必要なものを選んで実行
永続ストレージに保存する設定にしてある場合、調子に乗ってモデルをダウンロードしすぎないよう注意
wd1.2等のtorrent上のモデルもダウンロードしてくれる
モデルの保存先を永続ストレージにした場合は一度ダウンロードしたら二回目以降はダウンロード不要
オリジナルのnotebookには縁等最近のモデルがないので、必要であればhuggingfaceにある奴(縁やHD、エイミーちゃん等)であれば
trinart 60000あたりのセルを複製して以下のように変更して実行

縁pruned

%store -r symlink_to_notebooks model_storage_dir repo_storage_dir
!wget https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/Anything-V3.0-pruned.ckpt -O "{model_storage_dir}/Anything-V3.0-pruned.ckpt"

縁full

%store -r symlink_to_notebooks model_storage_dir repo_storage_dir
!wget https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/Anything-V3.0.ckpt -O "{model_storage_dir}/Anything-V3.0.ckpt"

縁vae

%store -r symlink_to_notebooks model_storage_dir repo_storage_dir
!wget https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/Anything-V3.0.vae.pt -O "{model_storage_dir}/Anything-V3.0.vae.pt"

EimisAnimeDiffusion

%store -r symlink_to_notebooks model_storage_dir repo_storage_dir
!wget https://huggingface.co/eimiss/EimisAnimeDiffusion_1.0v/resolve/main/EimisAnimeDiffusion_1-0v.ckpt -O "{model_storage_dir}/EimisAnimeDiffusion_1-0v.ckpt"

EimisSemiRealistic

%store -r symlink_to_notebooks model_storage_dir repo_storage_dir
!wget https://huggingface.co/eimiss/EimisSemiRealistic/resolve/main/EimisSemiRealistic_1-0v.ckpt -O "{model_storage_dir}/EimisSemiRealistic_1-0v.ckpt"

HD17

%store -r symlink_to_notebooks model_storage_dir repo_storage_dir
!wget https://huggingface.co/Deltaadams/HentaiDiffusion/resolve/main/HD-17.ckpt -O "{model_storage_dir}/HD-17.ckpt"

カーネルのリセット

モデルのダウンロードまで終わったら、「Clean up and restart the kernel」のセルを実行してカーネルを再起動

シンボリックリンク生成

「Link the models directory」のセルを実行して、永続もしくは一時ストレージにダウンロードしたモデルをWebUI内の適切なディレクトリにリンクする
永続ストレージにモデルを置いた場合は原則初回のみの実行でおk
(新しくモデルをダウンロードした場合に限り再実行)

WebUIの起動

「Launch the WebUI」のセルを実行して1111を起動
起動が終わると「ほにゃららgradio.appにアクセスしてや」と出るのでリンクを開いてWebUI起動

Extentionの追加

1111のExtentionから必要なExtentionをインストールする
インストール後は一度WebUIのセルを■ボタンで停止して、セルを再実行させる必要がある

出力結果の保存

WebUIを止めてから、「Export Generations」のセルを実行すると1111の出力結果を現在の日時フォルダに移動した上で7zに固めてくれるので、
左側のファイルビューから7zファイルを右クリックからダウンロードする
ダウンロードし終わったら下のセルのコメントアウトを外して日付フォルダを削除
7zファイルはファイルビューから右クリックで削除すればおk

notebookの終了

1111とnotebookの画面を閉じた上で、paperspaceに再度ログインし、notebookの一覧からshutdown instanceを選ぶのが一番確実
まあ放って置いたら設定時間で勝手に止まるけど次の人のためにちゃんとマシンを開放してあげようね

二回目以降の起動

二回目以降にnotebookを開始して、START MACHINEする前にGPUプルダウンを確認して、その時空いている一番いいGPUを選んでからSTART
二回目以降にnotebookを立ち上げた場合は「環境設定(初回)」にある項目を再度実行する必要がある
ただ二回目以降はリポジトリ情報が残っているのでわりとすぐ終わるはず
モデルを一時領域に置いている場合はモデルのダウンロードとリンク作成を再度行う。永続ストレージに置いてあるならこの工程は不要
実行後にカーネルリセットを実行した後にWebUIを起動すれば前回導入したExtensions等は有効な状態で1111が起動する

過去バージョンの利用

アップデートなどでまともに動かなくなった場合の対処法
ここでは例としてgradio3.23になる前まで戻す方法を書く

gradio3.16.2

  1. まず↑の導入でWEBUIが起動できる直前までセットアップする
  2. ノートブック「Launch the WebUI」のセルより更に下、Toolsのセルまで移動し、
    その中にある「Reset Repository」を開く
  3. そのセルの最後の行が
    !git reset --hard <commit>
    となっているので、<commit>部分を以下に書き換える
    !git reset --hard a9eab236d7e8afa4d6205127904a385b2c43bb24
  4. 書き換えたらセルを実行する

これでGradioが3.16.2だった頃のWEBUIが起動できるようになる

gradio3.9(先にgradio3.16.2以前の環境にしておく)

一旦gradio3.16.2にするのはgradio3.23以降とではファイル構成が一部異なっており
直接3.9をインストールするとそのままだと起動できないため

  • ngrokが使えない(使うと強制BANされる)paperspaceではこれが特に安定しており
    数枚生成すると固まる問題も解決する
  • URLがgradio.liveではなくgradio.appになる
  • ただし生成こそ安定してるが、WEBUI側が古くて一部拡張が動作しなかったりする
  • 上記のgradio3.16.2にしてから適当なセルを作成し以下をペーストして実行する
    !pip uninstall -y gradio
    !pip install gradio==3.9
  • これで現在のgradioをアンインストールしてgradio3.9をインストールできる
    • ちなみに逆に最新のgradioをインストールしたい場合は ==3.9 部分だけ削れば良い

好きなバージョンのWEBUIに戻す

  1. https://github.com/AUTOMATIC1111/stable-diffusion-webui/commits/master
    • ↑ここを見ればAUTOMATIC1111のWEBUIがどういう変更を行ったか見れる
  2. 例えば2023年3月25日にgradio3.23に変更されたので、それ以前に戻したい場合はその直前のSHAを取得する
    • これは変更時点を特定するための履歴番号みたいなもの
      commit.jpg
    • 例として上記画像の部分をコピーすると以下の羅列がコピーされる
      a9eab236d7e8afa4d6205127904a385b2c43bb24
  3. あとはgradio3.16.2で行った時のように<commit>部分をコピーしたSHAに書き換えて実行すればコピーしたSHAのバージョンまで戻せる

xformers 0.0.16

※ここは動いているならそのままの方が良い
xformersを導入するとエラーが出る人向け

  • このノートブックではxformersを導入する場合、下記の様に常に最新をインストールするようになっている
    !pip install xformers
  • ただ編集時点でインストールされるxformers0.0.17だとtorchの依存先が2.0.0になっているため、このままだと動作しない可能性がある
  • 以前のバージョンのxformersをインストールしたい場合はそのままバージョン指定すると良い
    !pip install xformers==0.0.16

コメントとか

  • 5月ぶりに40$から8$プランにしましたが、A4000はかなり簡単に取れるようになってますね。出現したら取れないって事はなくなりました。容量はtemp使えばなんとでもなりますし。ただA5000を15$くらいで使えればなぁと思ったりします。A6000だと25$~30$くらいとか。少し期待します。 -- 2023-09-08 (金) 22:10:25
    • 面倒くささを感じてでも安く使いたいなら個人の時間貸しGPUレンタルで安いの探すしかないけど想像してる以上に高いよ。貸してる側も電気代だけで赤だろってくらいの価格ラインだけどPC一か月つけっぱなら40$程度かるく超えるし。40$払うならGPU買った方が安いって言うのが上にいるけど電気代だけで大赤字だから欲張るのはオススメしない。 -- 2023-09-14 (木) 09:02:21
  • アカウント削除する方法がわからないのですが、無料プランに切り替えではなくて、完全に削除する方法はありませんか? -- 2023-09-27 (水) 01:22:52
    • 質問はひろばでする方が良いですよ。コメント欄は報告したい人が集まる場所。回答したい人が集まっているわけではないので。 -- 2023-09-27 (水) 01:28:30
  • 久しぶりに復帰。いろいろエラー出たので個人的解決メモ。
    xformersは起動前にToolsのbuild and installで再構築。
    最新版だとモデルの切り替えがうまくいかず、プログレスバーが出なくなった。おそらくgradioとの相性が悪いせいなのでバージョン戻し。
    webUIは8月初頭のものに(SHA=31a9966b9d76cb9a2dd7c09c47e236fae33836e2)でgradioは3.36.0。まだ花札アイコンがあったころのバージョン。特に細かく検証したわけではなく「たしかこのぐらいの時期で一回やめたんだったな~」ぐらいの記憶から適当に組み合わせた。 -- 2023-11-04 (土) 06:00:03
  • SDXLが流行り始めたのでまた使い始めた。
    GPUメモリが16GBあるのでXL環境だとかなり有能。ハイスペックマシンでも学習はかなりメモリを食って何もできなくなってしまうので学習をpaperspaceに任せるといろいろ都合がいい。
    hakomikan氏のTrainTrainがあればWebUI上で簡単に学習できるのでpaperspaceでうまく環境作れなかった人も今ならハードルが低いと思う。 -- 2024-02-01 (木) 21:11:33
  • 昨日からforgeがエラー出て起動しなくなったのですが原因分かりますでしょうか?再インストールしたら初回は起動するけど2回目以降は同じエラーが出てしまう。Hit:1 http://security.ubuntu.com/ubuntu focal-security InReleaseHit:2 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InReleaseHit:3 https://deb.nodesource.com/node_16.x focal InRelease Hit:4 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease Hit:5 http://archive.ubuntu.com/ubuntu focal InReleaseHit:6 http://archive.ubuntu.com/ubuntu focal-updates InReleaseHit:7 http://archive.ubuntu.com/ubuntu focal-backports InReleaseReading package lists... DoneBuilding dependency tree Reading state information... Done175 packages can be upgraded. Run 'apt list --upgradable' to see them.Reading package lists... DoneBuilding dependency tree Reading state information... Donebuild-essential is already the newest version (12.8ubuntu1.1).libpython3.10-dev is already the newest version (3.10.14-1+focal1).python3.10 is already the newest version (3.10.14-1+focal1).0 upgraded, 0 newly installed, 0 to remove and 175 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.0Successfully installed pip-24.0WARNING: 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/venvLooking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu121Requirement already satisfied: torch==2.1.2+cu121 in /usr/local/lib/python3.10/dist-packages (2.1.2+cu121)Requirement already satisfied: torchvision==0.16.2+cu121 in /usr/local/lib/python3.10/dist-packages (0.16.2+cu121)Requirement already satisfied: torchaudio==2.1.2+cu121 in /usr/local/lib/python3.10/dist-packages (2.1.2+cu121)Requirement already satisfied: torchtext==0.16.2 in /usr/local/lib/python3.10/dist-packages (0.16.2+cpu)Requirement already satisfied: torchdata==0.7.1 in /usr/local/lib/python3.10/dist-packages (0.7.1)Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch==2.1.2+cu121) (3.14.0)Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch==2.1.2+cu121) (4.11.0)Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch==2.1.2+cu121) (1.12)Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch==2.1.2+cu121) (3.3)Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch==2.1.2+cu121) (3.1.3)Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from torch==2.1.2+cu121) (2024.3.1)Requirement already satisfied: triton==2.1.0 in /usr/local/lib/python3.10/dist-packages (from torch==2.1.2+cu121) (2.1.0)Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from torchvision==0.16.2+cu121) (1.26.2)Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from torchvision==0.16.2+cu121) (2.31.0)Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /usr/local/lib/python3.10/dist-packages (from torchvision==0.16.2+cu121) (9.5.0)Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from torchtext==0.16.2) (4.66.2)Requirement already satisfied: urllib3>=1.25 in /usr/local/lib/python3.10/dist-packages (from torchdata==0.7.1) (2.2.1)Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch==2.1.2+cu121) (2.1.5)Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->torchvision==0.16.2+cu121) (3.3.2)Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests->torchvision==0.16.2+cu121) (2.8)Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests->torchvision==0.16.2+cu121) (2019.11.28)Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch==2.1.2+cu121) (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/venvRequirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (3.8.4)Requirement already satisfied: ipython in /usr/local/lib/python3.10/dist-packages (8.24.0)Requirement already satisfied: insightface in /usr/local/lib/python3.10/dist-packages (0.7.3)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.51.0)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.21 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: 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.17.2)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.11.0)Requirement already satisfied: pexpect>4.3 in /usr/local/lib/python3.10/dist-packages (from ipython) (4.9.0)Requirement already satisfied: onnx in /usr/local/lib/python3.10/dist-packages (from insightface) (1.16.0)Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from insightface) (4.66.2)Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from insightface) (2.31.0)Requirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (from insightface) (1.13.0)Requirement already satisfied: scikit-learn in /usr/local/lib/python3.10/dist-packages (from insightface) (1.4.2)Requirement already satisfied: scikit-image in /usr/local/lib/python3.10/dist-packages (from insightface) (0.21.0)Requirement already satisfied: easydict in /usr/local/lib/python3.10/dist-packages (from insightface) (1.13)Requirement already satisfied: cython in /usr/local/lib/python3.10/dist-packages (from insightface) (3.0.10)Requirement already satisfied: albumentations in /usr/local/lib/python3.10/dist-packages (from insightface) (1.4.4)Requirement already satisfied: prettytable in /usr/local/lib/python3.10/dist-packages (from insightface) (3.10.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: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib) (1.14.0)Requirement already satisfied: PyYAML in /usr/local/lib/python3.10/dist-packages (from albumentations->insightface) (6.0.1)Collecting pydantic>=2.6.4 (from albumentations->insightface) Using cached pydantic-2.7.1-py3-none-any.whl.metadata (107 kB)Requirement already satisfied: opencv-python-headless>=4.9.0 in /usr/local/lib/python3.10/dist-packages (from albumentations->insightface) (4.9.0.80)Requirement already satisfied: networkx>=2.8 in /usr/local/lib/python3.10/dist-packages (from scikit-image->insightface) (3.3)Requirement already satisfied: imageio>=2.27 in /usr/local/lib/python3.10/dist-packages (from scikit-image->insightface) (2.34.1)Requirement already satisfied: tifffile>=2022.8.12 in /usr/local/lib/python3.10/dist-packages (from scikit-image->insightface) (2024.4.24)Requirement already satisfied: PyWavelets>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from scikit-image->insightface) (1.6.0)Requirement already satisfied: lazy_loader>=0.2 in /usr/local/lib/python3.10/dist-packages (from scikit-image->insightface) (0.4)Requirement already satisfied: joblib>=1.2.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn->insightface) (1.4.0)Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn->insightface) (3.5.0)Collecting protobuf>=3.20.2 (from onnx->insightface) Using cached protobuf-5.26.1-cp37-abi3-manylinux2014_x86_64.whl.metadata (592 bytes)Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->insightface) (3.3.2)Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests->insightface) (2.8)Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->insightface) (2.2.1)Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests->insightface) (2019.11.28)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: annotated-types>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from pydantic>=2.6.4->albumentations->insightface) (0.6.0)Requirement already satisfied: pydantic-core==2.18.2 in /usr/local/lib/python3.10/dist-packages (from pydantic>=2.6.4->albumentations->insightface) (2.18.2)Using cached protobuf-5.26.1-cp37-abi3-manylinux2014_x86_64.whl (302 kB)Using cached pydantic-2.7.1-py3-none-any.whl (409 kB)Installing collected packages: protobuf, pydantic Attempting uninstall: protobuf Found existing installation: protobuf 3.20.0 Uninstalling protobuf-3.20.0: Successfully uninstalled protobuf-3.20.0 Attempting uninstall: pydantic Found existing installation: pydantic 1.10.15 Uninstalling pydantic-1.10.15: Successfully uninstalled pydantic-1.10.15ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.fastapi 0.94.0 requires pydantic!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0,>=1.6.2, but you have pydantic 2.7.1 which is incompatible.mediapipe 0.10.11 requires protobuf<4,>=3.11, but you have protobuf 5.26.1 which is incompatible.open-clip-torch 2.20.0 requires protobuf<4, but you have protobuf 5.26.1 which is incompatible.tb-nightly 2.17.0a20240429 requires protobuf!=4.24.0,<5.0.0,>=3.19.6, but you have protobuf 5.26.1 which is incompatible.Successfully installed protobuf-5.26.1 pydantic-2.7.1WARNING: 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-forgePython 3.10.14 (main, Apr 6 2024, 18:45:05) [GCC 9.4.0]Version: f0.0.17v1.8.0rc-latest-276-g29be1da7Commit hash: 29be1da7cf2b5dccfc70fbdd33eb35c56a31ffb7Launching Web UI with arguments: --pin-shared-memory --cuda-malloc --cuda-stream --enable-insecure-extension-access --share --gradio-queue --unet-in-fp8-e4m3fn --ckpt-dir /tmp/SD/modelsUsing cudaMallocAsync backend.Total VRAM 16109 MB, total RAM 45140 MBSet vram state to: NORMAL_VRAMAlways pin shared GPU memoryDevice: cuda:0 NVIDIA RTX A4000 : cudaMallocAsyncVAE dtype: torch.bfloat16CUDA Stream Activated: TrueTraceback (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 35, in imports import gradio # noqa: F401 File "/usr/local/lib/python3.10/dist-packages/gradio/__init__.py", line 3, in <module> import gradio.components as components File "/usr/local/lib/python3.10/dist-packages/gradio/components/__init__.py", line 1, in <module> from gradio.components.annotated_image import AnnotatedImage File "/usr/local/lib/python3.10/dist-packages/gradio/components/annotated_image.py", line 13, in <module> from gradio.components.base import IOComponent, _Keywords File "/usr/local/lib/python3.10/dist-packages/gradio/components/base.py", line 20, in <module> from fastapi import UploadFile File "/usr/local/lib/python3.10/dist-packages/fastapi/__init__.py", line 7, in <module> from .applications import FastAPI as FastAPI File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 15, in <module> from fastapi import routing File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 22, in <module> from fastapi import params File "/usr/local/lib/python3.10/dist-packages/fastapi/params.py", line 4, in <module> from pydantic.fields import FieldInfo, UndefinedImportError: cannot import name 'Undefined' from 'pydantic.fields' (/usr/local/lib/python3.10/dist-packages/pydantic/fields.py) -- 2024-04-30 (火) 12:09:02

(Tips)

  • 質問をする前にここを見て!
     
  • 既存コメントの先頭にあるラジオボタンをONにすると、そのコメントの下にぶら下げ返信する形になる(ツリー構造)。
  • コメントの文中で↵ボタン(下の画像参照)を押すと「&br;」の文字列が挿入される。これは送信後に改行として機能するので、文章の整形に役立つ。
    br.png

短縮URL生成