numz / sd-wav2lip-uhq

Wav2Lip UHQ extension for Automatic1111
Apache License 2.0
1.16k stars 158 forks source link

Stable Diffusion WEBUI stop working after installing "sd-wav2lip-uhq". CUDA TorchAudio issue. On clean- new virtual env. #98

Open 0Core opened 7 months ago

0Core commented 7 months ago

Stable diffusion works just fine before installing plugin "sd-wav2lip-uhq"

Traceback (most recent call last): File "/home/borg/projects/sd_web_ui/stable-diffusion-webui/launch.py", line 48, in main() File "/home/borg/projects/sd_web_ui/stable-diffusion-webui/launch.py", line 44, in main start() File "/home/borg/projects/sd_web_ui/stable-diffusion-webui/modules/launch_utils.py", line 432, in start import webui File "/home/borg/projects/sd_web_ui/stable-diffusion-webui/webui.py", line 13, in initialize.imports() File "/home/borg/projects/sd_web_ui/stable-diffusion-webui/modules/initialize.py", line 16, in imports import pytorch_lightning # noqa: F401 File "/home/borg/.pyenv/versions/webui/lib/python3.10/site-packages/pytorch_lightning/init.py", line 35, in from pytorch_lightning.callbacks import Callback # noqa: E402 File "/home/borg/.pyenv/versions/webui/lib/python3.10/site-packages/pytorch_lightning/callbacks/init.py", line 14, in from pytorch_lightning.callbacks.batch_size_finder import BatchSizeFinder File "/home/borg/.pyenv/versions/webui/lib/python3.10/site-packages/pytorch_lightning/callbacks/batch_size_finder.py", line 24, in from pytorch_lightning.callbacks.callback import Callback File "/home/borg/.pyenv/versions/webui/lib/python3.10/site-packages/pytorch_lightning/callbacks/callback.py", line 25, in from pytorch_lightning.utilities.types import STEP_OUTPUT File "/home/borg/.pyenv/versions/webui/lib/python3.10/site-packages/pytorch_lightning/utilities/types.py", line 27, in from torchmetrics import Metric File "/home/borg/.pyenv/versions/webui/lib/python3.10/site-packages/torchmetrics/init.py", line 22, in from torchmetrics import functional # noqa: E402 File "/home/borg/.pyenv/versions/webui/lib/python3.10/site-packages/torchmetrics/functional/init.py", line 14, in from torchmetrics.functional.audio._deprecated import _permutation_invariant_training as permutation_invariant_training File "/home/borg/.pyenv/versions/webui/lib/python3.10/site-packages/torchmetrics/functional/audio/init.py", line 14, in from torchmetrics.functional.audio.pit import permutation_invariant_training, pit_permutate File "/home/borg/.pyenv/versions/webui/lib/python3.10/site-packages/torchmetrics/functional/audio/pit.py", line 22, in from torchmetrics.utilities import rank_zero_warn File "/home/borg/.pyenv/versions/webui/lib/python3.10/site-packages/torchmetrics/utilities/init.py", line 14, in from torchmetrics.utilities.checks import check_forward_full_state_property File "/home/borg/.pyenv/versions/webui/lib/python3.10/site-packages/torchmetrics/utilities/checks.py", line 25, in from torchmetrics.metric import Metric File "/home/borg/.pyenv/versions/webui/lib/python3.10/site-packages/torchmetrics/metric.py", line 30, in from torchmetrics.utilities.data import ( File "/home/borg/.pyenv/versions/webui/lib/python3.10/site-packages/torchmetrics/utilities/data.py", line 22, in from torchmetrics.utilities.imports import _TORCH_GREATER_EQUAL_1_12, _XLA_AVAILABLE File "/home/borg/.pyenv/versions/webui/lib/python3.10/site-packages/torchmetrics/utilities/imports.py", line 54, in _TORCHAUDIO_GREATER_EQUAL_0_10: Optional[bool] = compare_version("torchaudio", operator.ge, "0.10.0") File "/home/borg/.pyenv/versions/webui/lib/python3.10/site-packages/lightning_utilities/core/imports.py", line 77, in compare_version pkg = importlib.import_module(package) File "/home/borg/.pyenv/versions/3.10.6/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/home/borg/.pyenv/versions/webui/lib/python3.10/site-packages/torchaudio/init.py", line 1, in from torchaudio import ( # noqa: F401 File "/home/borg/.pyenv/versions/webui/lib/python3.10/site-packages/torchaudio/_extension/init.py", line 47, in _check_cuda_version() File "/home/borg/.pyenv/versions/webui/lib/python3.10/site-packages/torchaudio/_extension/utils.py", line 119, in _check_cuda_version raise RuntimeError( RuntimeError: Detected that PyTorch and TorchAudio were compiled with different CUDA versions. PyTorch has CUDA version 11.8 whereas TorchAudio has CUDA version 11.7. Please install the TorchAudio version that matches your PyTorch version.

