「SD黄色本」として親しまれている書籍「画像生成AI Stable Diffusion スタートガイド」に付属のAUTOMATIC1111(A1111)が動作しない状況がありましたので修正報告です。原因として、2025.10からGoogle ColabがPython 3.12に更新されました。
現象: Start Stable-Diffusionで起動できない
簡単な解決策: ランタイムの変更を試す
まずこの手の問題が起きた時に、試してみてほしい手法は「ランタイムバージョンの変更」です。Colabメニューの「ランタイム」→「ランタイムのタイプを変更」から「ランタイムバージョン」を「2025.7」など過去の環境にすることで、動作する可能性があります。
実際のところ、過去のランタイムバージョンに切り替えても、依存している他のライブラリの更新が関係しており、起動には修正が必要でした。
なおGoogleによると、以前のランタイム バージョンはリリースから 1 年間利用できるそうです。現在の最新版は以下のような環境です。
「2025.10」
Ubuntu 22.04.4 LTS, Python 3.12.12, numpy 2.0.2, PyTorch 2.8.0, Jax 0.5.3, TensorFlow 2.19.0(TPU ランタイムには含まれません), R version 4.5.1 (2025-06-13) -- "Great Square Root", julia version 1.11.5
このページで報告されるようになったようです。
https://research.google.com/colaboratory/runtime-version-faq.html
「2025.7」からの大きな修正点は「Python 3.11.13」では無くなった、という点です。A1111で長年使われてきた 3.10/3.11から早めに移行が始まっています。
https://corp.aicu.ai/ja/code20240522
原作者・TheLastBen氏による対応
本書で扱っているA1111はTheLastBen氏による「fast-stable-diffusion」としてメンテナンスされているものです。今回のColab自身のPython 3.11への移行を受けて、ベースになる環境そのものの移行が実施されました。
こちらのリンクにて最新のGoogle Colabにて動作します。
j.aicu.ai/SBXL1 を更新しました
TheLastBen版 Python 3.12対応版をベースに再構築、ぶるぺん氏のTruePencil, MelloPencil のモデルダウンロードを追加
動作確認です。
AUTOMATIC1111でMellow Pencilが動いています。
以下はいただいた質問(検索ヒット用)です
以下のようなエラーで「Start Stable Diffusion」から先が動きません
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR E0000 00:00:1766614971.818628 2740 cuda_dnn.cc:8579] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered E0000 00:00:1766614971.832965 2740 cuda_blas.cc:1407] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered W0000 00:00:1766614971.861386 2740 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once. W0000 00:00:1766614971.861410 2740 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once. W0000 00:00:1766614971.861416 2740 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once. W0000 00:00:1766614971.861419 2740 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once. Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 13, in <module> initialize.imports() File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/initialize.py", line 23, in imports import gradio # noqa: F401 ^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/gradio/__init__.py", line 3, in <module> import gradio.components as components File "/usr/local/lib/python3.12/dist-packages/gradio/components/__init__.py", line 1, in <module> from gradio.components.annotated_image import AnnotatedImage File "/usr/local/lib/python3.12/dist-packages/gradio/components/annotated_image.py", line 13, in <module> from gradio.components.base import IOComponent, _Keywords File "/usr/local/lib/python3.12/dist-packages/gradio/components/base.py", line 20, in <module> from fastapi import UploadFile File "/usr/local/lib/python3.12/dist-packages/fastapi/__init__.py", line 7, in <module> from .applications import FastAPI as FastAPI File "/usr/local/lib/python3.12/dist-packages/fastapi/applications.py", line 15, in <module> from fastapi import routing File "/usr/local/lib/python3.12/dist-packages/fastapi/routing.py", line 22, in <module> from fastapi import params File "/usr/local/lib/python3.12/dist-packages/fastapi/params.py", line 4, in <module> from pydantic.fields import FieldInfo, Undefined ImportError: cannot import name 'Undefined' from 'pydantic.fields' (/usr/local/lib/python3.12/dist-packages/pydantic/fields.py)
Originally published at note.com/aicu on Dec 24, 2025.

Comments