AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
139.57k stars 26.46k forks source link

[Bug]: (COLAB STABLE DIFUSION) ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor' #15271

Open Vigsterkr92 opened 6 months ago

Vigsterkr92 commented 6 months ago

Checklist

What happened?

Webui not working as intended

Steps to reproduce the problem

I just use colab so i dont know what exactly causes it.

What should have happened?

display the public url as normally does on colab

What browsers do you use to access the UI ?

No response

Sysinfo

Im on colab so pretty much i cant do this or idk wich option gives me the info.

Console logs

Launching Web UI with arguments: --share --disable-safe-unpickle --no-half-vae --xformers --enable-insecure-extension --gradio-queue
2024-03-15 16:08:59.652961: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-03-15 16:08:59.653063: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-03-15 16:08:59.764688: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-03-15 16:09:00.001480: 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 AVX512F FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-03-15 16:09:02.400902: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
/usr/local/lib/python3.10/dist-packages/gradio_client/documentation.py:103: UserWarning: Could not get documentation group for <class 'gradio.mix.Parallel'>: No known documentation group for module 'gradio.mix'
  warnings.warn(f"Could not get documentation group for {cls}: {exc}")
/usr/local/lib/python3.10/dist-packages/gradio_client/documentation.py:103: UserWarning: Could not get documentation group for <class 'gradio.mix.Series'>: No known documentation group for module 'gradio.mix'
  warnings.warn(f"Could not get documentation group for {cls}: {exc}")
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
    PyTorch 2.0.1+cu118 with CUDA 1108 (you have 2.2.1+cu121)
    Python  3.10.11 (you have 3.10.12)
  Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
  Memory-efficient attention, SwiGLU, sparse and more won't be available.
  Set XFORMERS_MORE_DETAILS=1 for more details
Traceback (most recent call last):
  File "/content/microsoftexcel/launch.py", line 39, in <module>
    main()
  File "/content/microsoftexcel/launch.py", line 35, in main
    start()
  File "/content/microsoftexcel/modules/launch_utils.py", line 390, in start
    import webui
  File "/content/microsoftexcel/webui.py", line 61, in <module>
    from modules import shared, sd_samplers, upscaler, extensions, localization, ui_tempdir, ui_extra_networks, config_states
  File "/content/microsoftexcel/modules/ui_extra_networks.py", line 7, in <module>
    from modules.ui import up_down_symbol
  File "/content/microsoftexcel/modules/ui.py", line 26, in <module>
    import modules.gfpgan_model
  File "/content/microsoftexcel/modules/gfpgan_model.py", line 4, in <module>
    import gfpgan
  File "/usr/local/lib/python3.10/dist-packages/gfpgan/__init__.py", line 2, in <module>
    from .archs import *
  File "/usr/local/lib/python3.10/dist-packages/gfpgan/archs/__init__.py", line 2, in <module>
    from basicsr.utils import scandir
  File "/usr/local/lib/python3.10/dist-packages/basicsr/__init__.py", line 4, in <module>
    from .data import *
  File "/usr/local/lib/python3.10/dist-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 "/usr/local/lib/python3.10/dist-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 "/usr/local/lib/python3.10/dist-packages/basicsr/data/realesrgan_dataset.py", line 11, in <module>
    from basicsr.data.degradations import circular_lowpass_kernel, random_mixed_kernels
  File "/usr/local/lib/python3.10/dist-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'

Additional information

Im using nolan Atama Colab notebook on colab to run stable difussion but im getting the error above, Im pretty much new for this Ai thing and i would like someone to help me.

Vigsterkr92 commented 6 months ago

wich worked for me after hours of been looking in the issue was, using this

!pip uninstall torch torchvision -y !pip install torch==1.9.0 torchvision==0.10.0 -f https://download.pytorch.org/whl/cu121/torch_stable.html

if the previous version is not available, will install the latest compatible with.