Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
KAIYAN-CHEN opened this issue Apr 18, 2024 · 4 comments

Comments

@KAIYAN-CHEN
Copy link

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
Copy link
Owner

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

@KAIYAN-CHEN
Copy link
Author

KAIYAN-CHEN commented Apr 18, 2024

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
Copy link

Facing the same issue, despite torchvision being installed.

@chalab23
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants