TheLastBen / fast-stable-diffusion

fast-stable-diffusion + DreamBooth
MIT License
7.41k stars 1.27k forks source link

ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor' #2809

Open KAIYAN-CHEN opened 2 months ago

KAIYAN-CHEN commented 2 months ago

I tried to install torchvision by "pip install torchvision", but still getting the same error, anyone can help me on this? @TheLastBen

Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 28, in from modules import extra_networks, ui_extra_networks_checkpoints File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui_extra_networks_checkpoints.py", line 5, in from modules import shared, ui_extra_networks, sd_models File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/shared.py", line 12, in import modules.interrogate File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/interrogate.py", line 15, in from modules import devices, paths, shared, lowvram, modelloader, errors File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/modelloader.py", line 7, in from basicsr.utils.download_util import load_file_from_url File "/usr/local/lib/python3.10/dist-packages/basicsr/init.py", line 4, in from .data import * File "/usr/local/lib/python3.10/dist-packages/basicsr/data/init.py", line 22, in _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 _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 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 from torchvision.transforms.functional_tensor import rgb_to_grayscale ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'

TheLastBen commented 2 months ago

torchvision is already installed, no need to install a different version

KAIYAN-CHEN commented 2 months ago

torchvision is already installed, no need to install a different version

@TheLastBen Thanks for your quickly response! Could you help to suggest how to fix this issue? Because I got this error before I installed it

almagashi commented 2 months ago

Facing the same issue, despite torchvision being installed.

chalab23 commented 2 months ago

Same issue. I renamed the sd folder on my Gdrive to start fresh and the error disappeared.