numz / sd-wav2lip-uhq

Wav2Lip UHQ extension for Automatic1111
Apache License 2.0
1.23k stars 163 forks source link

LLVM ERROR: Symbol not found: __svml_cosf4_ha #24

Closed klossm closed 1 year ago

klossm commented 1 year ago

I installed the latest version of sd-wav2lip-uhq and kept only sd-wav2lip-uhq in the extensions folder, just to troubleshoot the problem. SD-webui 1.5.1 latest version

Here is the error message from the backend: Using cuda for inference. Reading video frames... Number of frames available for inference: 459 LLVM ERROR: Symbol not found: __svml_cosf4_ha Please press any key to continue . . .

numz commented 1 year ago

Hi, sorry about that Can you tell me if your CPU is intel or AMD?

klossm commented 1 year ago

My CPU is intel I5 2500K.

numz commented 1 year ago

just for test,

klossm commented 1 year ago

I wrote this line in webui-user.bat as you said and restarted webui: set NUMBA_DISABLE_INTEL_SVML=1

but the result is still the same.

I also tried to set the environment variable in the system as follows: variable name: NUMBA_DISABLE_INTEL_SVML variable value: 1

but the result is still the same.

I even excluded the path C:\Windows\System32 to make sure there was no svml_dispmd.dll, as suggested by an internet search

numz commented 1 year ago

ok thanks, reset last change :

In the env of your webu, try to install i: pip install -c intel icc_rt

klossm commented 1 year ago

ok thanks, reset last change :

In the env of your webu, try to install i: pip install -c intel icc_rt

I tried to install it but got an error: (venv) L:\stable-diffusion>pip install -c intel icc_rt ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'intel'

Only this command will install successfully: pip install icc_rt

numz commented 1 year ago

ok and icc_rt doesnt change the result?

klossm commented 1 year ago

The result is still the same, here is the installation information:

(venv) L:\stable-diffusion>pip install icc_rt Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: icc_rt in l:\stable-diffusion\venv\lib\site-packages (2019.0) Requirement already satisfied: intel-openmp in l:\stable-diffusion\venv\lib\site-packages (from icc_rt) (2023.2.0)

numz commented 1 year ago

The lib "svml_dispmd.dll" can come from a lot of app on your computer, for example in mine I can find it 12 times ... I don't know which one is active when using python env but certainly the one I have in the a "sharedlib" folder ... ~17.8Mo, but i can find others only ~10.8 Mo. I suppose the good one is 17.8Mo one ... I really don't know it's a very low level issue ... I continue to investigate

klossm commented 1 year ago

The lib "svml_dispmd.dll" can come from a lot of app on your computer, for example in mine I can find it 12 times ... I don't know which one is active when using python env but certainly the one I have in the a "sharedlib" folder ... ~17.8Mo, but i can find others only ~10.8 Mo. I suppose the good one is 17.8Mo one ... I really don't know it's a very low level issue ... I continue to investigate

Hard work, I'm checking other sources and solutions myself, hopefully I'll find the final solution

numz commented 1 year ago

perhaps try to temporally rename the one in "c:\programmes (x86)\Common Files\intel\Shared Lib" and test please

klossm commented 1 year ago

Rename this folder to run, still the same:C:\Program Files (x86)\Common Files\Intel\Shared Files
Rename the Shared Files folder to something else, such as Shared Files-test.

numz commented 1 year ago

One thing sure is there is one of your "svml_dispmd" used in you context, if you find it I think it will work, Sorry but the only thing I can purpose is to rename them One by One and test... I know it's boring... on ~3000 clones you are 2 to have this issue...

klossm commented 1 year ago

I think I found the problem, I used tts-vue to convert the audio and tts-vue outputs the audio in MP3 format. Although it sounds fine, it causes a similar error, which I don't get with other wav voice files!Because I've watched other people's video operations using tts-vue as well, and the output is also in mp3 format, with no error reported ~~~Stupid mistake. I'm sorry.

numz commented 1 year ago

ok interresting !!!!, not a stupid mistake at all !! what does TTS-vue transform on the mp3 to generate this kind of issue...

If you have time can you almost test this minimal code?

the issue comme from one of this line in the scripts : Load your venv, replace "path" by a your wav generate in "temp" folder of "sd-wav2lip-uhq\scripts\wav2lip\temp" and copy line ,one by one until you get the error and tell me which one :) :

import librosa
from scipy import signal

path_of_the_wav = "path"
wav = librosa.core.load(path, sr=16000)[0]
D = librosa.stft(y=signal.lfilter([1, - 0.97], [1], wav), n_fft=800, hop_length=200, win_length=800)
_mel_basis = librosa.filters.mel(sr=16000, n_fft=800, n_mels=80, fmin=55, fmax=7600)
min_level = np.exp(-100 / 20 * np.log(10))
S = 20 * np.log10(np.maximum(min_level, np.dot(_mel_basis, np.abs(D)))) - 20
klossm commented 1 year ago

ok interresting !!!!, not a stupid mistake at all !! what does TTS-vue transform on the mp3 to generate this kind of issue...

If you have time can you almost test this minimal code?

the issue comme from one of this line in the scripts : Load your venv, replace "path" by a your wav generate in "temp" folder of "sd-wav2lip-uhq\scripts\wav2lip\temp" and copy line ,one by one until you get the error and tell me which one :) : ` import librosa from scipy import signal

path_of_the_wav = "path" wav = librosa.core.load(path, sr=16000)[0] D = librosa.stft(y=signal.lfilter([1, - 0.97], [1], wav), n_fft=800, hop_length=200, win_length=800) _mel_basis = librosa.filters.mel(sr=16000, n_fft=800, n_mels=80, fmin=55, fmax=7600) min_level = np.exp(-100 / 20 np.log(10)) S = 20 np.log10(np.maximum(min_level, np.dot(_mel_basis, np.abs(D)))) - 20 `

Okay, I'll try and see.

klossm commented 1 year ago

After several tests, it seems that it's not because of the mp3 format problem of TTS-vue output, I did some operations in the meantime, it seems that it's because after I installed numba=0.56.4 and found that it didn't work, I reinstalled numba==0.57.1 to play a role, and in addition, I must add a system variable NUMBADISABLE INTEL_SVML=1 or else it still gives the same error.

So the crux of the problem would be in the numba dependencies and NUMBA-related system variable settings, and it's possible that one of the aforementioned actions caused the error to be fixed just in time.I'm sorry for the convoluted question.

numz commented 1 year ago

So, to summarize, to solve the problem: Install numba==0.57.1 and set NUMBA_DISABLE_INTEL_SVML=1.

Is that correct? :)

klossm commented 1 year ago

I think so, as well as icc_rt and intel-openmp, I tried uninstalling these two dependencies , it works fine! Here are the relevant dependency versions that I have installed right now, perhaps for future reference

numba==0.57.1 llvmlite==0.40.1 imutils==0.5.4 dlib_bin==19.24.1 numpy==1.23.5 imageio_ffmpeg==0.4.4

numz commented 1 year ago

ok thank you :), hope that can help futur issuers !!