ComfyUI SDWebUI升级pytorch随记

目前使用的版本是去年10月的1.6版本,有点老。希望支持新的特性,于是乎开始作死。从升级torch开始。先看看已有的版本:

(venv) root@ubuntu-sd-server:~# pip show torch
Name: torch
Version: 2.0.1
Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration
Home-page: https://pytorch.org/
Author: PyTorch Team
Author-email: packages@pytorch.org
License: BSD-3
Location: /root/sd-webui-aki-v4.4/venv/lib/python3.10/site-packages
Requires: filelock, jinja2, networkx, nvidia-cublas-cu11, nvidia-cuda-cupti-cu11, nvidia-cuda-nvrtc-cu11, nvidia-cuda-runtime-cu11, nvidia-cudnn-cu11, nvidia-cufft-cu11, nvidia-curand-cu11, nvidia-cusolver-cu11, nvidia-cusparse-cu11, nvidia-nccl-cu11, nvidia-nvtx-cu11, sympy, triton, typing-extensions
Required-by: accelerate, basicsr, clean-fid, clip, controlnet-aux, facexlib, gfpgan, invisible-watermark, kornia, lpips, open-clip-torch, pytorch-lightning, realesrgan, thop, timm, tomesd, torchdiffeq, torchmetrics, torchsde, torchvision, triton, ultralytics, xformers

然后开始升级最新的2.1.1。幸好空间留的大,升级把一堆相关的都升上去了,好家伙,一下干了快3个G。

(venv) root@ubuntu-sd-server:~# pip install --upgrade torch torchvision
Looking in indexes: https://pypi.doubanio.com/simple
Requirement already satisfied: torch in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (2.0.1)
Collecting torch
  Downloading https://mirrors.cloud.tencent.com/pypi/packages/a7/ad/fbe7d4cffb76da4e478438853b51305361c719cff929ab70a808e7fb75e7/torch-2.2.1-cp310-cp310-manylinux1_x86_64.whl (755.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 755.5/755.5 MB 735.0 kB/s eta 0:00:00
Requirement already satisfied: torchvision in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (0.15.2)
Collecting torchvision
  Downloading https://mirrors.cloud.tencent.com/pypi/packages/1a/e8/13432ae6be567b577a4c89d1bd50084e4d989b379a7be8050380b5ab3a6e/torchvision-0.17.1-cp310-cp310-manylinux1_x86_64.whl (6.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.9/6.9 MB 4.2 MB/s eta 0:00:00
Requirement already satisfied: filelock in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch) (3.12.4)
Requirement already satisfied: typing-extensions>=4.8.0 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch) (4.8.0)
Requirement already satisfied: sympy in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch) (1.12)
Requirement already satisfied: networkx in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch) (3.1)
Requirement already satisfied: jinja2 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch) (3.1.2)
Requirement already satisfied: fsspec in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch) (2023.9.2)
Collecting nvidia-cuda-nvrtc-cu12==12.1.105 (from torch)
  Downloading https://mirrors.cloud.tencent.com/pypi/packages/b6/9f/c64c03f49d6fbc56196664d05dba14e3a561038a81a638eeb47f4d4cfd48/nvidia_cuda_nvrtc_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (23.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 23.7/23.7 MB 5.5 MB/s eta 0:00:00
Collecting nvidia-cuda-runtime-cu12==12.1.105 (from torch)
  Downloading https://mirrors.cloud.tencent.com/pypi/packages/eb/d5/c68b1d2cdfcc59e72e8a5949a37ddb22ae6cade80cd4a57a84d4c8b55472/nvidia_cuda_runtime_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (823 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 823.6/823.6 kB 6.4 MB/s eta 0:00:00
Collecting nvidia-cuda-cupti-cu12==12.1.105 (from torch)
  Downloading https://mirrors.cloud.tencent.com/pypi/packages/7e/00/6b218edd739ecfc60524e585ba8e6b00554dd908de2c9c66c1af3e44e18d/nvidia_cuda_cupti_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (14.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.1/14.1 MB 5.8 MB/s eta 0:00:00
Collecting nvidia-cudnn-cu12==8.9.2.26 (from torch)
  Downloading https://mirrors.cloud.tencent.com/pypi/packages/ff/74/a2e2be7fb83aaedec84f391f082cf765dfb635e7caa9b49065f73e4835d8/nvidia_cudnn_cu12-8.9.2.26-py3-none-manylinux1_x86_64.whl (731.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 731.7/731.7 MB 825.3 kB/s eta 0:00:00
Collecting nvidia-cublas-cu12==12.1.3.1 (from torch)
  Downloading https://mirrors.cloud.tencent.com/pypi/packages/37/6d/121efd7382d5b0284239f4ab1fc1590d86d34ed4a4a2fdb13b30ca8e5740/nvidia_cublas_cu12-12.1.3.1-py3-none-manylinux1_x86_64.whl (410.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 410.6/410.6 MB 1.1 MB/s eta 0:00:00
Collecting nvidia-cufft-cu12==11.0.2.54 (from torch)
  Downloading https://mirrors.cloud.tencent.com/pypi/packages/86/94/eb540db023ce1d162e7bea9f8f5aa781d57c65aed513c33ee9a5123ead4d/nvidia_cufft_cu12-11.0.2.54-py3-none-manylinux1_x86_64.whl (121.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 121.6/121.6 MB 3.7 MB/s eta 0:00:00
Collecting nvidia-curand-cu12==10.3.2.106 (from torch)
  Downloading https://mirrors.cloud.tencent.com/pypi/packages/44/31/4890b1c9abc496303412947fc7dcea3d14861720642b49e8ceed89636705/nvidia_curand_cu12-10.3.2.106-py3-none-manylinux1_x86_64.whl (56.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.5/56.5 MB 5.8 MB/s eta 0:00:00
Collecting nvidia-cusolver-cu12==11.4.5.107 (from torch)
  Downloading https://mirrors.cloud.tencent.com/pypi/packages/bc/1d/8de1e5c67099015c834315e333911273a8c6aaba78923dd1d1e25fc5f217/nvidia_cusolver_cu12-11.4.5.107-py3-none-manylinux1_x86_64.whl (124.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 124.2/124.2 MB 3.0 MB/s eta 0:00:00
Collecting nvidia-cusparse-cu12==12.1.0.106 (from torch)
  Downloading https://mirrors.cloud.tencent.com/pypi/packages/65/5b/cfaeebf25cd9fdec14338ccb16f6b2c4c7fa9163aefcf057d86b9cc248bb/nvidia_cusparse_cu12-12.1.0.106-py3-none-manylinux1_x86_64.whl (196.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 196.0/196.0 MB 2.3 MB/s eta 0:00:00
Collecting nvidia-nccl-cu12==2.19.3 (from torch)
  Downloading https://mirrors.cloud.tencent.com/pypi/packages/38/00/d0d4e48aef772ad5aebcf70b73028f88db6e5640b36c38e90445b7a57c45/nvidia_nccl_cu12-2.19.3-py3-none-manylinux1_x86_64.whl (166.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 166.0/166.0 MB 2.6 MB/s eta 0:00:00
Collecting nvidia-nvtx-cu12==12.1.105 (from torch)
  Downloading https://mirrors.cloud.tencent.com/pypi/packages/da/d3/8057f0587683ed2fcd4dbfbdfdfa807b9160b809976099d36b8f60d08f03/nvidia_nvtx_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (99 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 99.1/99.1 kB 15.3 MB/s eta 0:00:00
Collecting triton==2.2.0 (from torch)
  Downloading https://mirrors.cloud.tencent.com/pypi/packages/95/05/ed974ce87fe8c8843855daa2136b3409ee1c126707ab54a8b72815c08b49/triton-2.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (167.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 167.9/167.9 MB 2.4 MB/s eta 0:00:00
Collecting nvidia-nvjitlink-cu12 (from nvidia-cusolver-cu12==11.4.5.107->torch)
  Downloading https://mirrors.cloud.tencent.com/pypi/packages/58/d1/d1c80553f9d5d07b6072bc132607d75a0ef3600e28e1890e11c0f55d7346/nvidia_nvjitlink_cu12-12.4.99-py3-none-manylinux2014_x86_64.whl (21.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 21.1/21.1 MB 5.8 MB/s eta 0:00:00
