
いけるよ!
今回は、Google ColabでStable Dffusionのアップデート/バージョン指定を簡単行う方法について解説します!
WindowsやMacをお使いの方は以下のURLを参考にしてください。
まず現在のGoogle Colabの設計を確認する
Google Colabでは基本的に最新のStable Diffusion Web UIをインストールする設計になっていることがほとんどです。
また、設計によってはバージョン指定までできるようになっていることもあります。

まずは、このようにバージョン指定ができるようになっていればこれを使うだけでOKです。
逆に、バージョンが固定指定になっている場合もあるので、Ctrl + F / Command + Fなどでgit checkoutと書いている部分がないかを調べましょう。
以下の例だと、v1.7.0で固定されていますね。

アップデートやバージョン指定が簡単にできるコードに変える
もし、バージョン指定がしたいのにそういう項目がない場合や、固定バージョンになっている場合は、その部分のコードを以下に書き換えましょう。
Google Colab
%cd /content/
repository_url = "https://github.com/AUTOMATIC1111/stable-diffusion-webui" # @param {type: "string"}
webui_branch = "master" # @param {type: "string"}
! git clone {repository_url}
%cd /content/stable-diffusion-webui
! git checkout {webui_branch}
このコードの使い方を解説します。
とはいっても簡単で、webui_branchの項目を編集するだけです。


あとはいつも通り実行するだけでお好みのバージョン指定が可能です。
ちなみに、リリースされているバージョンはこちらのURLからご確認いただけます。

Google Colabでもバージョン指定できるの?