eightban's memo

残しておきたい記事をまとめてみました。このブログに書いてあるドキュメントやブログで配布しているファイルの使用によって発生するいかなる損害に対してもこのブログの管理者は責任を負いません。使用する場合は自己責任のもとに使用してください。

stable-diffusion

Stable Diffusion web UI(AUTOMATIC1111) Google Colab モデルファイルをダウンロードするコマンドを作成するバッチファイル aria2対応

更新日:

バッチファイル

::!apt-get -y install -qq aria2 

del C:\app\Perl\sdmodelurl.txt
del C:\app\Perl\sdmodelurl2.txt
for /f "tokens=1,2,3* delims=," %%i in (C:\app\Perl\sdmodel.txt) do (
 echo !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M %%j%%k ^
 -d /content/stable-diffusion-webui/%%i -o %%k ^
 >>C:\app\Perl\sdmodelurl.txt
 echo !wget %%j%%k -O /content/stable-diffusion-webui/%%i/%%k ^
 >>C:\app\Perl\sdmodelurl2.txt
)

インプット

models/Stable-diffusion,https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/,anything-v3-full.safetensors

アウトプット

!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/anything-v3-full.safetensors  -d /content/stable-diffusion-webui/models/Stable-diffusion -o anything-v3-full.safetensors   
!wget https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/anything-v3-full.safetensors -O /content/stable-diffusion-webui/models/anything-v3-full.safetensors   

aria2

予めインストールします
かなり早いです 爆速

!apt-get -y install -qq aria2

7.2G

CPU times: user 6.99 ms, sys: 8 ms, total: 15 ms
Wall time: 422 ms

wget

7.2G

CPU times: user 446 ms, sys: 94.2 ms, total: 540 ms
Wall time: 33.2 s

計測する方法

%%time

-stable-diffusion

Copyright© eightban's memo , 2024 All Rights Reserved Powered by STINGER.