pip list result:

absl-py 2.0.0 accelerate 0.21.0 addict 2.4.0 aenum 3.1.15 aiofiles 23.2.1 aiohttp 3.9.1 aiosignal 1.3.1 albumentations 1.3.1 altair 5.2.0 antlr4-python3-runtime 4.9.3 anyio 3.7.1 appdirs 1.4.4 async-timeout 4.0.3 attrs 23.1.0 audioread 3.0.1 basicsr 1.4.2 beautifulsoup4 4.12.2 blendmodes 2022 boltons 23.1.1 boto3 1.33.10 botocore 1.33.10 cachetools 5.3.2 certifi 2023.11.17 cffi 1.16.0 charset-normalizer 3.3.2 clean-fid 0.1.35 click 8.1.7 clip 1.0 cmake 3.27.9 coloredlogs 15.0.1 contourpy 1.2.0 cycler 0.12.1 Cython 3.0.6 decorator 5.1.1 deprecation 2.1.0 dlib-bin 19.24.2 easydict 1.11 einops 0.4.1 encodec 0.1.1 exceptiongroup 1.2.0 facexlib 0.3.0 fastapi 0.94.0 ffmpy 0.3.1 filelock 3.13.1 filterpy 1.4.5 flatbuffers 23.5.26 fonttools 4.46.0 frozenlist 1.4.0 fsspec 2023.12.1 ftfy 6.1.3 funcy 2.0 future 0.18.3 gdown 4.7.1 gfpgan 1.3.8 gitdb 4.0.11 GitPython 3.1.32 google-auth 2.25.1 google-auth-oauthlib 1.1.0 gradio 3.41.2 gradio_client 0.5.0 grpcio 1.60.0 h11 0.12.0 httpcore 0.15.0 httpx 0.24.1 huggingface-hub 0.19.4 humanfriendly 10.0 idna 3.6 ifnude 0.0.3 imageio 2.33.0 imageio-ffmpeg 0.4.9 importlib-metadata 7.0.0 importlib-resources 6.1.1 imutils 0.5.4 inflection 0.5.1 insightface 0.7.3 Jinja2 3.1.2 jmespath 1.0.1 joblib 1.3.2 jsonmerge 1.8.0 jsonschema 4.20.0 jsonschema-specifications 2023.11.2 kiwisolver 1.4.5 kornia 0.6.7 lark 1.1.2 lazy_loader 0.3 librosa 0.10.0.post2 lightning-utilities 0.10.0 lit 17.0.6 llvmlite 0.41.1 lmdb 1.4.1 lpips 0.1.4 Markdown 3.5.1 MarkupSafe 2.1.3 matplotlib 3.8.2 mpmath 1.3.0 msgpack 1.0.7 multidict 6.0.4 networkx 3.2.1 numba 0.58.1 numpy 1.23.5 oauthlib 3.2.2 omegaconf 2.2.3 onnx 1.14.0 onnxruntime 1.15.0 onnxruntime-gpu 1.15.0 open-clip-torch 2.20.0 opencv-contrib-python 4.8.1.78 opencv-python 4.8.1.78 opencv-python-headless 4.8.1.78 orjson 3.9.10 packaging 23.2 pandas 2.1.4 piexif 1.1.3 Pillow 9.5.0 pip 22.2.1 platformdirs 4.1.0 pooch 1.6.0 prettytable 3.9.0 protobuf 4.25.1 psutil 5.9.5 pyasn1 0.5.1 pyasn1-modules 0.3.0 pycparser 2.21 pydantic 1.10.13 pydub 0.25.1 pyparsing 3.1.1 PySocks 1.7.1 python-dateutil 2.8.2 python-multipart 0.0.6 pytorch-lightning 1.9.4 pytz 2023.3.post1 PyWavelets 1.5.0 PyYAML 6.0.1 qudida 0.0.4 realesrgan 0.3.0 referencing 0.32.0 regex 2023.10.3 requests 2.31.0 requests-oauthlib 1.3.1 resize-right 0.0.2 rpds-py 0.13.2 rsa 4.9 s3transfer 0.8.2 safetensors 0.3.1 scikit-image 0.21.0 scikit-learn 1.3.2 scipy 1.11.4 semantic-version 2.10.0 sentencepiece 0.1.99 setuptools 63.2.0 six 1.16.0 smmap 5.0.1 sniffio 1.3.0 soundfile 0.12.1 soupsieve 2.5 soxr 0.3.7 starlette 0.26.1 suno-bark 0.0.1a0 sympy 1.12 tb-nightly 2.16.0a20231208 tensorboard-data-server 0.7.2 tf-keras-nightly 2.16.0.dev2023120810 threadpoolctl 3.2.0 tifffile 2023.9.26 timm 0.9.2 tokenizers 0.13.3 tomesd 0.1.3 tomli 2.0.1 toolz 0.12.0 torch 2.0.1+cu118 torchaudio 2.0.2 torchdiffeq 0.2.3 torchmetrics 1.2.1 torchsde 0.2.5 torchvision 0.15.2+cu118 tqdm 4.66.1 trampoline 0.1.2 transformers 4.30.2 triton 2.0.0 typing_extensions 4.8.0 tzdata 2023.3 urllib3 2.0.7 uvicorn 0.24.0.post1 wcwidth 0.2.12 websockets 11.0.3 Werkzeug 3.0.1 yapf 0.40.2 yarl 1.9.4 zipp 3.17.0

