stable diffusion webui (AUTOMATIC1111) 最新(v1.5.1)化 #1

 前回入れたのが5/20で3ヶ月近く前でその間に色々と進化してそうなので最新化します。
AI絵師用自作PCつくる #7 Stable Diffusion web UI AUTOMATIC1111 やりなおしで成功

↑のバージョンは 

  • version: v1.2.1
  • python: 3.11.4
  • torch: 2.0.1+cu118
  • xformers: N/A
  • gradio: 3.29.0
  • checkpoint: fc2511737a

マイナーバージョンが3も違います。
月1でマイナーバージョン上がっていってる勢い。

今までのやつは名前変更で退避。

~$ mv stable-diffusion-webui stable-diffusion-webui_v1.2.1

aptを最新化

~$ sudo apt update

取得:1 file:/var/cuda-repo-ubuntu2204-12-1-local  InRelease [1,572 B]

取得:1 file:/var/cuda-repo-ubuntu2204-12-1-local  InRelease [1,572 B]

取得:2 https://packages.microsoft.com/repos/edge stable InRelease [3,569 B]                                         

ヒット:3 http://jp.archive.ubuntu.com/ubuntu lunar InRelease                                                        

取得:4 http://jp.archive.ubuntu.com/ubuntu lunar-updates InRelease [109 kB]

取得:5 https://packages.microsoft.com/repos/edge stable/main amd64 Packages [8,606 B]

取得:6 http://jp.archive.ubuntu.com/ubuntu lunar-backports InRelease [99.8 kB]

取得:7 http://jp.archive.ubuntu.com/ubuntu lunar-security InRelease [109 kB]

取得:8 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 Packages [358 kB]

取得:9 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main i386 Packages [199 kB]

取得:10 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 DEP-11 Metadata [81.3 kB]

取得:11 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 c-n-f Metadata [6,816 B]

取得:12 http://jp.archive.ubuntu.com/ubuntu lunar-updates/universe amd64 Packages [752 kB]

取得:13 http://jp.archive.ubuntu.com/ubuntu lunar-updates/universe i386 Packages [654 kB]

取得:14 http://jp.archive.ubuntu.com/ubuntu lunar-updates/universe Translation-en [79.8 kB]

取得:15 http://jp.archive.ubuntu.com/ubuntu lunar-updates/universe amd64 DEP-11 Metadata [52.6 kB]

取得:16 http://jp.archive.ubuntu.com/ubuntu lunar-updates/universe amd64 c-n-f Metadata [12.5 kB]

取得:17 http://jp.archive.ubuntu.com/ubuntu lunar-backports/universe amd64 DEP-11 Metadata [13.1 kB]

取得:18 http://jp.archive.ubuntu.com/ubuntu lunar-security/main amd64 DEP-11 Metadata [7,400 B]

取得:19 http://jp.archive.ubuntu.com/ubuntu lunar-security/universe amd64 DEP-11 Metadata [6,560 B]

2,553 kB を 2秒 で取得しました (1,031 kB/s)                          

パッケージリストを読み込んでいます... 完了

依存関係ツリーを作成しています... 完了

状態情報を読み取っています... 完了        

アップグレードできるパッケージが 29 個あります。表示するには 'apt list --upgradable' を実行してください。

~$ sudo apt upgrade
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています... 完了        
状態情報を読み取っています... 完了        
アップグレードパッケージを検出しています... 完了
#
# You can verify the status of security fixes using the `pro fix` command.
# E.g., a recent Ruby vulnerability can be checked with: `pro fix USN-6219-1`
# For more detail see: https://ubuntu.com/security/notices/USN-6219-1
#
以下のパッケージが新たにインストールされます:
  linux-headers-6.2.0-27 linux-headers-6.2.0-27-generic linux-image-6.2.0-27-generic linux-modules-6.2.0-27-generic linux-modules-extra-6.2.0-27-generic
以下のパッケージは保留されます:
  cloud-init
以下のパッケージはアップグレードされます:
  fonts-opensymbol hplip hplip-data initramfs-tools initramfs-tools-bin initramfs-tools-core libhpmud0 libldb2 libsane-hpaio libsmbclient libwbclient0 linux-firmware
  linux-generic-hwe-22.04 linux-headers-generic-hwe-22.04 linux-image-generic-hwe-22.04 linux-libc-dev microsoft-edge-stable printer-driver-hpcups printer-driver-postscript-hp
  python3-ldb python3-samba samba samba-ad-provision samba-common samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules
アップグレード: 28 個、新規インストール: 5 個、削除: 0 個、保留: 1 個。
595 MB のアーカイブを取得する必要があります。
この操作後に追加で 872 MB のディスク容量が消費されます。
続行しますか? [Y/n] y
取得:1 https://packages.microsoft.com/repos/edge stable/main amd64 microsoft-edge-stable amd64 115.0.1901.203-1 [150 MB]
取得:2 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 libsmbclient amd64 2:4.17.7+dfsg-1ubuntu2 [63.3 kB]
取得:3 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 samba-vfs-modules amd64 2:4.17.7+dfsg-1ubuntu2 [431 kB]
取得:4 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 python3-ldb amd64 2:2.6.2+samba4.17.7+dfsg-1ubuntu2 [40.8 kB]
取得:5 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 samba-dsdb-modules amd64 2:4.17.7+dfsg-1ubuntu2 [318 kB]
取得:6 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 libldb2 amd64 2:2.6.2+samba4.17.7+dfsg-1ubuntu2 [177 kB]
取得:7 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 samba-common-bin amd64 2:4.17.7+dfsg-1ubuntu2 [1,260 kB]
取得:8 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 libwbclient0 amd64 2:4.17.7+dfsg-1ubuntu2 [60.4 kB]
取得:9 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 samba-libs amd64 2:4.17.7+dfsg-1ubuntu2 [6,103 kB]
取得:10 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 samba-ad-provision all 2:4.17.7+dfsg-1ubuntu2 [400 kB]
取得:11 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 samba amd64 2:4.17.7+dfsg-1ubuntu2 [994 kB]
取得:12 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 python3-samba amd64 2:4.17.7+dfsg-1ubuntu2 [3,151 kB]
取得:13 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 samba-common all 2:4.17.7+dfsg-1ubuntu2 [93.3 kB]
取得:14 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 fonts-opensymbol all 4:102.12+LibO7.5.5-0ubuntu0.23.04.1 [127 kB]
取得:15 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 printer-driver-postscript-hp amd64 3.22.10+dfsg0-1ubuntu1 [1,192 kB]
取得:16 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 libsane-hpaio amd64 3.22.10+dfsg0-1ubuntu1 [133 kB]
取得:17 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 hplip amd64 3.22.10+dfsg0-1ubuntu1 [203 kB]
取得:18 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 libhpmud0 amd64 3.22.10+dfsg0-1ubuntu1 [121 kB]
取得:19 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 hplip-data all 3.22.10+dfsg0-1ubuntu1 [6,461 kB]
取得:20 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 printer-driver-hpcups amd64 3.22.10+dfsg0-1ubuntu1 [242 kB]
取得:21 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 initramfs-tools all 0.142ubuntu2.2 [9,080 B]
取得:22 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 initramfs-tools-core all 0.142ubuntu2.2 [48.6 kB]
取得:23 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 initramfs-tools-bin amd64 0.142ubuntu2.2 [20.8 kB]
取得:24 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 linux-firmware all 20230323.gitbcdcfbcf-0ubuntu1.5 [281 MB]
取得:25 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 linux-modules-6.2.0-27-generic amd64 6.2.0-27.28 [28.9 MB]                                                    
取得:26 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 linux-image-6.2.0-27-generic amd64 6.2.0-27.28 [13.7 MB]                                                      
取得:27 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 linux-modules-extra-6.2.0-27-generic amd64 6.2.0-27.28 [81.0 MB]                                              
取得:28 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 linux-generic-hwe-22.04 amd64 6.2.0.27.27 [1,680 B]                                                           
取得:29 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 linux-image-generic-hwe-22.04 amd64 6.2.0.27.27 [8,302 B]                                                     
取得:30 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 linux-headers-6.2.0-27 all 6.2.0-27.28 [13.2 MB]                                                              
取得:31 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 linux-headers-6.2.0-27-generic amd64 6.2.0-27.28 [3,627 kB]                                                   
取得:32 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 linux-headers-generic-hwe-22.04 amd64 6.2.0.27.27 [8,156 B]                                                   
取得:33 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 linux-libc-dev amd64 6.2.0-27.28 [1,556 kB]                                                                   
595 MB を 32秒 で取得しました (18.8 MB/s)                                                                                                                                          
パッケージからテンプレートを展開しています: 100%
パッケージを事前設定しています ...
(データベースを読み込んでいます ... 現在 207427 個のファイルとディレクトリがインストールされています。)
.../00-microsoft-edge-stable_115.0.1901.203-1_amd64.deb を展開する準備をしています ...
microsoft-edge-stable (115.0.1901.203-1) で (115.0.1901.188-1 に) 上書き展開しています ...
.../01-libsmbclient_2%3a4.17.7+dfsg-1ubuntu2_amd64.deb を展開する準備をしています ...
libsmbclient:amd64 (2:4.17.7+dfsg-1ubuntu2) で (2:4.17.7+dfsg-1ubuntu1.1 に) 上書き展開しています ...
.../02-samba-vfs-modules_2%3a4.17.7+dfsg-1ubuntu2_amd64.deb を展開する準備をしています ...
samba-vfs-modules:amd64 (2:4.17.7+dfsg-1ubuntu2) で (2:4.17.7+dfsg-1ubuntu1.1 に) 上書き展開しています ...
.../03-python3-ldb_2%3a2.6.2+samba4.17.7+dfsg-1ubuntu2_amd64.deb を展開する準備をしています ...
python3-ldb (2:2.6.2+samba4.17.7+dfsg-1ubuntu2) で (2:2.6.2+samba4.17.7+dfsg-1ubuntu1.1 に) 上書き展開しています ...
.../04-samba-dsdb-modules_2%3a4.17.7+dfsg-1ubuntu2_amd64.deb を展開する準備をしています ...
samba-dsdb-modules:amd64 (2:4.17.7+dfsg-1ubuntu2) で (2:4.17.7+dfsg-1ubuntu1.1 に) 上書き展開しています ...
.../05-libldb2_2%3a2.6.2+samba4.17.7+dfsg-1ubuntu2_amd64.deb を展開する準備をしています ...
libldb2:amd64 (2:2.6.2+samba4.17.7+dfsg-1ubuntu2) で (2:2.6.2+samba4.17.7+dfsg-1ubuntu1.1 に) 上書き展開しています ...
.../06-samba-common-bin_2%3a4.17.7+dfsg-1ubuntu2_amd64.deb を展開する準備をしています ...
samba-common-bin (2:4.17.7+dfsg-1ubuntu2) で (2:4.17.7+dfsg-1ubuntu1.1 に) 上書き展開しています ...
.../07-libwbclient0_2%3a4.17.7+dfsg-1ubuntu2_amd64.deb を展開する準備をしています ...
libwbclient0:amd64 (2:4.17.7+dfsg-1ubuntu2) で (2:4.17.7+dfsg-1ubuntu1.1 に) 上書き展開しています ...
.../08-samba-libs_2%3a4.17.7+dfsg-1ubuntu2_amd64.deb を展開する準備をしています ...
samba-libs:amd64 (2:4.17.7+dfsg-1ubuntu2) で (2:4.17.7+dfsg-1ubuntu1.1 に) 上書き展開しています ...
.../09-samba-ad-provision_2%3a4.17.7+dfsg-1ubuntu2_all.deb を展開する準備をしています ...
samba-ad-provision (2:4.17.7+dfsg-1ubuntu2) で (2:4.17.7+dfsg-1ubuntu1.1 に) 上書き展開しています ...
.../10-samba_2%3a4.17.7+dfsg-1ubuntu2_amd64.deb を展開する準備をしています ...
samba (2:4.17.7+dfsg-1ubuntu2) で (2:4.17.7+dfsg-1ubuntu1.1 に) 上書き展開しています ...
.../11-python3-samba_2%3a4.17.7+dfsg-1ubuntu2_amd64.deb を展開する準備をしています ...
python3-samba (2:4.17.7+dfsg-1ubuntu2) で (2:4.17.7+dfsg-1ubuntu1.1 に) 上書き展開しています ...
.../12-samba-common_2%3a4.17.7+dfsg-1ubuntu2_all.deb を展開する準備をしています ...
samba-common (2:4.17.7+dfsg-1ubuntu2) で (2:4.17.7+dfsg-1ubuntu1.1 に) 上書き展開しています ...
.../13-fonts-opensymbol_4%3a102.12+LibO7.5.5-0ubuntu0.23.04.1_all.deb を展開する準備をしています ...
fonts-opensymbol (4:102.12+LibO7.5.5-0ubuntu0.23.04.1) で (4:102.12+LibO7.5.4-0ubuntu0.23.04.1 に) 上書き展開しています ...
.../14-printer-driver-postscript-hp_3.22.10+dfsg0-1ubuntu1_amd64.deb を展開する準備をしています ...
printer-driver-postscript-hp (3.22.10+dfsg0-1ubuntu1) で (3.22.10+dfsg0-1 に) 上書き展開しています ...
.../15-libsane-hpaio_3.22.10+dfsg0-1ubuntu1_amd64.deb を展開する準備をしています ...
libsane-hpaio:amd64 (3.22.10+dfsg0-1ubuntu1) で (3.22.10+dfsg0-1 に) 上書き展開しています ...
.../16-hplip_3.22.10+dfsg0-1ubuntu1_amd64.deb を展開する準備をしています ...
hplip (3.22.10+dfsg0-1ubuntu1) で (3.22.10+dfsg0-1 に) 上書き展開しています ...
.../17-libhpmud0_3.22.10+dfsg0-1ubuntu1_amd64.deb を展開する準備をしています ...
libhpmud0:amd64 (3.22.10+dfsg0-1ubuntu1) で (3.22.10+dfsg0-1 に) 上書き展開しています ...
.../18-hplip-data_3.22.10+dfsg0-1ubuntu1_all.deb を展開する準備をしています ...
hplip-data (3.22.10+dfsg0-1ubuntu1) で (3.22.10+dfsg0-1 に) 上書き展開しています ...
.../19-printer-driver-hpcups_3.22.10+dfsg0-1ubuntu1_amd64.deb を展開する準備をしています ...
printer-driver-hpcups (3.22.10+dfsg0-1ubuntu1) で (3.22.10+dfsg0-1 に) 上書き展開しています ...
.../20-initramfs-tools_0.142ubuntu2.2_all.deb を展開する準備をしています ...
initramfs-tools (0.142ubuntu2.2) で (0.142ubuntu2 に) 上書き展開しています ...
.../21-initramfs-tools-core_0.142ubuntu2.2_all.deb を展開する準備をしています ...
initramfs-tools-core (0.142ubuntu2.2) で (0.142ubuntu2 に) 上書き展開しています ...
.../22-initramfs-tools-bin_0.142ubuntu2.2_amd64.deb を展開する準備をしています ...
initramfs-tools-bin (0.142ubuntu2.2) で (0.142ubuntu2 に) 上書き展開しています ...
.../23-linux-firmware_20230323.gitbcdcfbcf-0ubuntu1.5_all.deb を展開する準備をしています ...
linux-firmware (20230323.gitbcdcfbcf-0ubuntu1.5) で (20230323.gitbcdcfbcf-0ubuntu1.4 に) 上書き展開しています ...
以前に未選択のパッケージ linux-modules-6.2.0-27-generic を選択しています。
.../24-linux-modules-6.2.0-27-generic_6.2.0-27.28_amd64.deb を展開する準備をしています ...
linux-modules-6.2.0-27-generic (6.2.0-27.28) を展開しています...
以前に未選択のパッケージ linux-image-6.2.0-27-generic を選択しています。
.../25-linux-image-6.2.0-27-generic_6.2.0-27.28_amd64.deb を展開する準備をしています ...
linux-image-6.2.0-27-generic (6.2.0-27.28) を展開しています...
以前に未選択のパッケージ linux-modules-extra-6.2.0-27-generic を選択しています。
.../26-linux-modules-extra-6.2.0-27-generic_6.2.0-27.28_amd64.deb を展開する準備をしています ...
linux-modules-extra-6.2.0-27-generic (6.2.0-27.28) を展開しています...
.../27-linux-generic-hwe-22.04_6.2.0.27.27_amd64.deb を展開する準備をしています ...
linux-generic-hwe-22.04 (6.2.0.27.27) で (6.2.0.26.26 に) 上書き展開しています ...
.../28-linux-image-generic-hwe-22.04_6.2.0.27.27_amd64.deb を展開する準備をしています ...
linux-image-generic-hwe-22.04 (6.2.0.27.27) で (6.2.0.26.26 に) 上書き展開しています ...
以前に未選択のパッケージ linux-headers-6.2.0-27 を選択しています。
.../29-linux-headers-6.2.0-27_6.2.0-27.28_all.deb を展開する準備をしています ...
linux-headers-6.2.0-27 (6.2.0-27.28) を展開しています...
以前に未選択のパッケージ linux-headers-6.2.0-27-generic を選択しています。
.../30-linux-headers-6.2.0-27-generic_6.2.0-27.28_amd64.deb を展開する準備をしています ...
linux-headers-6.2.0-27-generic (6.2.0-27.28) を展開しています...
.../31-linux-headers-generic-hwe-22.04_6.2.0.27.27_amd64.deb を展開する準備をしています ...
linux-headers-generic-hwe-22.04 (6.2.0.27.27) で (6.2.0.26.26 に) 上書き展開しています ...
.../32-linux-libc-dev_6.2.0-27.28_amd64.deb を展開する準備をしています ...
linux-libc-dev:amd64 (6.2.0-27.28) で (6.2.0-26.26 に) 上書き展開しています ...
microsoft-edge-stable (115.0.1901.203-1) を設定しています ...
linux-headers-6.2.0-27 (6.2.0-27.28) を設定しています ...
linux-firmware (20230323.gitbcdcfbcf-0ubuntu1.5) を設定しています ...
update-initramfs: Generating /boot/initrd.img-6.2.0-26-generic
update-initramfs: Generating /boot/initrd.img-6.2.0-25-generic
linux-modules-6.2.0-27-generic (6.2.0-27.28) を設定しています ...
linux-headers-6.2.0-27-generic (6.2.0-27.28) を設定しています ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 6.2.0-27-generic
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der
applying patch disable_fstack-clash-protection_fcf-protection.patch...patching file Kbuild
Hunk #1 succeeded at 122 (offset 51 lines).