Requirement already satisfied: numpy in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torchvision) (1.23.5)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torchvision) (9.5.0)
Requirement already satisfied: MarkupSafe>=2.0 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from jinja2->torch) (2.1.3)
Requirement already satisfied: mpmath>=0.19 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from sympy->torch) (1.3.0)
DEPRECATION: torchsde 0.2.5 has a non-standard dependency specifier numpy>=1.19.*; python_version >= "3.7". pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of torchsde or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
Installing collected packages: triton, nvidia-nvtx-cu12, nvidia-nvjitlink-cu12, nvidia-nccl-cu12, nvidia-curand-cu12, nvidia-cufft-cu12, nvidia-cuda-runtime-cu12, nvidia-cuda-nvrtc-cu12, nvidia-cuda-cupti-cu12, nvidia-cublas-cu12, nvidia-cusparse-cu12, nvidia-cudnn-cu12, nvidia-cusolver-cu12, torch, torchvision
  Attempting uninstall: triton
    Found existing installation: triton 2.0.0
    Uninstalling triton-2.0.0:
      Successfully uninstalled triton-2.0.0
  Attempting uninstall: torch
    Found existing installation: torch 2.0.1
    Uninstalling torch-2.0.1:
      Successfully uninstalled torch-2.0.1
  Attempting uninstall: torchvision
    Found existing installation: torchvision 0.15.2
    Uninstalling torchvision-0.15.2:
      Successfully uninstalled torchvision-0.15.2
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
xformers 0.0.20 requires pyre-extensions==0.0.29, which is not installed.
xformers 0.0.20 requires torch==2.0.1, but you have torch 2.2.1 which is incompatible.
Successfully installed nvidia-cublas-cu12-12.1.3.1 nvidia-cuda-cupti-cu12-12.1.105 nvidia-cuda-nvrtc-cu12-12.1.105 nvidia-cuda-runtime-cu12-12.1.105 nvidia-cudnn-cu12-8.9.2.26 nvidia-cufft-cu12-11.0.2.54 nvidia-curand-cu12-10.3.2.106 nvidia-cusolver-cu12-11.4.5.107 nvidia-cusparse-cu12-12.1.0.106 nvidia-nccl-cu12-2.19.3 nvidia-nvjitlink-cu12-12.4.99 nvidia-nvtx-cu12-12.1.105 torch-2.2.1 torchvision-0.17.1 triton-2.2.0