0Core commented 7 months ago

Tried on Ubuntu 22, 23 clean new installation of Linux, Python, official Stable Diffusion WEBUI. Also tried to change torchaudio installation did not resolve the issue. After removing plugin all back to normal. Any ideas?

greyphilosophy commented 7 months ago

I'm having a similar issue on windows in my anaconda environment. Installing wav2studio wrecks my stable diffusion installation.

venv "C:\stable-diffusion\stable-diffusion-webui\venv\Scripts\Python.exe" Python 3.10.9 | packaged by conda-forge | (main, Jan 11 2023, 15:15:40) [MSC v.1916 64 bit (AMD64)] Version: v1.6.0-2-g4afaaf8a Commit hash: 4afaaf8a020c1df457bcf7250cb1c7f609699fa7 Traceback (most recent call last): File "C:\stable-diffusion\stable-diffusion-webui\launch.py", line 48, in main() File "C:\stable-diffusion\stable-diffusion-webui\launch.py", line 39, in main prepare_environment() File "C:\stable-diffusion\stable-diffusion-webui\modules\launch_utils.py", line 356, in prepare_environment raise RuntimeError( RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check

ItsMe-TJ commented 6 months ago

Yeah, It also broke my A1111 install.

@numz Any idea what might be causing it?

esmaeili128 commented 6 months ago

I have similar problem. after installation got this:

Error running install.py for extension C:\StableD\stable-diffusion-webui\extensions\sd-wav2lip-uhq.0:00, 1.42it/s] Command: "C:\StableD\stable-diffusion-webui\venv\Scripts\python.exe" "C:\StableD\stable-diffusion-webui\extensions\sd-wav2lip-uhq\install.py" Error code: 1 stdout: Installing wav2lip_uhq requirement: imutils Installing wav2lip_uhq requirement: dlib-bin Installing wav2lip_uhq requirement: librosa==0.10.0.post2 Installing wav2lip_uhq requirement: imageio_ffmpeg Installing wav2lip_uhq requirement: git+https://github.com/suno-ai/bark.git


