スナックelve 本店

バツイチ40代女の日記です

商用利用可能なモデルDreamShaperをstable-diffusion-webuiで動かしたい

チャットGPTに聞いたら何一つ本当のことが書かれない記事が生成されましたw

商用利用可能なモデルを使いたいということで今回はDreamShaperを使おうと思います。

んで、前回はコマンドで苦労したのでweb UI版を動かすぞい!

google colabで新しいノート作ってGTPにして・・・

必要なかったけどgoogleドライブマウントして・・・w

from google.colab import drive
drive.mount('/content/drive')

ネットで拾ったコードの組み合わせ

%pip install torch==2.0.0+cu118 torchvision==0.15.1+cu118 torchtext torchaudio torchdata==0.6.0 --index-url https://download.pytorch.org/whl/cu118

!git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
%cd /content/stable-diffusion-webui

!wget https://civitai.com/api/download/models/94081 --content-disposition
!cp dreamshaper_631BakedVae.safetensors /content/stable-diffusion-webui/models/Stable-diffusion/dreamshaper_631BakedVae.safetensors

!python launch.py --share --xformers --enable-insecure-extension-access

しばらーくまつと

Calculating sha256 for /content/stable-diffusion-webui/models/Stable-diffusion/dreamshaper_631BakedVae.safetensors: Running on local URL: http://127.xxx.xxx:xxxx
Running on public URL: https://xxxxxxxxxxxxxxxxxxxxxx.gradio.live

みたいな表示が出るのでpublic URLの方をクリックすると使えるで。


参考
【Google Colaboratory】Google ドライブにマウントし、ファイルへアクセスする方法 | キカガクの技術ブログ
【AI画像生成】Google ColabでStable Diffusion web UIを動かす方法
生花妙笔信手来 – 玩儿转游戏动漫场景 | 亚马逊AWS官方博客