Giter Site home page Giter Site logo

Comments (1)

GitHub-Zho avatar GitHub-Zho commented on July 21, 2024

I have got the same problem.
Here is my solusion.

First download the 'basicsr' package on your own conda environment and try to import it,
you wil find some error like this

>>> from basicsr.utils.download_util import load_file_from_url
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\miniconda3\envs\stable-web\lib\site-packages\basicsr\__init__.py", line 4, in <module>
    from .data import *
  File "D:\miniconda3\envs\stable-web\lib\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 "D:\miniconda3\envs\stable-web\lib\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 "D:\miniconda3\envs\stable-web\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "D:\miniconda3\envs\stable-web\lib\site-packages\basicsr\data\realesrgan_dataset.py", line 11, in <module>
    from basicsr.data.degradations import circular_lowpass_kernel, random_mixed_kernels
  File "D:\miniconda3\envs\stable-web\lib\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'

Find the D:\miniconda3\envs\stable-web\lib\site-packages\basicsr\data\degradations.py under you conda env,
modify the from torchvision.transforms.functional_tensor import rgb_to_grayscale to
from torchvision.transforms.functional import rgb_to_grayscale

Later copy the "basicsr" and "basicsr-1.4.2.dist-info" folder
under "D:\miniconda3\envs\stable-web\lib\site-packages\" to your web-ui env site-packages
"stable-diffusion-webui\venv\Lib\site-packages".

Hope it can help.

from sd-cn-animation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.