Giter Club home page Giter Club logo

lip_wise's People

Contributors

pawansharmaaaa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lip_wise's Issues

CUDA problem help please

it give me this error, I should have install Cuda toolkit already

To create a public link, set share=True in launch().
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 411, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 69, in call
return await self.app(scope, receive, send)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\fastapi\applications.py", line 1054, in call
await super().call(scope, receive, send)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\starlette\applications.py", line 123, in call
await self.middleware_stack(scope, receive, send)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\starlette\middleware\errors.py", line 186, in call
raise exc
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\starlette\middleware\errors.py", line 164, in call
await self.app(scope, receive, _send)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\gradio\route_utils.py", line 707, in call
await self.app(scope, receive, send)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\starlette\middleware\exceptions.py", line 65, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app
raise exc
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\starlette\routing.py", line 756, in call
await self.middleware_stack(scope, receive, send)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\starlette\routing.py", line 776, in app
await route.handle(scope, receive, send)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\starlette\routing.py", line 297, in handle
await self.app(scope, receive, send)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\starlette\routing.py", line 77, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app
raise exc
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\starlette\routing.py", line 75, in app
await response(scope, receive, send)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\starlette\responses.py", line 352, in call
await send(
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\starlette_exception_handler.py", line 50, in sender
await send(message)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\starlette_exception_handler.py", line 50, in sender
await send(message)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\starlette\middleware\errors.py", line 161, in _send
await send(message)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 549, in send
raise RuntimeError("Response content shorter than Content-Length")
RuntimeError: Response content shorter than Content-Length
Traceback (most recent call last):
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\gradio\queueing.py", line 527, in process_events
response = await route_utils.call_process_api(
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\gradio\route_utils.py", line 270, in call_process_api
output = await app.get_blocks().process_api(
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\gradio\blocks.py", line 1847, in process_api
result = await self.call_function(
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\gradio\blocks.py", line 1433, in call_function
prediction = await anyio.to_thread.run_sync(
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\anyio_backends_asyncio.py", line 2144, in run_sync_in_worker_thread
return await future
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\anyio_backends_asyncio.py", line 851, in run
result = context.run(func, *args)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\gradio\utils.py", line 805, in wrapper
response = f(*args, **kwargs)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main\infer.py", line 58, in infer_image
free_memory = torch.cuda.mem_get_info()[0]
File "D:_A.I._2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\torch\cuda\memory.py", line 661, in mem_get_info
device = torch.cuda.current_device()
File "D:_A.I.2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\torch\cuda_init.py", line 769, in current_device
_lazy_init()
File "D:_A.I.2024\Lip_Wise-main\Lip_Wise-main.lip-wise\lib\site-packages\torch\cuda_init.py", line 289, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

AssertionError: Torch not compiled with CUDA enabled

git clone, setup + launch
terminal shows : AssertionError: Torch not compiled with CUDA enabled.


C:\Users\User>pip list
Package Version


pip 22.3.1
setuptools 65.5.0


(.lip-wise) D:\AIFace\Lip_Wise>pip list
Package Version


absl-py 2.1.0
addict 2.4.0
aiofiles 23.2.1
altair 5.3.0
annotated-types 0.6.0
anyio 4.3.0
asttokens 2.4.1
attrs 23.2.0
audioread 3.0.1
basicsr 1.4.2
beautifulsoup4 4.12.3
certifi 2024.2.2
cffi 1.16.0
charset-normalizer 3.3.2
click 8.1.7
colorama 0.4.6
comm 0.2.2
contourpy 1.2.1
cycler 0.12.1
decorator 5.1.1
exceptiongroup 1.2.1
executing 2.0.1
facexlib 0.3.0
fastapi 0.110.2
ffmpy 0.3.2
filelock 3.13.4
filterpy 1.4.5
flatbuffers 24.3.25
fonttools 4.51.0
fsspec 2024.3.1
future 1.0.0
gdown 5.1.0
gfpgan 1.3.8
gradio 4.27.0
gradio_client 0.15.1
grpcio 1.62.2
h11 0.14.0
httpcore 1.0.5
httpx 0.27.0
huggingface-hub 0.22.2
idna 3.7
imageio 2.34.1
importlib_metadata 7.1.0
importlib_resources 6.4.0
ipython 8.23.0
ipywidgets 8.1.2
jax 0.4.26
jedi 0.19.1
Jinja2 3.1.3
joblib 1.4.0
jsonschema 4.21.1
jsonschema-specifications 2023.12.1
jupyterlab_widgets 3.0.10
kiwisolver 1.4.5
lazy_loader 0.4
librosa 0.10.1
llvmlite 0.42.0
lmdb 1.4.1
Markdown 3.6
markdown-it-py 3.0.0
MarkupSafe 2.1.5
matplotlib 3.8.4
matplotlib-inline 0.1.7
mdurl 0.1.2
mediapipe 0.10.11
ml-dtypes 0.4.0
mpmath 1.3.0
msgpack 1.0.8
networkx 3.3
numba 0.59.1
numpy 1.26.4
opencv-contrib-python 4.9.0.80
opencv-python 4.9.0.80
opt-einsum 3.3.0
orjson 3.10.1
packaging 24.0
pandas 2.2.2
parso 0.8.4
pillow 10.3.0
pip 22.3.1
platformdirs 4.2.1
pooch 1.8.1
prompt-toolkit 3.0.43
protobuf 3.20.3
pure-eval 0.2.2
pycparser 2.22
pydantic 2.7.1
pydantic_core 2.18.2
pydub 0.25.1
Pygments 2.17.2
pyparsing 3.1.2
PySocks 1.7.1
python-dateutil 2.9.0.post0
python-multipart 0.0.9
pytz 2024.1
PyYAML 6.0.1
realesrgan 0.3.0
referencing 0.35.0
requests 2.31.0
rich 13.7.1
rpds-py 0.18.0
ruff 0.4.1
scikit-image 0.23.2
scikit-learn 1.4.2
scipy 1.13.0
semantic-version 2.10.0
setuptools 65.5.0
shellingham 1.5.4
six 1.16.0
sniffio 1.3.1
sounddevice 0.4.6
soundfile 0.12.1
soupsieve 2.5
soxr 0.3.7
stack-data 0.6.3
starlette 0.37.2
sympy 1.12
tb-nightly 2.17.0a20240424
tensorboard-data-server 0.7.2
threadpoolctl 3.4.0
tifffile 2024.4.18
tomli 2.0.1
tomlkit 0.12.0
toolz 0.12.1
torch 2.1.2
torchvision 0.16.2
tqdm 4.66.2
traitlets 5.14.3
typer 0.12.3
typing_extensions 4.11.0
tzdata 2024.1
urllib3 2.2.1
uvicorn 0.29.0
wcwidth 0.2.13
websockets 11.0.3
Werkzeug 3.0.2
widgetsnbextension 4.0.10
yapf 0.40.2
zipp 3.18.1

RuntimeError: Numpy is not available Press any key to continue . . .

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last): File "D:\AI\Lip_Wise-1.2\launch.py", line 7, in
import infer
File "D:\AI\Lip_Wise-1.2\infer.py", line 5, in
import torch
File "D:\AI\Lip_Wise-1.2.lip-wise\lib\site-packages\torch_init_.py", line 1382, in
from .functional import * # noqa: F403
File "D:\AI\Lip_Wise-1.2.lip-wise\lib\site-packages\torch\functional.py", line 7, in
import torch.nn.functional as F
File "D:\AI\Lip_Wise-1.2.lip-wise\lib\site-packages\torch\nn_init_.py", line 1, in
from .modules import * # noqa: F403
File "D:\AI\Lip_Wise-1.2.lip-wise\lib\site-packages\torch\nn\modules_init_.py", line 35, in
from .transformer import TransformerEncoder, TransformerDecoder,
File "D:\AI\Lip_Wise-1.2.lip-wise\lib\site-packages\torch\nn\modules\transformer.py", line 20, in
device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'),
D:\AI\Lip_Wise-1.2.lip-wise\lib\site-packages\torch\nn\modules\transformer.py:20: UserWarning: Failed to initialize NumPy: ARRAY_API not found (Triggered internally at ..\torch\csrc\utils\tensor_numpy.cpp:84.)
device: torch.device = torch.device(torch.C.get_default_device()), # torch.device('cpu'),
Traceback (most recent call last):
File "D:\AI\Lip_Wise-1.2\launch.py", line 7, in
import infer
File "D:\AI\Lip_Wise-1.2\infer.py", line 16, in
from helpers import file_check
File "D:\AI\Lip_Wise-1.2\helpers\file_check.py", line 6, in
import basicsr.archs as archs
File "D:\AI\Lip_Wise-1.2.lip-wise\lib\site-packages\basicsr_init
.py", line 3, in
from .archs import *
File "D:\AI\Lip_Wise-1.2.lip-wise\lib\site-packages\basicsr\archs_init
.py", line 5, in
from basicsr.utils import get_root_logger, scandir
File "D:\AI\Lip_Wise-1.2.lip-wise\lib\site-packages\basicsr\utils_init.py", line 2, in
from .diffjpeg import DiffJPEG
File "D:\AI\Lip_Wise-1.2.lip-wise\lib\site-packages\basicsr\utils\diffjpeg.py", line 19, in
y_table = nn.Parameter(torch.from_numpy(y_table))
RuntimeError: Numpy is not available
Press any key to continue . . .

erors

it run fine first time you use it after launching and give this error
Running on local URL: http://127.0.0.1:7860

To create a public link, set share=True in launch().
Initial Free Memory: 2.40 GB
Using cuda for inference.
Generating audio spectrogram...
Length of mel chunks: 214
Getting face landmarks...
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
W0000 00:00:1716803017.314071 10184 face_landmarker_graph.cc:174] Sets FaceBlendshapesGraph acceleration to xnnpack by default.
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
W0000 00:00:1716803017.324200 8036 inference_feedback_manager.cc:114] Feedback manager requires a model with a single signature inference. Disabling support for feedback tensors.
W0000 00:00:1716803017.334851 12468 inference_feedback_manager.cc:114] Feedback manager requires a model with a single signature inference. Disabling support for feedback tensors.
W0000 00:00:1716803017.343476 11628 inference_feedback_manager.cc:114] Feedback manager requires a model with a single signature inference. Disabling support for feedback tensors.
D:\lip-wise\Lip_Wise-main.lip-wise\lib\site-packages\google\protobuf\symbol_database.py:55: UserWarning: SymbolDatabase.GetPrototype() is deprecated. Please use message_factory.GetMessageClass() instead. SymbolDatabase.GetPrototype() will be removed soon.
warnings.warn('SymbolDatabase.GetPrototype() is deprecated. Please '
Extracting face from image...
Warping, cropping and aligning face...
Generating data for inference...
Loading wav2lip checkpoint from: D:\lip-wise\Lip_Wise-main\weights\wav2lip\wav2lip.pth
Processing.....
D:\lip-wise\Lip_Wise-main.lip-wise\lib\site-packages\torch\nn\modules\conv.py:456: UserWarning: Plan failed with a cudnnException: CUDNN_BACKEND_EXECUTION_PLAN_DESCRIPTOR: cudnnFinalize Descriptor Failed cudnn_status: CUDNN_STATUS_NOT_SUPPORTED (Triggered internally at ..\aten\src\ATen\native\cudnn\Conv_v8.cpp:919.)
return F.conv2d(input, weight, bias, self.stride,
ffmpeg version 6.0-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
C:\Users\ggrov\AppData\Local\Temp\gradio\e3df33ef8d3fe798da7e5b605be4428fa6572504\New: No such file or directory

installation issues

error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\Administrator\AppData\Local\Temp\pip-install-qvmtfo03\filterpy_12c128780eba415dbd3ce61a35d1bb00\setup.py", line 4, in
import filterpy
ModuleNotFoundError: No module named 'filterpy'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

When I install the program I get the error,can you help me solve the issues? thank you

setup.sh

#!/bin/bash

# Helper function to check if a command exists
command_exists() {
    command -v "$1" &> /dev/null
}

# Install FFMPEG
os_name=$(uname -s)
echo "Operating system detected: $os_name"

# Check if ffmpeg is installed
if ! command_exists ffmpeg; then
    echo "FFmpeg is not installed. Installing now..."
    case "$os_name" in
        Linux*)
            distro=$(awk -F= '/^NAME/{print $2}' /etc/os-release)
            if [[ $distro == *"Arch"* ]]; then
                sudo pacman -Sy ffmpeg --noconfirm
            elif [[ $distro == *"Ubuntu"* ]] || [[ $distro == *"Debian"* ]]; then
                sudo apt-get update
                sudo apt-get install ffmpeg -y
                sudo apt-get install python3-venv -y
            else
                echo "Unsupported Linux distribution: $distro"
                exit 1
            fi
            ;;
        *)
            echo "Unsupported operating system: $os_name"
            exit 1
            ;;
    esac
else
    echo "FFmpeg is already installed."
fi

# Check if CUDA is installed and accessible
if [ -z "$(ls /usr/local/cuda-*/bin/nvcc 2>/dev/null)" ]; then
    echo "CUDA is not installed or not properly configured."
    echo "Please install or configure CUDA."
    echo "CPU will be used for inference."
else
    cuda_version=$(/usr/local/cuda/bin/nvcc --version | grep release | sed 's/.*release //' | sed 's/,.*//')
    echo "CUDA version $cuda_version detected."
fi

# Create and activate a virtual environment
venv_dir=".lip-wise"
if [ ! -d "$venv_dir" ]; then
    python3 -m venv "$venv_dir"
fi
source "$venv_dir/bin/activate"

# Install Python packages
pip install -U pip
pip install -r requirements.txt

# Copy architecture files to the virtual environment
python_version=$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')
arch_target_dir="$venv_dir/lib/python${python_version}/site-packages/basicsr/archs"

mkdir -p "$arch_target_dir"
cp archs/* "$arch_target_dir/"

# Run file_check.py
python ./helpers/file_check.py

It works! but until...

It started running until batch 19 this happened.

Pasting face back...
Pasting face back...
Writing batch no: 19
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/gradio/queueing.py", line 489, in call_prediction
output = await route_utils.call_process_api(
File "/usr/local/lib/python3.10/dist-packages/gradio/route_utils.py", line 232, in call_process_api
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1561, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1179, in call_function
prediction = await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/dist-packages/gradio/utils.py", line 678, in wrapper
response = f(*args, **kwargs)
File "/content/Lip_Wise/infer.py", line 269, in infer_video
frame_batch, mel_batch = bp.gen_data_video_mode(cropped_faces, mels_to_input)
File "/content/Lip_Wise/batch_processors.py", line 65, in gen_data_video_mode
cropped_face = cv2.resize(cropped_face, (96, 96))
cv2.error: OpenCV(4.8.0) /io/opencv/modules/imgproc/src/resize.cpp:4062: error: (-215:Assertion failed) !ssize.empty() in function 'resize'

When loading GFPGAN and wav2lip model,it would be stuck....

Hi,thanks for your excellent work.When I uploaded my video and sound,I got a weired result,It just stucking,no other info-out:

"" Getting face landmarks...
W0000 00:00:1705849449.547341 19148 face_landmarker_graph.cc:174] Sets FaceBlendshapesGraph acceleration to xnnpack by default.
Using cuda for inference.
Generating audio spectrogram...
Video is longer than audio. Truncating video...
Length of mel chunks: 855
Load GFPGAN checkpoint from: D:\PythonProject\Lip_Wise\weights\gfpgan\GFPGANv1.4.pth
Loading wav2lip checkpoint from: D:\PythonProject\Lip_Wise\weights\wav2lip\wav2lip.pth ""

How to fix the problem?

KeyError: "No object named 'CodeFormer' found in 'arch' registry!"

@pawansharmaaaa I run "python launch.py" and I have GUI at http://127.0.0.1:7860/. When I chose video and audio with the same length then press "process video", i get error:

Traceback (most recent call last):
File "/home/ai-3090/anaconda3/envs/lipwise/lib/python3.11/site-packages/gradio/queueing.py", line 527, in process_events
response = await route_utils.call_process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ai-3090/anaconda3/envs/lipwise/lib/python3.11/site-packages/gradio/route_utils.py", line 261, in call_process_api
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ai-3090/anaconda3/envs/lipwise/lib/python3.11/site-packages/gradio/blocks.py", line 1788, in process_api
result = await self.call_function(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ai-3090/anaconda3/envs/lipwise/lib/python3.11/site-packages/gradio/blocks.py", line 1340, in call_function
prediction = await anyio.to_thread.run_sync(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ai-3090/anaconda3/envs/lipwise/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ai-3090/anaconda3/envs/lipwise/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "/home/ai-3090/anaconda3/envs/lipwise/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ai-3090/anaconda3/envs/lipwise/lib/python3.11/site-packages/gradio/utils.py", line 759, in wrapper
response = f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/home/ai-3090/anaconda3/envs/lipwise/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/media/ai-3090/hdd_2/hoaitt/Lip_Wise/infer.py", line 308, in infer_video
ml = model_loaders.ModelLoader(face_restorer, weight)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/ai-3090/hdd_2/hoaitt/Lip_Wise/helpers/model_loaders.py", line 32, in init
self.restorer = self.load_codeformer_model()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/ai-3090/hdd_2/hoaitt/Lip_Wise/helpers/model_loaders.py", line 151, in load_codeformer_model
model = ARCH_REGISTRY.get('CodeFormer')(dim_embd=512, codebook_size=1024, n_head=8, n_layers=9, connect_list=['32', '64', '128', '256']).to(self.device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ai-3090/anaconda3/envs/lipwise/lib/python3.11/site-packages/basicsr/utils/registry.py", line 71, in get
raise KeyError(f"No object named '{name}' found in '{self._name}' registry!")
KeyError: "No object named 'CodeFormer' found in 'arch' registry!"

Colab does not work

It shows this error in last cell. Also installing basicsr does not work.

/usr/local/lib/python3.10/dist-packages/torchvision/transforms/functional_tensor.py:5: UserWarning: The torchvision.transforms.functional_tensor module is deprecated in 0.15 and will be removed in 0.17. Please don't rely on it. You probably just need to use APIs in torchvision.transforms.functional or in torchvision.transforms.v2.functional.
warnings.warn(
Traceback (most recent call last):
File "/content/Lip_Wise_GFPGAN/launch.py", line 7, in
import infer
File "/content/Lip_Wise_GFPGAN/infer.py", line 19, in
import file_check
File "/content/Lip_Wise_GFPGAN/file_check.py", line 6, in
import archs
File "/content/Lip_Wise_GFPGAN/archs/init.py", line 16, in
_arch_modules = [importlib.import_module(f'basicsr.archs.{file_name}') for file_name in arch_filenames]
File "/content/Lip_Wise_GFPGAN/archs/init.py", line 16, in
_arch_modules = [importlib.import_module(f'basicsr.archs.{file_name}') for file_name in arch_filenames]
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'basicsr.archs.vqgan_arch'

Not generating

I'm running Lip Wise on kaggle without problem. The thing is that it is not generating content at all. Video works, but CodeFormer no, only GFPGAN.

Terminal:
Initial Free Memory: 14.65 GB
Using cuda for inference.
Generating audio spectrogram...
Length of mel chunks: 58
image

:) Another issue pops up!

After uploading audio and video then submitting it. This error appears

Getting face landmarks...
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1704057844.715041 4879 task_runner.cc:85] GPU suport is not available: INTERNAL: ; RET_CHECK failure (mediapipe/gpu/gl_context_egl.cc:84) egl_initializedUnable to initialize EGL
W0000 00:00:1704057844.715464 4879 face_landmarker_graph.cc:174] Sets FaceBlendshapesGraph acceleration to xnnpack by default.
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
I0000 00:00:1704057844.738462 4879 task_runner.cc:85] GPU suport is not available: INTERNAL: ; RET_CHECK failure (mediapipe/gpu/gl_context_egl.cc:84) egl_initializedUnable to initialize EGL
Using cuda for inference.
Generating audio spectrogram...
Video is longer than audio. Truncating video...
Length of mel chunks: 424
Load GFPGAN checkpoint from: /content/Lip_Wise/weights/gfpgan/GFPGANv1.4.pth
Loading wav2lip checkpoint from: /content/Lip_Wise/weights/wav2lip/wav2lip.pth
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/gradio/queueing.py", line 489, in call_prediction
output = await route_utils.call_process_api(
File "/usr/local/lib/python3.10/dist-packages/gradio/route_utils.py", line 232, in call_process_api
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1561, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1179, in call_function
prediction = await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/dist-packages/gradio/utils.py", line 678, in wrapper
response = f(*args, **kwargs)
File "/content/Lip_Wise/infer.py", line 269, in infer_video
frame_batch, mel_batch = bp.gen_data_video_mode(cropped_faces, mels_to_input)
File "/content/Lip_Wise/batch_processors.py", line 65, in gen_data_video_mode
cropped_face = cv2.resize(cropped_face, (96, 96))
cv2.error: OpenCV(4.8.0) /io/opencv/modules/imgproc/src/resize.cpp:4062: error: (-215:Assertion failed) !ssize.empty() in function 'resize'

Also before this in the second cell this error appeared at the very end.

/usr/local/lib/python3.10/dist-packages/torchvision/transforms/functional_tensor.py:5: UserWarning: The torchvision.transforms.functional_tensor module is deprecated in 0.15 and will be removed in 0.17. Please don't rely on it. You probably just need to use APIs in torchvision.transforms.functional or in torchvision.transforms.v2.functional.
warnings.warn(
Traceback (most recent call last):
File "/content/Lip_Wise/file_check.py", line 9, in
from preprocess_mp import model_processor
File "/content/Lip_Wise/preprocess_mp.py", line 6, in
import file_check
File "/content/Lip_Wise/file_check.py", line 9, in
from preprocess_mp import model_processor
ImportError: cannot import name 'model_processor' from partially initialized module 'preprocess_mp' (most likely due to a circular import) (/content/Lip_Wise/preprocess_mp.py)

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.