最后还ERROR了,友善的告诉我,xformers要挂了(之前为了节约内存和加速安装了xformers,看了下,最新的版本正好支持torch 2.2.1,于是顺便把xformers也升级了:

(venv) root@ubuntu-sd-server:~# pip install --upgrade xformers
Looking in indexes: https://pypi.doubanio.com/simple
Requirement already satisfied: xformers in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (0.0.20)
Collecting xformers
  Downloading https://mirrors.cloud.tencent.com/pypi/packages/81/29/df65a2933a6a9acf19a90e0aef74b0bc69635bbe890204d5d03e7d89c85d/xformers-0.0.25-cp310-cp310-manylinux2014_x86_64.whl (222.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 222.5/222.5 MB 1.6 MB/s eta 0:00:00
Requirement already satisfied: numpy in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from xformers) (1.23.5)
Requirement already satisfied: torch==2.2.1 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from xformers) (2.2.1)
Requirement already satisfied: filelock in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch==2.2.1->xformers) (3.12.4)
Requirement already satisfied: typing-extensions>=4.8.0 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch==2.2.1->xformers) (4.8.0)
Requirement already satisfied: sympy in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch==2.2.1->xformers) (1.12)
Requirement already satisfied: networkx in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch==2.2.1->xformers) (3.1)
Requirement already satisfied: jinja2 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch==2.2.1->xformers) (3.1.2)
Requirement already satisfied: fsspec in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch==2.2.1->xformers) (2023.9.2)
Requirement already satisfied: nvidia-cuda-nvrtc-cu12==12.1.105 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch==2.2.1->xformers) (12.1.105)
Requirement already satisfied: nvidia-cuda-runtime-cu12==12.1.105 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch==2.2.1->xformers) (12.1.105)
Requirement already satisfied: nvidia-cuda-cupti-cu12==12.1.105 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch==2.2.1->xformers) (12.1.105)
Requirement already satisfied: nvidia-cudnn-cu12==8.9.2.26 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch==2.2.1->xformers) (8.9.2.26)
Requirement already satisfied: nvidia-cublas-cu12==12.1.3.1 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch==2.2.1->xformers) (12.1.3.1)
Requirement already satisfied: nvidia-cufft-cu12==11.0.2.54 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch==2.2.1->xformers) (11.0.2.54)
Requirement already satisfied: nvidia-curand-cu12==10.3.2.106 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch==2.2.1->xformers) (10.3.2.106)
Requirement already satisfied: nvidia-cusolver-cu12==11.4.5.107 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch==2.2.1->xformers) (11.4.5.107)
Requirement already satisfied: nvidia-cusparse-cu12==12.1.0.106 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch==2.2.1->xformers) (12.1.0.106)
Requirement already satisfied: nvidia-nccl-cu12==2.19.3 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch==2.2.1->xformers) (2.19.3)
Requirement already satisfied: nvidia-nvtx-cu12==12.1.105 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch==2.2.1->xformers) (12.1.105)
Requirement already satisfied: triton==2.2.0 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from torch==2.2.1->xformers) (2.2.0)
Requirement already satisfied: nvidia-nvjitlink-cu12 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from nvidia-cusolver-cu12==11.4.5.107->torch==2.2.1->xformers) (12.4.99)
Requirement already satisfied: MarkupSafe>=2.0 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from jinja2->torch==2.2.1->xformers) (2.1.3)
Requirement already satisfied: mpmath>=0.19 in ./sd-webui-aki-v4.4/venv/lib/python3.10/site-packages (from sympy->torch==2.2.1->xformers) (1.3.0)
DEPRECATION: torchsde 0.2.5 has a non-standard dependency specifier numpy>=1.19.*; python_version >= "3.7". pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of torchsde or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
Installing collected packages: xformers
  Attempting uninstall: xformers
    Found existing installation: xformers 0.0.20
    Uninstalling xformers-0.0.20:
      Successfully uninstalled xformers-0.0.20
Successfully installed xformers-0.0.25

又干去222M。。

还有个pyre-extensions提示没装,顺手也装上。

然后拉了最新的ComfyUI,纯净没插件的能跑正常。

把SDWebUI 1.6也启动起来,不出意料的挂了:

################################################################
Launching launch.py...
################################################################
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
loading WD14-tagger reqs from /root/sd-webui-aki-v4.4/extensions/stable-diffusion-webui-wd14-tagger/requirements.txt
Checking WD14-tagger requirements.
ReActor preheating... Device: CUDA
Launching Web UI with arguments: --listen --skip-torch-cuda-test --disable-nan-check --skip-version-check --skip-python-version-check --enable-insecure-extension-access --api --xformers --xformers-flash-attention --opt-sdp-attention --no-half-vae --theme=dark --lora-dir /data/models/Lora --vae-dir /data/models/VAE --ckpt-dir /data/models/checkpoint --controlnet-dir /data/models/ControlNet --embeddings-dir /data/models/embeddings
2024-03-26 15:43:54.846349: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
*** Error setting up CodeFormer
    Traceback (most recent call last):
      File "/root/sd-webui-aki-v4.4/modules/codeformer_model.py", line 30, in setup_model
        from modules.codeformer.codeformer_arch import CodeFormer
      File "/root/sd-webui-aki-v4.4/modules/codeformer/codeformer_arch.py", line 9, in <module>
        from modules.codeformer.vqgan_arch import VQAutoEncoder, ResBlock
      File "/root/sd-webui-aki-v4.4/modules/codeformer/vqgan_arch.py", line 11, in <module>
        from basicsr.utils import get_root_logger
      File "/root/sd-webui-aki-v4.4/venv/lib/python3.10/site-packages/basicsr/__init__.py", line 4, in <module>
        from .data import *
      File "/root/sd-webui-aki-v4.4/venv/lib/python3.10/site-packages/basicsr/data/__init__.py", line 22, in <module>
        _dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames]
      File "/root/sd-webui-aki-v4.4/venv/lib/python3.10/site-packages/basicsr/data/__init__.py", line 22, in <listcomp>
        _dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames]
      File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "/root/sd-webui-aki-v4.4/venv/lib/python3.10/site-packages/basicsr/data/realesrgan_dataset.py", line 11, in <module>
        from basicsr.data.degradations import circular_lowpass_kernel, random_mixed_kernels
      File "/root/sd-webui-aki-v4.4/venv/lib/python3.10/site-packages/basicsr/data/degradations.py", line 8, in <module>
        from torchvision.transforms.functional_tensor import rgb_to_grayscale
    ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'