stderr: Traceback (most recent call last): File "C:\StableD\stable-diffusion-webui\extensions\sd-wav2lip-uhq\install.py", line 17, in launch.run_pip(f"install {lib}", f"wav2lip_uhq requirement: {lib}") File "C:\StableD\stable-diffusion-webui\modules\launch_utils.py", line 144, in run_pip return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live) File "C:\StableD\stable-diffusion-webui\modules\launch_utils.py", line 116, in run raise RuntimeError("\n".join(error_bits)) RuntimeError: Couldn't install wav2lip_uhq requirement: git+https://github.com/suno-ai/bark.git. Command: "C:\StableD\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install git+https://github.com/suno-ai/bark.git --prefer-binary Error code: 1 stdout: Collecting git+https://github.com/suno-ai/bark.git Cloning https://github.com/suno-ai/bark.git to c:\users\hossein\appdata\local\temp\pip-req-build-19b0lg0t Resolved https://github.com/suno-ai/bark.git to commit 773624d26db84278a55aacae9a16d7b25fbccab8 Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Installing backend dependencies: started Installing backend dependencies: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting encodec Using cached encodec-0.1.1-py3-none-any.whl Requirement already satisfied: huggingface-hub>=0.14.1 in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from suno-bark==0.0.1a0) (0.20.1) Requirement already satisfied: scipy in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from suno-bark==0.0.1a0) (1.11.4) Collecting boto3 Downloading boto3-1.34.10-py3-none-any.whl (139 kB) ------------------------------------ 139.3/139.3 kB 192.1 kB/s eta 0:00:00 Collecting funcy Using cached funcy-2.0-py2.py3-none-any.whl (30 kB) Requirement already satisfied: numpy in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from suno-bark==0.0.1a0) (1.23.5) Requirement already satisfied: transformers in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from suno-bark==0.0.1a0) (4.27.4) Requirement already satisfied: tokenizers in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from suno-bark==0.0.1a0) (0.13.3) Requirement already satisfied: tqdm in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from suno-bark==0.0.1a0) (4.66.1) Requirement already satisfied: torch in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from suno-bark==0.0.1a0) (2.0.1+cu118) Requirement already satisfied: filelock in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from huggingface-hub>=0.14.1->suno-bark==0.0.1a0) (3.13.1) Requirement already satisfied: packaging>=20.9 in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from huggingface-hub>=0.14.1->suno-bark==0.0.1a0) (23.2) Requirement already satisfied: requests in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from huggingface-hub>=0.14.1->suno-bark==0.0.1a0) (2.31.0) Requirement already satisfied: typing-extensions>=3.7.4.3 in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from huggingface-hub>=0.14.1->suno-bark==0.0.1a0) (4.9.0) Requirement already satisfied: fsspec>=2023.5.0 in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from huggingface-hub>=0.14.1->suno-bark==0.0.1a0) (2023.12.2) Requirement already satisfied: pyyaml>=5.1 in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from huggingface-hub>=0.14.1->suno-bark==0.0.1a0) (6.0.1) Requirement already satisfied: colorama in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from tqdm->suno-bark==0.0.1a0) (0.4.6) Collecting botocore<1.35.0,>=1.34.10 Downloading botocore-1.34.10-py3-none-any.whl (11.9 MB) ---------------------------------------- 11.9/11.9 MB 1.1 MB/s eta 0:00:00 Collecting s3transfer<0.11.0,>=0.10.0 Using cached s3transfer-0.10.0-py3-none-any.whl (82 kB) Collecting jmespath<2.0.0,>=0.7.1 Using cached jmespath-1.0.1-py3-none-any.whl (20 kB) Collecting torchaudio Using cached torchaudio-2.1.2-cp310-cp310-win_amd64.whl (2.3 MB) Requirement already satisfied: einops in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from encodec->suno-bark==0.0.1a0) (0.4.1) Requirement already satisfied: jinja2 in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from torch->suno-bark==0.0.1a0) (3.1.2) Requirement already satisfied: networkx in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from torch->suno-bark==0.0.1a0) (3.2.1) Requirement already satisfied: sympy in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from torch->suno-bark==0.0.1a0) (1.12) Requirement already satisfied: regex!=2019.12.17 in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from transformers->suno-bark==0.0.1a0) (2023.12.25) Collecting urllib3<2.1,>=1.25.4 Using cached urllib3-2.0.7-py3-none-any.whl (124 kB) Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from botocore<1.35.0,>=1.34.10->boto3->suno-bark==0.0.1a0) (2.8.2) Requirement already satisfied: MarkupSafe>=2.0 in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from jinja2->torch->suno-bark==0.0.1a0) (2.1.3) Requirement already satisfied: idna<4,>=2.5 in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from requests->huggingface-hub>=0.14.1->suno-bark==0.0.1a0) (3.6) Requirement already satisfied: certifi>=2017.4.17 in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from requests->huggingface-hub>=0.14.1->suno-bark==0.0.1a0) (2023.11.17) Requirement already satisfied: charset-normalizer<4,>=2 in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from requests->huggingface-hub>=0.14.1->suno-bark==0.0.1a0) (3.3.2) Requirement already satisfied: mpmath>=0.19 in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from sympy->torch->suno-bark==0.0.1a0) (1.3.0) Collecting torch Using cached torch-2.1.2-cp310-cp310-win_amd64.whl (192.3 MB) Requirement already satisfied: six>=1.5 in c:\stabled\stable-diffusion-webui\venv\lib\site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.35.0,>=1.34.10->boto3->suno-bark==0.0.1a0) (1.16.0) Building wheels for collected packages: suno-bark Building wheel for suno-bark (pyproject.toml): started Building wheel for suno-bark (pyproject.toml): finished with status 'done' Created wheel for suno-bark: filename=suno_bark-0.0.1a0-py3-none-any.whl size=2567582 sha256=451bf4df524ce6ca180dacf96f41d56301f23a36577a3a444a7b3940aa73aff1 Stored in directory: C:\Users\Hossein\AppData\Local\Temp\pip-ephem-wheel-cache-dc2i2xbm\wheels\e6\6d\c2\107ed849afe600f905bb4049a026df3c7c5aa75d86c2721ec7 Successfully built suno-bark Installing collected packages: funcy, urllib3, jmespath, torch, botocore, torchaudio, s3transfer, encodec, boto3, suno-bark Attempting uninstall: urllib3 Found existing installation: urllib3 2.1.0 Uninstalling urllib3-2.1.0: Successfully uninstalled urllib3-2.1.0 Attempting uninstall: torch Found existing installation: torch 2.0.1+cu118 Uninstalling torch-2.0.1+cu118: Successfully uninstalled torch-2.0.1+cu118