Building module:
Cleaning build area...
unset ARCH; [ ! -h /usr/bin/cc ] && export CC=/usr/bin/gcc; env NV_VERBOSE=1 'make' -j8 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=6.2.0-27-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MI
SMATCH=1 SYSSRC=/lib/modules/6.2.0-27-generic/build LD=/usr/bin/ld.bfd modules...........
Signing module /var/lib/dkms/nvidia/530.30.02/build/nvidia.ko
Signing module /var/lib/dkms/nvidia/530.30.02/build/nvidia-modeset.ko
Signing module /var/lib/dkms/nvidia/530.30.02/build/nvidia-drm.ko
Signing module /var/lib/dkms/nvidia/530.30.02/build/nvidia-peermem.ko
Signing module /var/lib/dkms/nvidia/530.30.02/build/nvidia-uvm.ko
Cleaning build area...

nvidia.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.2.0-27-generic/updates/dkms/

nvidia-modeset.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.2.0-27-generic/updates/dkms/

nvidia-drm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.2.0-27-generic/updates/dkms/

nvidia-peermem.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.2.0-27-generic/updates/dkms/

nvidia-uvm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.2.0-27-generic/updates/dkms/
depmod...
dkms autoinstall on 6.2.0-27-generic/x86_64 succeeded for nvidia
   ...done.