---
Traceback (most recent call last):
  File "/root/sd-webui-aki-v4.4/launch.py", line 48, in <module>
    main()
  File "/root/sd-webui-aki-v4.4/launch.py", line 44, in main
    start()
  File "/root/sd-webui-aki-v4.4/modules/launch_utils.py", line 436, in start
    webui.webui()
  File "/root/sd-webui-aki-v4.4/webui.py", line 52, in webui
    initialize.initialize()
  File "/root/sd-webui-aki-v4.4/modules/initialize.py", line 71, in initialize
    from modules import gfpgan_model
  File "/root/sd-webui-aki-v4.4/modules/gfpgan_model.py", line 4, in <module>
    import gfpgan
  File "/root/sd-webui-aki-v4.4/venv/lib/python3.10/site-packages/gfpgan/__init__.py", line 3, in <module>
    from .data import *
  File "/root/sd-webui-aki-v4.4/venv/lib/python3.10/site-packages/gfpgan/data/__init__.py", line 10, in <module>
    _dataset_modules = [importlib.import_module(f'gfpgan.data.{file_name}') for file_name in dataset_filenames]
  File "/root/sd-webui-aki-v4.4/venv/lib/python3.10/site-packages/gfpgan/data/__init__.py", line 10, in <listcomp>
    _dataset_modules = [importlib.import_module(f'gfpgan.data.{file_name}') for file_name in dataset_filenames]
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/root/sd-webui-aki-v4.4/venv/lib/python3.10/site-packages/gfpgan/data/ffhq_degradation_dataset.py", line 7, in <module>
    from basicsr.data import degradations as degradations
  File "/root/sd-webui-aki-v4.4/venv/lib/python3.10/site-packages/basicsr/__init__.py", line 4, in <module>
    from .data import *
  File "/root/sd-webui-aki-v4.4/venv/lib/python3.10/site-packages/basicsr/data/__init__.py", line 22, in <module>
    _dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames]
  File "/root/sd-webui-aki-v4.4/venv/lib/python3.10/site-packages/basicsr/data/__init__.py", line 22, in <listcomp>
    _dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames]
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/root/sd-webui-aki-v4.4/venv/lib/python3.10/site-packages/basicsr/data/realesrgan_dataset.py", line 11, in <module>
    from basicsr.data.degradations import circular_lowpass_kernel, random_mixed_kernels
  File "/root/sd-webui-aki-v4.4/venv/lib/python3.10/site-packages/basicsr/data/degradations.py", line 8, in <module>
    from torchvision.transforms.functional_tensor import rgb_to_grayscale
ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'

网上查了一下报错,原来是torch新版本的functional_tensor改成_functional_tensor了,于是vi一下/root/sd-webui-aki-v4.4/venv/lib/python3.10/site-packages/basicsr/data/degradations.py,把文件里的调用修改一下,再启动。

很好,SDWebUI启动起来了

试了下--fp8_e4m3fn-text-enc --fp8_e4m3fn-unet参数启动ComfyUI开启前fp8精度,也貌似正常,明天再继续实测

有惊无险,睡觉。。。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/501231.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【Spring源码】WebSocket做推送动作的底层实例