stderr: Running command git clone --filter=blob:none --quiet https://github.com/suno-ai/bark.git 'C:\Users\Hossein\AppData\Local\Temp\pip-req-build-19b0lg0t' ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\StableD\stable-diffusion-webui\venv\Lib\site-packages\~vfuser\_C.cp310-win_amd64.pyd' *** Check the permissions.


*** WARNING: There was an error checking the latest version of pip.

I install bark package manually but it doesn't change anything (pip install --user git+https://github.com/suno-ai/bark.git). Also removing read-only attribute from all files and folder in C:\StableD\stable-diffusion-webui\venv\Lib\site-packages before installing wav2lip doesn't work (each time I replace venv folder with backup).

esmaeili128 commented 6 months ago

After installation of wav2lip when I run stable diffusion webui it crash: C:\StableD\stable-diffusion-webui>webui-user.bat venv "C:\StableD\stable-diffusion-webui\venv\Scripts\Python.exe" Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Version: v1.7.0 Commit hash: cf2772fab0af5573da775e7437e6acdca424f26e Traceback (most recent call last): File "C:\StableD\stable-diffusion-webui\launch.py", line 48, in main() File "C:\StableD\stable-diffusion-webui\launch.py", line 39, in main prepare_environment() File "C:\StableD\stable-diffusion-webui\modules\launch_utils.py", line 384, in prepare_environment raise RuntimeError( RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check Press any key to continue . . .

dairydaddy commented 6 months ago

a huge same from me... I was able to get this working after I nuked the requirements.txt file...

*** ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\StableD\stable-diffusion-webui\venv\Lib\site-packages\~vfuser_C.cp310-win_amd64.pyd'

If you go to the site-packages folder, you'll see that there's a tilde at the start of that folder. Dunno why this happens, but it makes it tough for pip/conda/whatever to delete it. So delete any folders in venv/lib/site-packages/~vfuser etc... This was the problem for me. Some horrendous version of something was requested in the requirements.txt file and I had to delete the folder (instead of deleting the whole venv folder). Otherwise, A1111 starts up, sees that cursed requirements.txt file asking for tqdm and rando torch versions that aren't 2.0.2... and it immediately adds the awful back to your venv. And you'd think it would start fresh. It's a mess, and I'm sure it's my fault for mixing pip and conda and expecting them to work the same way. I'd explain, but I'd likely misspeak.

So, nuke the ~ folders, edit the requirements.txt file in wav2lip's extension folder, and remove the "numpy==6.6.6" <- the ==6.6.6 part. See how vague you can get. I feel like that req file was meant for a standalone repository.

That said, I cannot get wav2lip to work in any capacity, locally. I would rather not use a collab setup. I've tried wav2lip HD, codeformer, gfpgan and even the extension (ran as its own env), and it's killing me. The issue always ends up being around opencv (gpu version) or tqdm.

zdaar commented 4 months ago

Also broke my installation in a similar way. @dairydaddy facefusion has a pretty good wav2lip support