linux-modules-extra-6.2.0-27-generic (6.2.0-27.28) を設定しています ...
hplip-data (3.22.10+dfsg0-1ubuntu1) を設定しています ...
linux-libc-dev:amd64 (6.2.0-27.28) を設定しています ...
samba-common (2:4.17.7+dfsg-1ubuntu2) を設定しています ...
printer-driver-postscript-hp (3.22.10+dfsg0-1ubuntu1) を設定しています ...
libwbclient0:amd64 (2:4.17.7+dfsg-1ubuntu2) を設定しています ...
samba-ad-provision (2:4.17.7+dfsg-1ubuntu2) を設定しています ...
libldb2:amd64 (2:2.6.2+samba4.17.7+dfsg-1ubuntu2) を設定しています ...
linux-headers-generic-hwe-22.04 (6.2.0.27.27) を設定しています ...
libhpmud0:amd64 (3.22.10+dfsg0-1ubuntu1) を設定しています ...
libsane-hpaio:amd64 (3.22.10+dfsg0-1ubuntu1) を設定しています ...
fonts-opensymbol (4:102.12+LibO7.5.5-0ubuntu0.23.04.1) を設定しています ...
initramfs-tools-bin (0.142ubuntu2.2) を設定しています ...
linux-image-6.2.0-27-generic (6.2.0-27.28) を設定しています ...
I: /boot/vmlinuz.old is now a symlink to vmlinuz-6.2.0-26-generic
I: /boot/initrd.img.old is now a symlink to initrd.img-6.2.0-26-generic
I: /boot/vmlinuz is now a symlink to vmlinuz-6.2.0-27-generic
I: /boot/initrd.img is now a symlink to initrd.img-6.2.0-27-generic
samba-libs:amd64 (2:4.17.7+dfsg-1ubuntu2) を設定しています ...
python3-ldb (2:2.6.2+samba4.17.7+dfsg-1ubuntu2) を設定しています ...
libsmbclient:amd64 (2:4.17.7+dfsg-1ubuntu2) を設定しています ...
printer-driver-hpcups (3.22.10+dfsg0-1ubuntu1) を設定しています ...
samba-dsdb-modules:amd64 (2:4.17.7+dfsg-1ubuntu2) を設定しています ...
initramfs-tools-core (0.142ubuntu2.2) を設定しています ...
python3-samba (2:4.17.7+dfsg-1ubuntu2) を設定しています ...
hplip (3.22.10+dfsg0-1ubuntu1) を設定しています ...
Creating/updating hplip user account...
linux-image-generic-hwe-22.04 (6.2.0.27.27) を設定しています ...
linux-generic-hwe-22.04 (6.2.0.27.27) を設定しています ...
initramfs-tools (0.142ubuntu2.2) を設定しています ...
update-initramfs: deferring update (trigger activated)
samba-vfs-modules:amd64 (2:4.17.7+dfsg-1ubuntu2) を設定しています ...
samba-common-bin (2:4.17.7+dfsg-1ubuntu2) を設定しています ...
samba (2:4.17.7+dfsg-1ubuntu2) を設定しています ...
desktop-file-utils (0.26-1ubuntu5) のトリガを処理しています ...
cups (2.4.2-3ubuntu2.2) のトリガを処理しています ...
Updating PPD files for hpcups ...
Updating PPD files for postscript-hp ...
gnome-menus (3.36.0-1.1ubuntu1) のトリガを処理しています ...
libc-bin (2.37-0ubuntu2) のトリガを処理しています ...
ufw (0.36.1-4.1ubuntu0.1) のトリガを処理しています ...
man-db (2.11.2-1) のトリガを処理しています ...
dbus (1.14.4-1ubuntu1) のトリガを処理しています ...
mailcap (3.70+nmu1ubuntu1) のトリガを処理しています ...
fontconfig (2.14.1-3ubuntu3) のトリガを処理しています ...
linux-image-6.2.0-27-generic (6.2.0-27.28) のトリガを処理しています ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 6.2.0-27-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.2.0-27-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.2.0-27-generic
Found initrd image: /boot/initrd.img-6.2.0-27-generic
Found linux image: /boot/vmlinuz-6.2.0-26-generic
Found initrd image: /boot/initrd.img-6.2.0-26-generic
Found linux image: /boot/vmlinuz-6.2.0-25-generic
Found initrd image: /boot/initrd.img-6.2.0-25-generic
Found memtest86+ 64bit EFI image: /boot/memtest86+x64.efi
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
initramfs-tools (0.142ubuntu2.2) のトリガを処理しています ...
update-initramfs: Generating /boot/initrd.img-6.2.0-27-generic
余計なもの削除

~$ sudo apt autoremove

パッケージリストを読み込んでいます... 完了

依存関係ツリーを作成しています... 完了        

状態情報を読み取っています... 完了        

以下のパッケージは「削除」されます:

  linux-headers-6.2.0-25 linux-headers-6.2.0-25-generic linux-image-6.2.0-25-generic linux-modules-6.2.0-25-generic linux-modules-extra-6.2.0-25-generic

アップグレード: 0 個、新規インストール: 0 個、削除: 5 個、保留: 1 個。

この操作後に 874 MB のディスク容量が解放されます。

続行しますか? [Y/n] y

(データベースを読み込んでいます ... 現在 244305 個のファイルとディレクトリがインストールされています。)

linux-headers-6.2.0-25-generic (6.2.0-25.25) を削除しています ...

linux-headers-6.2.0-25 (6.2.0-25.25) を削除しています ...

linux-image-6.2.0-25-generic (6.2.0-25.25) を削除しています ...

/etc/kernel/prerm.d/dkms:

dkms: removing: nvidia 530.30.02 (6.2.0-25-generic) (x86_64)

Module nvidia-530.30.02 for kernel 6.2.0-25-generic (x86_64).

Before uninstall, this module version was ACTIVE on this kernel.


nvidia.ko:

 - Uninstallation

   - Deleting from: /lib/modules/6.2.0-25-generic/updates/dkms/

 - Original module

   - No original module was found for this module on this kernel.

   - Use the dkms install command to reinstall any previous module version.


nvidia-modeset.ko:

 - Uninstallation

   - Deleting from: /lib/modules/6.2.0-25-generic/updates/dkms/

 - Original module

   - No original module was found for this module on this kernel.

   - Use the dkms install command to reinstall any previous module version.


nvidia-drm.ko:

 - Uninstallation

   - Deleting from: /lib/modules/6.2.0-25-generic/updates/dkms/

 - Original module

   - No original module was found for this module on this kernel.

   - Use the dkms install command to reinstall any previous module version.


nvidia-peermem.ko:

 - Uninstallation

   - Deleting from: /lib/modules/6.2.0-25-generic/updates/dkms/

 - Original module

   - No original module was found for this module on this kernel.

   - Use the dkms install command to reinstall any previous module version.


nvidia-uvm.ko:

 - Uninstallation

   - Deleting from: /lib/modules/6.2.0-25-generic/updates/dkms/

 - Original module

   - No original module was found for this module on this kernel.

   - Use the dkms install command to reinstall any previous module version.

depmod...

/etc/kernel/postrm.d/initramfs-tools:

update-initramfs: Deleting /boot/initrd.img-6.2.0-25-generic

/etc/kernel/postrm.d/zz-update-grub:

Sourcing file `/etc/default/grub'

Sourcing file `/etc/default/grub.d/init-select.cfg'

Generating grub configuration file ...

Found linux image: /boot/vmlinuz-6.2.0-27-generic

Found initrd image: /boot/initrd.img-6.2.0-27-generic

Found linux image: /boot/vmlinuz-6.2.0-26-generic

Found initrd image: /boot/initrd.img-6.2.0-26-generic

Found memtest86+ 64bit EFI image: /boot/memtest86+x64.efi

Warning: os-prober will not be executed to detect other bootable partitions.

Systems on them will not be added to the GRUB boot configuration.

Check GRUB_DISABLE_OS_PROBER documentation entry.

Adding boot menu entry for UEFI Firmware Settings ...

done

linux-modules-extra-6.2.0-25-generic (6.2.0-25.25) を削除しています ...

linux-modules-6.2.0-25-generic (6.2.0-25.25) を削除しています ...

保留になってるものを手動でupgrade

~$ sudo apt upgrade cloud-init

パッケージリストを読み込んでいます... 完了

依存関係ツリーを作成しています... 完了        

状態情報を読み取っています... 完了        

アップグレードパッケージを検出しています... 完了

#

# You can verify the status of security fixes using the `pro fix` command.

# E.g., a recent Ruby vulnerability can be checked with: `pro fix USN-6219-1`

# For more detail see: https://ubuntu.com/security/notices/USN-6219-1

#

以下のパッケージはアップグレードされます:

  cloud-init

アップグレード: 1 個、新規インストール: 0 個、削除: 0 個、保留: 0 個。

563 kB のアーカイブを取得する必要があります。

この操作後に追加で 0 B のディスク容量が消費されます。

続行しますか? [Y/n] y

取得:1 http://jp.archive.ubuntu.com/ubuntu lunar-updates/main amd64 cloud-init all 23.2.2-0ubuntu0~23.04.1 [563 kB]

563 kB を 1秒 で取得しました (376 kB/s)

パッケージを事前設定しています ...

(データベースを読み込んでいます ... 現在 207426 個のファイルとディレクトリがインストールされています。)

.../cloud-init_23.2.2-0ubuntu0~23.04.1_all.deb を展開する準備をしています ...

cloud-init (23.2.2-0ubuntu0~23.04.1) で (23.2.1-0ubuntu0~23.04.1 に) 上書き展開しています ...

cloud-init (23.2.2-0ubuntu0~23.04.1) を設定しています ...

man-db (2.11.2-1) のトリガを処理しています ...

rsyslog (8.2302.0-1ubuntu3) のトリガを処理しています ...

本家手順に従って作業

~$ sudo apt install wget git python3 python3-venv

パッケージリストを読み込んでいます... 完了

依存関係ツリーを作成しています... 完了        

状態情報を読み取っています... 完了        

wget はすでに最新バージョン (1.21.3-1ubuntu1) です。

git はすでに最新バージョン (1:2.39.2-1ubuntu1.1) です。

python3 はすでに最新バージョン (3.11.2-1) です。

python3-venv はすでに最新バージョン (3.11.2-1) です。

アップグレード: 0 個、新規インストール: 0 個、削除: 0 個、保留: 0 個。

~$ bash <(wget -qO- https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh)


################################################################

Install script for stable-diffusion + Web UI

Tested on Debian 11 (Bullseye)

################################################################


################################################################

Running on kmd user

################################################################


################################################################

Clone stable-diffusion-webui

################################################################

fatal: could not create work tree dir 'stable-diffusion-webui': そのようなファイルやディレクトリはありません

/dev/fd/63: 191 行: cd: stable-diffusion-webui/: そのようなファイルやディレクトリはありません
ERROR: Can't cd to /dev/fd/stable-diffusion-webui/, aborting...

エラーでた。
本家の用意してくれてるシェルスクリプト内でのエラーなので中身見てみる。

https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh

該当箇所発見

cd "${install_dir}"/ || { printf "\e[1m\e[31mERROR: Can't cd to %s/, aborting...\e[0m" "${install_dir}"; exit 1; }

if [[ -d "${clone_dir}" ]]

then

    cd "${clone_dir}"/ || { printf "\e[1m\e[31mERROR: Can't cd to %s/%s/, aborting...\e[0m" "${install_dir}" "${clone_dir}"; exit 1; }

else

    printf "\n%s\n" "${delimiter}"

    printf "Clone stable-diffusion-webui"

    printf "\n%s\n" "${delimiter}"

    "${GIT}" clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git "${clone_dir}"


cd "${clone_dir}"/ || { printf "\e[1m\e[31mERROR: Can't cd to %s/%s/, aborting...\e[0m" "${install_dir}" "${clone_dir}"; exit 1; }

fi

191行目ってことはelseの最後のコレ

"${GIT}" clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git "${clone_dir}"cd "${clone_dir}"/ || { printf "\e[1m\e[31mERROR: Can't cd to %s/%s/, aborting...\e[0m" "${install_dir}" "${clone_dir}"; exit 1; }

git cloneしてその中に入ろうとしたら入れないということはclone失敗してそう。

このスクリプト上から順番に実行していけば解決できそうだけど面倒なのでググってみたらissue上がってました。

[Bug]: could not create work tree dir 'stable-diffusion-webui': No such file or directory · Issue #12092 · AUTOMATIC1111/stable-diffusion-webui · GitHub

  • 1.5.1のリリース 2023/07/27 03:04 PM
  • このIssue 起票 2023/07/27 04:37 PM

ということで最新1.5.1に含まれたバグっぽく、さらに

  • 2023/8/11 10:24時点でのmaster 68f336b
  • 1.5.1のリリース 68f336b

で修正はまだされてなさそうなのでissueでの対応方法は

  • 手動でgit cloneすれば動いた
  • スクリプトをwgetしてローカルで実行すれば動いた

で、後者が多数派だったのでやってみます。

~$ wget -qO webui.sh https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh

~$ bash webui.sh


################################################################

Install script for stable-diffusion + Web UI

Tested on Debian 11 (Bullseye)

################################################################


################################################################

Running on kmd user

################################################################


################################################################

Clone stable-diffusion-webui

################################################################

Cloning into 'stable-diffusion-webui'...

remote: Enumerating objects: 25448, done.

remote: Counting objects: 100% (1001/1001), done.

remote: Compressing objects: 100% (503/503), done.

remote: Total 25448 (delta 666), reused 764 (delta 489), pack-reused 24447

Receiving objects: 100% (25448/25448), 31.60 MiB | 22.93 MiB/s, done.

Resolving deltas: 100% (17786/17786), done.


################################################################

Create and activate python venv

################################################################


################################################################

Launching launch.py...

################################################################

Cannot locate TCMalloc (improves CPU memory usage)

Python 3.11.4 (main, Jun  9 2023, 07:59:55) [GCC 12.3.0]

Version: v1.5.1

Commit hash: 68f336bd994bed5442ad95bad6b6ad5564a5409a

Installing torch and torchvision

Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu118

Collecting torch==2.0.1

  Using cached https://download.pytorch.org/whl/cu118/torch-2.0.1%2Bcu118-cp311-cp311-linux_x86_64.whl (2267.3 MB)

Collecting torchvision==0.15.2

  Using cached https://download.pytorch.org/whl/cu118/torchvision-0.15.2%2Bcu118-cp311-cp311-linux_x86_64.whl (6.1 MB)

Collecting filelock

  Downloading filelock-3.12.2-py3-none-any.whl (10 kB)

Collecting typing-extensions

  Downloading typing_extensions-4.7.1-py3-none-any.whl (33 kB)

Collecting sympy

  Using cached sympy-1.12-py3-none-any.whl (5.7 MB)

Collecting networkx

  Using cached networkx-3.1-py3-none-any.whl (2.1 MB)

Collecting jinja2

  Using cached https://download.pytorch.org/whl/Jinja2-3.1.2-py3-none-any.whl (133 kB)

Collecting triton==2.0.0

  Using cached https://download.pytorch.org/whl/triton-2.0.0-1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (63.3 MB)

Collecting numpy

  Downloading numpy-1.25.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.2/18.2 MB 34.6 MB/s eta 0:00:00

Collecting requests

  Downloading requests-2.31.0-py3-none-any.whl (62 kB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB 16.4 MB/s eta 0:00:00

Collecting pillow!=8.3.*,>=5.3.0

  Downloading Pillow-10.0.0-cp311-cp311-manylinux_2_28_x86_64.whl (3.4 MB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/3.4 MB 24.4 MB/s eta 0:00:00

Collecting cmake

  Downloading cmake-3.27.1-py2.py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (26.0 MB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 26.0/26.0 MB 38.1 MB/s eta 0:00:00

Collecting lit

  Downloading lit-16.0.6.tar.gz (153 kB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 153.7/153.7 kB 35.8 MB/s eta 0:00:00

  Installing build dependencies ... done

  Getting requirements to build wheel ... done

  Installing backend dependencies ... done

  Preparing metadata (pyproject.toml) ... done

Collecting MarkupSafe>=2.0

  Downloading MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (28 kB)

Collecting charset-normalizer<4,>=2

  Downloading charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (199 kB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 199.6/199.6 kB 11.3 MB/s eta 0:00:00

Collecting idna<4,>=2.5

  Using cached https://download.pytorch.org/whl/idna-3.4-py3-none-any.whl (61 kB)

Collecting urllib3<3,>=1.21.1

  Downloading urllib3-2.0.4-py3-none-any.whl (123 kB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.9/123.9 kB 54.4 MB/s eta 0:00:00

Collecting certifi>=2017.4.17

  Downloading certifi-2023.7.22-py3-none-any.whl (158 kB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 158.3/158.3 kB 55.8 MB/s eta 0:00:00

Collecting mpmath>=0.19

  Using cached mpmath-1.3.0-py3-none-any.whl (536 kB)

Building wheels for collected packages: lit

  Building wheel for lit (pyproject.toml) ... done

  Created wheel for lit: filename=lit-16.0.6-py3-none-any.whl size=93583 sha256=e17b5887e5c50c31e4a14ae5f5ef916ef99cf63e219bba21c0aade8c72267e4b

  Stored in directory: /home/kmd/.cache/pip/wheels/ab/84/e4/5af8c76af9e5bee472e825f1451c18bb3b261d80a7b3ec7f8a

Successfully built lit

Installing collected packages: mpmath, lit, cmake, urllib3, typing-extensions, sympy, pillow, numpy, networkx, MarkupSafe, idna, filelock, charset-normalizer, certifi, requests, jinja2, triton, torch, torchvision

Successfully installed MarkupSafe-2.1.3 certifi-2023.7.22 charset-normalizer-3.2.0 cmake-3.27.1 filelock-3.12.2 idna-3.4 jinja2-3.1.2 lit-16.0.6 mpmath-1.3.0 networkx-3.1 numpy-1.25.2 pillow-10.0.0 requests-2.31.0 sympy-1.12 torch-2.0.1+cu118 torchvision-0.15.2+cu118 triton-2.0.0 typing-extensions-4.7.1 urllib3-2.0.4

Installing gfpgan

Installing clip

Installing open_clip

Cloning Stable Diffusion into /home/kmd/stable-diffusion-webui/repositories/stable-diffusion-stability-ai...

Cloning into '/home/kmd/stable-diffusion-webui/repositories/stable-diffusion-stability-ai'...

remote: Enumerating objects: 574, done.

remote: Counting objects: 100% (304/304), done.

remote: Compressing objects: 100% (86/86), done.

remote: Total 574 (delta 244), reused 218 (delta 218), pack-reused 270

Receiving objects: 100% (574/574), 73.43 MiB | 22.68 MiB/s, done.

Resolving deltas: 100% (276/276), done.

Cloning Stable Diffusion XL into /home/kmd/stable-diffusion-webui/repositories/generative-models...

Cloning into '/home/kmd/stable-diffusion-webui/repositories/generative-models'...

remote: Enumerating objects: 644, done.

remote: Counting objects: 100% (467/467), done.

remote: Compressing objects: 100% (263/263), done.

remote: Total 644 (delta 283), reused 316 (delta 195), pack-reused 177

Receiving objects: 100% (644/644), 22.31 MiB | 22.71 MiB/s, done.

Resolving deltas: 100% (321/321), done.

Cloning K-diffusion into /home/kmd/stable-diffusion-webui/repositories/k-diffusion...

Cloning into '/home/kmd/stable-diffusion-webui/repositories/k-diffusion'...

remote: Enumerating objects: 735, done.

remote: Counting objects: 100% (11/11), done.

remote: Compressing objects: 100% (7/7), done.

remote: Total 735 (delta 4), reused 6 (delta 4), pack-reused 724

Receiving objects: 100% (735/735), 143.59 KiB | 8.97 MiB/s, done.

Resolving deltas: 100% (482/482), done.

Cloning CodeFormer into /home/kmd/stable-diffusion-webui/repositories/CodeFormer...

Cloning into '/home/kmd/stable-diffusion-webui/repositories/CodeFormer'...

remote: Enumerating objects: 594, done.

remote: Counting objects: 100% (245/245), done.

remote: Compressing objects: 100% (98/98), done.

remote: Total 594 (delta 176), reused 167 (delta 147), pack-reused 349

Receiving objects: 100% (594/594), 17.31 MiB | 21.61 MiB/s, done.

Resolving deltas: 100% (287/287), done.

Cloning BLIP into /home/kmd/stable-diffusion-webui/repositories/BLIP...

Cloning into '/home/kmd/stable-diffusion-webui/repositories/BLIP'...

remote: Enumerating objects: 277, done.

remote: Counting objects: 100% (165/165), done.

remote: Compressing objects: 100% (30/30), done.

remote: Total 277 (delta 137), reused 136 (delta 135), pack-reused 112

Receiving objects: 100% (277/277), 7.03 MiB | 30.39 MiB/s, done.

Resolving deltas: 100% (153/153), done.

Installing requirements for CodeFormer

Installing requirements

Launching Web UI with arguments: 

no module 'xformers'. Processing without...

no module 'xformers'. Processing without...

No module 'xformers'. Proceeding without it.

Downloading: "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors" to /home/kmd/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned-emaonly.safetensors


100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.97G/3.97G [01:23<00:00, 51.3MB/s]

Calculating sha256 for /home/kmd/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned-emaonly.safetensors: Running on local URL:  http://127.0.0.1:7860


To create a public link, set `share=True` in `launch()`.

Startup time: 203.5s (launcher: 117.0s, import torch: 1.3s, import gradio: 0.3s, setup paths: 0.4s, other imports: 0.4s, list SD models: 83.5s, load scripts: 0.2s, create ui: 0.3s).

6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa

Loading weights [6ce0161689] from /home/kmd/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned-emaonly.safetensors

Creating model from config: /home/kmd/stable-diffusion-webui/configs/v1-inference.yaml

LatentDiffusion: Running in eps-prediction mode

DiffusionWrapper has 859.52 M params.

Applying attention optimization: Doggettx... done.

Model loaded in 3.9s (calculate hash: 2.6s, load weights from disk: 0.1s, create model: 0.3s, apply weights to model: 0.4s, apply half(): 0.2s, move model to device: 0.2s).

無事起動しました。

初期状態だと色々足りないし他PCからアクセスできないしまだやること多いけどそれは次回。

コメント