一、前瞻 Ok&#xff0c;开始我们今天的对Spring的【模块阅读】。 那就挑Web里的WebSocket模块&#xff0c;先思考下本次阅读的阅读线索&#xff1a; WebSocket在Spring里起到什么作用这个模块采用了什么设计模式我们都知道WebSocket可以主动推送消息给用户&#xff0c;那做推…

点点数据K参数加密逆向分析(RPC方案跟加密算法还原)

文章目录 1. 写在前面2. 接口分析3. 断点分析4. RPC调用5. 算法还原 【&#x1f3e0;作者主页】&#xff1a;吴秋霖 【&#x1f4bc;作者介绍】&#xff1a;擅长爬虫与JS加密逆向分析&#xff01;Python领域优质创作者、CSDN博客专家、阿里云博客专家、华为云享专家。一路走来长…

新数字时代的启示:揭开Web3的秘密之路

在当今数字时代&#xff0c;随着区块链技术的不断发展&#xff0c;Web3作为下一代互联网的概念正逐渐引起人们的关注和探索。本文将深入探讨新数字时代的启示&#xff0c;揭开Web3的神秘之路&#xff0c;并探讨其在未来的发展前景。 1. Web3的定义与特点 Web3是对互联网未来发…

金蝶云星空和旺店通·企业奇门接口打通对接实战

金蝶云星空和旺店通企业奇门接口打通对接实战 对接源平台:金蝶云星空 金蝶K/3Cloud&#xff08;金蝶云星空&#xff09;是移动互联网时代的新型ERP&#xff0c;是基于WEB2.0与云技术的新时代企业管理服务平台。金蝶K/3Cloud围绕着“生态、人人、体验”&#xff0c;旨在帮助企业…

机器学习——LightGBM算法

机器学习——LightGBM算法 摘要&#xff1a; LightGBM是一种高效的梯度提升框架&#xff0c;它在处理大规模数据时表现出色&#xff0c;并且具有较快的训练速度和较低的内存消耗。本文将介绍LightGBM算法的原理、特点以及与传统GBDT算法的区别&#xff0c;并使用Python对其进行…

c++深拷贝和浅拷贝的区别

浅拷贝&#xff1a;在用户没有自创拷贝构造函数时&#xff0c;c编译器会自己提供一个&#xff0c;进行简单的赋值操作 深拷贝&#xff1a;在堆区重新申请空间&#xff0c;进行拷贝操作 我们先创建一个关于person的类&#xff1a; 在有创建两个变量 指针m_height和 整形常量 m…

揭秘情绪识别:如何让AI读懂你的心声?

最近我在研究大语言模型&#xff0c;想用它来给样本打分。 起初&#xff0c;我尝试让模型用1到5分来评分&#xff0c;但它总是极端地给出最低分或最高分&#xff0c;评分缺乏中间地带。 于是我换了个方法&#xff0c;不再用数字&#xff0c;而是用描述性的词语&#xff0c;比…

【Git项目部署到本地仓库】

1. 下载安装Git 根据您的操作系统&#xff0c;访问Git的官方网站&#xff1a;https://git-scm.com/download/win 具体安装教程请访问其他博客&#xff0c;例如&#xff1a;http://t.csdnimg.cn/I28VO 安装完成后&#xff0c;您可以通过在winR键输入cmd打开命令行输入 git -…

YOLOv9改进策略 :block优化 | 无需TokenMixer也能达成SOTA性能的极简ViT架构 | CVPR2023 RIFormer

&#x1f4a1;&#x1f4a1;&#x1f4a1;本文改进内容&#xff1a; token mixer被验证能够大幅度提升性能&#xff0c;但典型的token mixer为自注意力机制&#xff0c;推理耗时长&#xff0c;计算代价大&#xff0c;而RIFormers是无需TokenMixer也能达成SOTA性能的极简ViT架构…

2024总结的vue3的面试题

一、vue2和vue3的区别 答案&#xff1a; 1、数据绑定原理不同 vue2&#xff1a;vue2的数据绑定是利用ES5的一个API&#xff1a;Object.definePropert() 对数据进行劫持&#xff0c;结合发布订阅模式的方式来实现的。 vue3&#xff1a;vue3中使用了ES6的Proxy API对数据代理…

linux提权笔记

