Open luanyang5986844 opened 1 month ago
Roll back to numpy 1.2x.x - I use 1.23.5
As the message you're getting says, np.complex was deprecated in 1.20. Somewhere around 2.0 it went away entirely. SadTalker uses a lot of old modules with deprecated methods. Unfortunately, that's just life with opensource projects that originated as academic research!
Somebody should probably fork it and update everything if we're going to keep using it.
Hello, I am getting this error on MacBook M2
load Sadtalker Checkpoints from /Users/luanyang/99-rdmiddle/stable-diffusion-webui/extensions/SadTalker/checkpoints ** Error executing callback ui_tabs_callback for /Users/luanyang/99-rdmiddle/stable-diffusion-webui/extensions/SadTalker/scripts/extension.py Traceback (most recent call last): File "/Users/luanyang/99-rdmiddle/stable-diffusion-webui/modules/script_callbacks.py", line 283, in ui_tabs_callback res += c.callback() or [] File "/Users/luanyang/99-rdmiddle/stable-diffusion-webui/extensions/SadTalker/scripts/extension.py", line 172, in on_ui_tabs from app_sadtalker import sadtalker_demo File "/Users/luanyang/99-rdmiddle/stable-diffusion-webui/extensions/SadTalker/app_sadtalker.py", line 3, in
from src.gradio_demo import SadTalker
File "/Users/luanyang/99-rdmiddle/stable-diffusion-webui/extensions/SadTalker/src/gradio_demo.py", line 6, in
from src.generate_batch import get_data
File "/Users/luanyang/99-rdmiddle/stable-diffusion-webui/extensions/SadTalker/src/generate_batch.py", line 8, in
import src.utils.audio as audio
File "/Users/luanyang/99-rdmiddle/stable-diffusion-webui/extensions/SadTalker/src/utils/audio.py", line 1, in
import librosa
File "/Users/luanyang/99-rdmiddle/stable-diffusion-webui/venv/lib/python3.10/site-packages/librosa/init.py", line 211, in
from . import core
File "/Users/luanyang/99-rdmiddle/stable-diffusion-webui/venv/lib/python3.10/site-packages/librosa/core/init.py", line 9, in
from .constantq import # pylint: disable=wildcard-import
File "/Users/luanyang/99-rdmiddle/stable-diffusion-webui/venv/lib/python3.10/site-packages/librosa/core/constantq.py", line 1058, in
dtype=np.complex,
File "/Users/luanyang/99-rdmiddle/stable-diffusion-webui/venv/lib/python3.10/site-packages/numpy/init.py", line 324, in getattr
raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'complex'.
np.complex
was a deprecated alias for the builtincomplex
. To avoid this error in existing code, usecomplex
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, usenp.complex128
here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations