Open earthworldcommon opened 7 months ago
basicsr不兼容高版本torch 可以手动修改依赖库中C:\Users\lx\Anaconda3\envs\sadenv\lib\site-packages\basicsr\data\degradations.py这个文件第8行 from torchvision.transforms.functional_tensor import rgb_to_grayscale 修改为 from torchvision.transforms.functional import rgb_to_grayscale 即可
Who knows why this happened?
"The installation has been completed successfully."
(sadenv) D:\AI\SadTalker> (sadenv) D:\AI\SadTalker> (sadenv) D:\AI\SadTalker>python inference.py --driven_audio d:\AI\sadtalker\examples\driven_audio\bus_chinese.wav --source_image d:\AI\sadtalker\examples\source_image\art_0.png --result_dir d:\AI\sadtalker\output --still --preprocess full --enhancer gfpgan Traceback (most recent call last): File "inference.py", line 8, in
from src.facerender.animate import AnimateFromCoeff
File "D:\AI\SadTalker\src\facerender\animate.py", line 19, in
from src.utils.face_enhancer import enhancer as face_enhancer
File "D:\AI\SadTalker\src\utils\face_enhancer.py", line 4, in
from gfpgan import GFPGANer
File "C:\Users\lx\Anaconda3\envs\sadenv\lib\site-packages\gfpgan__init.py", line 2, in
from .archs import *
File "C:\Users\lx\Anaconda3\envs\sadenv\lib\site-packages\gfpgan\archs\ init.py", line 2, in
from basicsr.utils import scandir
File "C:\Users\lx\Anaconda3\envs\sadenv\lib\site-packages\basicsr\ init.py", line 4, in
from .data import *
File "C:\Users\lx\Anaconda3\envs\sadenv\lib\site-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 "C:\Users\lx\Anaconda3\envs\sadenv\lib\site-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 "C:\Users\lx\Anaconda3\envs\sadenv\lib\importlib\ init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\lx\Anaconda3\envs\sadenv\lib\site-packages\basicsr\data\realesrgan_dataset.py", line 11, in
from basicsr.data.degradations import circular_lowpass_kernel, random_mixed_kernels
File "C:\Users\lx\Anaconda3\envs\sadenv\lib\site-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'
(sadenv) D:\AI\SadTalker>