Open vter00 opened 8 months ago
I encountered the same problem as you, have you solved it?
I have the same problem
Go to file /usr/local/lib/python3.10/dist-packages/basicsr/data/degradations.py
and change line number 8 to:
from torchvision.transforms.functional import rgb_to_grayscale
Got the solution from https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/13985
Try to uninstall and then install the latest version of torchvision. (0.17.1)
pip install torchvision
which version of torch, torchvision, torchaudio is recommended and run success on Mac M1 ?
Try to uninstall and then install the latest version of torchvision. (0.17.1)
pip install torchvision
❯ pip list | grep torch
torch 2.2.1
torchaudio 2.2.1
torchvision 0.17.1
❯ python inference.py --face examples/face/1.mp4 --audio examples/audio/1.wav --outfile results/1_1.mp4
Traceback (most recent call last):
File "inference.py", line 16, in
which version of torch, torchvision, torchaudio is recommended and run success on Mac M1 ?
pip install torch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0
❯ python inference.py --face examples/face/1.mp4 --audio examples/audio/1.wav --outfile results/1_1.mp4
[Info] Using cpu for inference.
[Step 0] Number of frames available for inference: 135
[Step 1] Using saved landmarks.
[Step 2] 3DMM Extraction In Video:: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 135/135 [00:05<00:00, 26.32it/s]
using expression center
Load checkpoint from: checkpoints/DNet.pt
Load checkpoint from: checkpoints/LNet.pth
Load checkpoint from: checkpoints/ENet.pth
[Step 3] Using saved stabilized video.
[Step 4] Load audio; Length of mel chunks: 109
[Step 5] Reference Enhancement: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 109/109 [08:27<00:00, 4.65s/it]
landmark Det:: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 109/109 [00:46<00:00, 2.32it/s]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 109/109 [00:00<00:00, 41943.04it/s]
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 109/109 [00:00<00:00, 1026.23it/s]
FaceDet:: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28/28 [01:11<00:00, 2.55s/it]
[Step 6] Lip Synthesis:: 0%| | 0/7 [02:04<?, ?it/s]
Traceback (most recent call last):
File "inference.py", line 345, in
This is an bug for package basicsr==1.4.2
, see this for details: https://github.com/XPixelGroup/BasicSR/pull/650/files
wow, that was super sketchy... but changing the 2D thing in both files + changing how the degradation file imports tourchvision (torchvision.transforms.functional import rgb_to_grayscale) + changing the requirements.txt worked for me! basically, what I'm saying is: if you try the first and second solves and nothing worked.. keep trying! some hack will fix this thing haha
ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'