Arminius-Software / face2video

MIT License
69 stars 4 forks source link

It worked until i had to wipe my PC.. #9

Open killaxea opened 1 month ago

killaxea commented 1 month ago

It worked amazingly well.. until this morning when i needed to wipe my PC and reinstall literally everything, stable diffusion 1111 and stable diffusion forge are working fine but this face2video ..instantly opens and instantly closes when trying to run, i can get it to stay open with cmd /k (i think it was) and get the program to work, except it doesnt extract frames or swap faces, etc

(venv) C:\Users\Eternus\Documents\face2video-main>python main.py

A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.1 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 "C:\Users\Eternus\Documents\face2video-main\main.py", line 1, in import get_frames_from_video File "C:\Users\Eternus\Documents\face2video-main\get_frames_from_video.py", line 1, in import cv2 File "C:\Users\Eternus\Documents\face2video-main\venv\lib\site-packages\cv2__init.py", line 181, in bootstrap() File "C:\Users\Eternus\Documents\face2video-main\venv\lib\site-packages\cv2\init.py", line 153, in bootstrap native_module = importlib.import_module("cv2") File "C:\Users\Eternus\AppData\Local\Programs\Python\Python310\lib\importlib\init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) AttributeError: _ARRAY_API not found Traceback (most recent call last): File "C:\Users\Eternus\Documents\face2video-main\main.py", line 1, in import get_frames_from_video File "C:\Users\Eternus\Documents\face2video-main\get_frames_from_video.py", line 1, in import cv2 File "C:\Users\Eternus\Documents\face2video-main\venv\lib\site-packages\cv2\init.py", line 181, in bootstrap() File "C:\Users\Eternus\Documents\face2video-main\venv\lib\site-packages\cv2\init.py", line 153, in bootstrap native_module = importlib.import_module("cv2") File "C:\Users\Eternus\AppData\Local\Programs\Python\Python310\lib\importlib\init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: numpy.core.multiarray failed to import

(venv) C:\Users\Eternus\Documents\face2video-main>

i think my issue is numpy? i downgraded, i upgraded - nothing worked, can you help me? :(

killaxea commented 1 month ago

well i got numpy installed and open-CV corrrectly installed, that took 2 hours lol

Now when swapping the face it says CUDA_PATH is set but CUDA wasn't able to be loaded

Looks like torch isnt installed, i guess, so im gonna do that first, and get back to you

killaxea commented 1 month ago

RuntimeError: D:\a_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:891 onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasnt able to be loaded. Please install the correct version of CUDA andcuDNN as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported.

CUDA is installed, not sure why there is an error

killaxea commented 1 month ago

on CPU works but.....

Finished image 1 of 235 Finished image 2 of 235 Finished image 3 of 235

"error while saving JPG" on each image

Arminius-Software commented 1 month ago

Hi, I have taken a closer look at this issue, and the newest version should now both install the correct NumPy version by default and save the images correctly again. This error appears to have been caused by the newest Reactor update. Let me know if you still have any issues after pulling the latest Version (with a fresh venv).

killaxea commented 1 month ago

Its working now thanks to your update and also this:

I had to download and get installed CUDA_CUDNN and add those to my cuda toolkit, then add to path, can you add that to the main page for installation? i had cuda 11.7 so i needed CUDNN 8.x.x

killaxea commented 1 month ago

actually its only working on CPU, CUDA/gpu doesnt work, it wont save the files, says onnxruntime error

i have RTX 4060, cuda 11.7, cudnn installed, set to path, very sure onnx is installed

Arminius-Software commented 1 month ago

Interesting, it seems to work fine for me with CUDA 11.8. Can you confirm that Reactor itself works with CUDA for you? (You can switch between CPU and CUDA in the Settings in automatic1111/Reactor). You also might need to restart automatic1111 if you switch between CPU and GPU in this script.

If CUDA indeed needs to be installed for this script to be able to run on the GPU, then a disclaimer/guide for that in the README would be nice. However, I want to make sure that this is actually the case before adding something like this first.