SadTalker icon indicating copy to clipboard operation
SadTalker copied to clipboard

Error executing callback ui_tabs_callback for /Users/luanyang/99-rdmiddle/stable-diffusion-webui/extensions/SadTalker/scripts/extension.py

Open luanyang5986844 opened this issue 1 year ago • 3 comments

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 builtin complex. To avoid this error in existing code, use complex by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.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

luanyang5986844 avatar May 31 '24 00:05 luanyang5986844

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.

eoffermann avatar Jun 05 '24 11:06 eoffermann

go your File "/Users/luanyang/99-rdmiddle/stable-diffusion-webui/venv/lib/python3.10/site-packages/librosa/core/constantq.py", line 1058, in dtype=np.complex, change this to dtype=complex

it works for me

orkun41 avatar Jul 11 '24 15:07 orkun41

go your File "/Users/luanyang/99-rdmiddle/stable-diffusion-webui/venv/lib/python3.10/site-packages/librosa/core/constantq.py", line 1058, in dtype=np.complex, change this to dtype=np.complex_

SoftCharacter avatar Aug 03 '24 11:08 SoftCharacter