1 linux提权简介 Linux提权&#xff0c;简单来说&#xff0c;就是用户尝试获取高于其当前权限级别的系统访问权限的过程。在Linux系统中&#xff0c;root用户拥有最高的权限&#xff0c;能够执行任何操作&#xff0c;包括修改系统文件、安装软件、管理用户账户等。而普通用户通…

为什么写博客对程序员很重要

之前写过一段时间博客&#xff0c;但是后面半途而废了。最近开始频繁更新&#xff0c;把自己一些学习心得系统得整理后发布出来&#xff0c;希望以后能够坚持写下去。 写博客对程序员有多重要&#xff1f;这个是自己在反思的一个问题&#xff0c;上下班在地铁上想&#xff0c;…

HCIP---MGRE和GRE实验

一、配置ip R1: [R1]int g0/0/0 [R1-GigabitEthernet0/0/0]ip add 192.168.1.254 24 [R1-GigabitEthernet0/0/0]int s4/0/0 [R1-Serial4/0/0]ip add 15.1.1.1 24 [R1]ip route-static 0.0.0.0 0 15.1.1.5 R2: [R2]int g0/0/0 [R2-GigabitEthernet0/0/0]ip add 192.168.2.2…

VsCode正确解决vue3+Eslint+prettier+Vetur的配置冲突

手把手教你VsCode正确解决vue3EslintprettierVetur的配置冲突 VsCode正确解决vue3EslintprettierVetur的配置冲突Eslint文档查看和修改规则&#xff1a;step1&#xff1a;首先快速浏览下规则简要setp2: ctrlF 搜索你要配置规则的英文名&#xff0c;例如attributesetp3: 修改配置…

2024最新华为OD机试试题库全 -【两个字符串间的最短路径问题】- C卷

1. 🌈题目详情 1.1 ⚠️题目 给定两个字符串,分别为字符串 A 与字符串 B。 例如 A字符串为 “ABCABBA”,B字符串为 “CBABAC” 可以得到下图 m * n 的二维数组,定义原点为(0,0),终点为(m,n),水平与垂直的每一条边距离为1,映射成坐标系如下图。 从原点 (0,0) 到 (0,…

【Vue3源码学习】— CH2.6 effect.ts:详解

effect.ts&#xff1a;详解 1. 理解activeEffect1.1 定义1.2 通过一个例子来说明这个过程a. 副作用函数的初始化b. 执行副作用函数前c. 访问state.countd. get拦截器中的track调用e. 修改state.count时的set拦截器f. trigger函数中的依赖重新执行 1.3 实战应用1.4 activeEffect…

[幻灯片]软件需求设计方法学全程实例剖析-03-业务用例图和业务序列图

DDD领域驱动设计批评文集 做强化自测题获得“软件方法建模师”称号 《软件方法》各章合集 pdf已上传至本号的CSDN资源&#xff0c;或到以下地址下载&#xff1a; http://umlchina.com/training/umlchina_03_bm.pdf

蓝队面经(一)

蓝队面经(一) 文章目录 蓝队面经(一)入侵排查思路windows入侵排查思路Linux入侵排查思路 Linux 如何查看登录日志Windows 和 Linux 的日志文件放在哪里&#xff1f;WindowsLinux Linux 常用排查命令有哪些&#xff1f;Linux 的 Selinux 是什么&#xff1f;如何设置 Selinux&…

【linux课设】自主实现shell命令行解释器

shell和bash的关系 shell是命令解释器&#xff0c;它接收用户的命令并将其传递给内核去执行。bash,即GNU Bourne-Again Shell&#xff0c;是shell的一种实现方式&#xff0c;也是大多数linux系统下默认的shell。 bash的原理 大多数的指令进程&#xff08;除了内建命令&#…

【如何解决一些常见的 Composer 错误的保姆级讲解】

&#x1f308;个人主页:程序员不想敲代码啊&#x1f308; &#x1f3c6;CSDN优质创作者&#xff0c;CSDN实力新星&#xff0c;CSDN博客专家&#x1f3c6; &#x1f44d;点赞⭐评论⭐收藏 &#x1f91d;希望本文对您有所裨益&#xff0c;如有不足之处&#xff0c;欢迎在评论区提…