OpenTalker / SadTalker

[CVPR 2023] SadTalker:Learning Realistic 3D Motion Coefficients for Stylized Audio-Driven Single Image Talking Face Animation

Home Page:https://sadtalker.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After adding SadTalker in WebUI and restarting, received an error report

ye-pei-sheng opened this issue · comments

`face-alignment False
Installing requirements for SadTalker
imageio True
imageio-ffmpeg False
Installing requirements for SadTalker
librosa False
Installing requirements for SadTalker
pydub True
scipy True
tqdm True
yacs False
Installing requirements for SadTalker
pyyaml False
Installing requirements for SadTalker
dlib False
Installing requirements for SadTalker
gfpgan True
download models for SadTalker
'bash' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
Error executing callback ui_tabs_callback for H:\SDW\stable-diffusion-webui\extensions\SadTalker\scripts\extension.py
Traceback (most recent call last):
File "H:\SDW\stable-diffusion-webui\modules\script_callbacks.py", line 125, in ui_tabs_callback
res += c.callback() or []
File "H:\SDW\stable-diffusion-webui\extensions\SadTalker\scripts\extension.py", line 62, in on_ui_tabs
install()
File "H:\SDW\stable-diffusion-webui\extensions\SadTalker\scripts\extension.py", line 57, in install
launch.run("cd " + paths.script_path+"/extensions/SadTalker && bash ./scripts/download_models.sh", live=True)
File "H:\SDW\stable-diffusion-webui\launch.py", line 81, in run
raise RuntimeError(f"""{errdesc or 'Error running command'}.
RuntimeError: Error running command.
Command: cd H:\SDW\stable-diffusion-webui/extensions/SadTalker && bash ./scripts/download_models.sh
Error code: 1

Running on local URL: http://127.0.0.1:7860`

可以手动下载checkpoints, 然后在webui_user.bat 里面添加环境变量SADTALKER_CHECKPOINTS=XXX,如下图:
image

commented

执行转换时报错
Startup time: 400.0s (import torch: 5.5s, import gradio: 6.1s, import ldm: 1.3s, other imports: 3.2s, setup codeformer: 0.2s, load scripts: 6.1s, load SD checkpoint: 10.3s, create ui: 365.6s, gradio launch: 1.2s, scripts app_started_callback: 0.3s).
Traceback (most recent call last):
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gradio\processing_utils.py", line 197, in audio_from_file
audio = AudioSegment.from_file(filename)
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\pydub\audio_segment.py", line 728, in from_file
info = mediainfo_json(orig_file, read_ahead_limit=read_ahead_limit)
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\pydub\utils.py", line 274, in mediainfo_json
res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE)
File "E:\Miniconda3\envs\aigc\lib\subprocess.py", line 971, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "E:\Miniconda3\envs\aigc\lib\subprocess.py", line 1440, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] 系统找不到指定的文件。

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 394, in run_predict
output = await app.get_blocks().process_api(
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1073, in process_api
inputs = self.preprocess_data(fn_index, inputs, state)
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 962, in preprocess_data
processed_input.append(block.preprocess(inputs[i]))
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 2147, in preprocess
sample_rate, data = processing_utils.audio_from_file(
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gradio\processing_utils.py", line 207, in audio_from_file
raise RuntimeError(msg) from e
RuntimeError: Cannot load audio from file: ffprobe not found. Please install ffmpeg in your system to use non-WAV audio file formats and make sure ffprobe is in your PATH.

commented

windows需要下载ffmpeg,参考这里:https://github.com/Winfredy/SadTalker/blob/main/docs/install.md#windows-native

好的, 谢谢

commented

执行中报错
.\extensions\SadTalker\checkpoints\shape_predictor_68_face_landmarks.dat
.\extensions\SadTalker\checkpoints\auido2pose_00140-model.pth
.\extensions\SadTalker\checkpoints\facevid2vid_00189-model.pth.tar
C:\Users\101\AppData\Local\Temp\tmp1y2ylmv4.png
Traceback (most recent call last):
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 394, in run_predict
output = await app.get_blocks().process_api(
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1075, in process_api
result = await self.call_function(
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 884, in call_function
prediction = await anyio.to_thread.run_sync(
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\modules\call_queue.py", line 15, in f
res = func(*args, **kwargs)
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui/extensions/SadTalker\src\gradio_demo.py", line 110, in test
first_coeff_path, crop_pic_path, crop_info = self.preprocess_model.generate(pic_path, first_frame_dir,preprocess)
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui/extensions/SadTalker\src\utils\preprocess.py", line 85, in generate
if crop_or_resize.lower() == 'crop': # default crop
AttributeError: 'bool' object has no attribute 'lower'

这个bug今天应该已经修复了,可以更新最新的试试

commented

直接下载代码zip压缩包, 然后解压覆盖到sd插件文件夹可以吗?我这边直接用install from url老出问题, 安装是手动安装的,

可以的~

commented

可以的~

安装了最新版, 勾选了full模式和 GFPGAN as face..., 还是报错了
video:697kB audio:31kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.468502%
[aac @ 0000029d9831c300] Qavg: 58407.371
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '17775c03-2886-49dc-a525-24c45b723646.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf60.4.101
Duration: 00:00:04.56, start: 0.000000, bitrate: 1314 kb/s
Stream #0:00x1: Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 768x768 [SAR 1:1 DAR 1:1], 1252 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:10x2: Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 55 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
docs/sadtalker_logo.png: No such file or directory
The generated video is named ./results/68580a99-6cf4-4116-807b-996447fad9c6/tmp5imophln##爱你呦语音测试-0-100_full.mp4
face enhancer....
Face Enhancer:: 0%| | 0/82 [00:00<?, ?it/s][ WARN:0@296.296] global loadsave.cpp:244 cv::findDecoder imread_('.'): can't open/read file: check file path/integrity
Face Enhancer:: 0%| | 0/82 [00:00<?, ?it/s]
Traceback (most recent call last):
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 394, in run_predict
output = await app.get_blocks().process_api(
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1075, in process_api
result = await self.call_function(
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 884, in call_function
prediction = await anyio.to_thread.run_sync(
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\modules\call_queue.py", line 15, in f
res = func(*args, **kwargs)
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui/extensions/SadTalker\src\gradio_demo.py", line 121, in test
return_path = self.animate_from_coeff.generate(data, save_dir, pic_path, crop_info, enhancer='gfpgan' if use_enhancer else None, preprocess=preprocess)
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui/extensions/SadTalker\src\facerender\animate.py", line 202, in generate
enhanced_images = face_enhancer(full_video_path, method=enhancer, bg_upsampler=background_enhancer)
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui/extensions/SadTalker\src\utils\face_enhancer.py", line 81, in enhancer
cropped_faces, restored_faces, r_img = restorer.enhance(
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gfpgan\utils.py", line 109, in enhance
self.face_helper.read_image(img)
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\facexlib\utils\face_restoration_helper.py", line 114, in read_image
if np.max(img) > 256: # 16-bit image
TypeError: '>' not supported between instances of 'NoneType' and 'int'

这个是看起来没有输入图,没有gfpgan呢?

commented

full模式应该是有问题, crop 和 resize不加其他选项都可以, resize的尺寸没有可选项不知道resize后的尺寸是多少, full模式没有加其他选项报错,
[aist#1:0/pcm_s16le @ 0000016b32defd80] Guessed Channel Layout: mono
Input #1, wav, from './results/1992305a-1eb9-4263-9898-578d86620a8c\爱你呦语音测试-0-100.wav':
Duration: 00:00:04.56, bitrate: 256 kb/s
Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, 1 channels, s16, 256 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mp4, to '4ab3a017-782f-40c1-9dd2-fe1bb602aed6.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf60.4.101
Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 768x768 [SAR 1:1 DAR 1:1], q=2-31, 1291 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 69 kb/s
Metadata:
encoder : Lavc60.9.100 aac
frame= 114 fps=0.0 q=-1.0 Lsize= 753kB time=00:00:04.54 bitrate=1358.2kbits/s speed= 36x
video:719kB audio:31kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.454960%
[aac @ 0000016b32e0c300] Qavg: 58407.371
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '4ab3a017-782f-40c1-9dd2-fe1bb602aed6.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf60.4.101
Duration: 00:00:04.56, start: 0.000000, bitrate: 1353 kb/s
Stream #0:00x1: Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 768x768 [SAR 1:1 DAR 1:1], 1291 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:10x2: Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 55 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
docs/sadtalker_logo.png: No such file or directory
The generated video is named ./results/1992305a-1eb9-4263-9898-578d86620a8c/tmpnbdr2e1_##爱你呦语音测试-0-100_full.mp4
The generated video is named tmpnbdr2e1_##爱你呦语音测试-0-100 in ./results/1992305a-1eb9-4263-9898-578d86620a8c
Traceback (most recent call last):
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 394, in run_predict
output = await app.get_blocks().process_api(
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1078, in process_api
data = self.postprocess_data(fn_index, result["prediction"], state)
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1012, in postprocess_data
prediction_value = block.postprocess(prediction_value)
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 1991, in postprocess
y = self.make_temp_copy_if_needed(y)
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gradio\processing_utils.py", line 362, in make_temp_copy_if_needed
temp_dir = self.hash_file(file_path)
File "E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\venv\lib\site-packages\gradio\processing_utils.py", line 334, in hash_file
with open(file_path, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: './results/1992305a-1eb9-4263-9898-578d86620a8c\tmpnbdr2e1_##爱你呦语音测试-0-100_full.mp4'

commented

我img2img 放大图片功能是没问题, 怎么验证您说的GFPGAN呢

commented

试了下resize配合开GFPGAN可以用, resize的图太小, 然后脸崩了,

试了下resize配合开GFPGAN可以用, resize的图太小, 然后脸崩了,

现在就是full+gfpgan会失败是吧?

commented

试了下resize配合开GFPGAN可以用, resize的图太小, 然后脸崩了,

现在就是full+gfpgan会失败是吧?

单纯的full也会失败

试了下resize配合开GFPGAN可以用, resize的图太小, 然后脸崩了,

增加了一个最佳实践的文档说明:
https://github.com/Winfredy/SadTalker/blob/main/docs/best_practice.md

试了下resize配合开GFPGAN可以用, resize的图太小, 然后脸崩了,

现在就是full+gfpgan会失败是吧?

单纯的full也会失败

需要把docs/sadtalker_logo.png放到docs里。full会自动添加水印

commented

试了下resize配合开GFPGAN可以用, resize的图太小, 然后脸崩了,

增加了一个最佳实践的文档说明: https://github.com/Winfredy/SadTalker/blob/main/docs/best_practice.md

好的, docs/sadtalker_logo.png 这个图片已经存在了

image

根据你这里的log是没有这个文件。
commented

但我这里确实这个文件已经存在了, E:\AIGC\stable-diffusion-webui-master\stable-diffusion-webui\extensions\SadTalker\docs\sadtalker_logo.png

https://github.com/Winfredy/SadTalker/blob/cf2d4b9b40ed121a27a78f2c9585d065ea9096de/src/utils/paste_pic.py#L49

这一句变成

 save_video_with_watermark(tmp_path, new_audio_path, full_video_path, watermark=None) 
commented

这样不就没水印了, 我看了下是cd路径的问题, 执行save_video_with_watermark函数的时候当前路径在sd-webui项目的根目录, 只需要在执行这个语句前加入判断当前cd目录是含有sd特有的webui-user.bat, 如果存在 ./webui-user.bat 则logo路径为 ./extensions/SadTalker/docs/sadtalker_logo.png
同时也需要同时把results文件夹的路径也改为 ./outputs/SadTalker, 现在的results文件夹是在SD-webui的项目文件夹里

这部分逻辑会更新

commented

这部分逻辑会更新

感谢您耐心的讲解和奉献, 辛苦了

已经按照提示添加了环境变量SADTALKER_CHECKPOINTS,下载了模型,并安装了ffmpeg,但是启动WebUI时,还是会有和当初类似的错误提示:

face-alignment False
Installing requirements for SadTalker
imageio True
imageio-ffmpeg False
Installing requirements for SadTalker
librosa True
pydub True
scipy True
tqdm True
yacs True
pyyaml False
Installing requirements for SadTalker
dlib True
gfpgan True
download models for SadTalker
'bash' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
Error executing callback ui_tabs_callback for H:\SDW\stable-diffusion-webui\extensions\SadTalker\scripts\extension.py
Traceback (most recent call last):
File "H:\SDW\stable-diffusion-webui\modules\script_callbacks.py", line 125, in ui_tabs_callback
res += c.callback() or []
File "H:\SDW\stable-diffusion-webui\extensions\SadTalker\scripts\extension.py", line 62, in on_ui_tabs
install()
File "H:\SDW\stable-diffusion-webui\extensions\SadTalker\scripts\extension.py", line 57, in install
launch.run("cd " + paths.script_path+"/extensions/SadTalker && bash ./scripts/download_models.sh", live=True)
File "H:\SDW\stable-diffusion-webui\launch.py", line 81, in run
raise RuntimeError(f"""{errdesc or 'Error running command'}.
RuntimeError: Error running command.
Command: cd H:\SDW\stable-diffusion-webui/extensions/SadTalker && bash ./scripts/download_models.sh
Error code: 1

SADTALKER_CHECKPOINTS

如果设置了环境变量应该会跳过去,启动的时候用的哪个命令呀?

SADTALKER_CHECKPOINTS

如果设置了环境变量应该会跳过去,启动的时候用的哪个命令呀?


set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--opt-sdp-no-mem-attention
set SADTALKTER_CHECKPOINTS=H:\SDW\stable-diffusion-webui\SadTalker\checkpoints

call webui.bat


这是按照您上面的回复修改的,模型也都下载到(H:\SDW\stable-diffusion-webui\SadTalker\checkpoints)目录了

需要使用webui_user.bat

需要使用webui_user.bat

修改的就是 webui_user.bat 文件。
在 WebUI 的【已安装应用】中,可见 SadTalker 项目(开始通过url完成安装,后又下载了最新文件包进行了覆盖),但是顶部没有出现相关的菜单栏。

配置情况如下:
python: 3.10.6  •  torch: 2.1.0.dev20230329+cu118  •  xformers: N/A  •  gradio: 3.23.0  •  commit: [22bcc7be]

@vinthony
image

image

发现从sdwebui中执行到了face Enhancer 阶段会非常的缓慢。
但是如果我从命令行执行相同的程序,face Enhancer阶段也是非常的快,请问这两者有什么差别吗?
image

命令行方式的参数如下:

python /mnt/storage/SadTalker/inference.py --driven_audio /mnt/storage/upload/test-1sp.wav --source_image /mnt/storage/upload/2-2.png --result_dir /mnt/storage/output --still --preprocess full --enhancer gfpgan

@vinthony image

image

发现从sdwebui中执行到了face Enhancer 阶段会非常的缓慢。 但是如果我从命令行执行相同的程序,face Enhancer阶段也是非常的快,请问这两者有什么差别吗? image

命令行方式的参数如下:

python /mnt/storage/SadTalker/inference.py --driven_audio /mnt/storage/upload/test-1sp.wav --source_image /mnt/storage/upload/2-2.png --result_dir /mnt/storage/output --still --preprocess full --enhancer gfpgan

我知道了,我在sdwebui的extensions下面是做的软连接链接到/mnt/storage/SadTalker目录下的。但是代码src/utils/face_enhancer.py中查找gfpgan的路径还是去找 model_path = os.path.join('gfpgan/weights', model_name + '.pth')
路径找不到,会变成URL下载

C:\stable-diffusion-webui-master\extensions\SadTalker\checkpoints\shape_predictor_68_face_landmarks.dat
Error verifying pickled file from C:\stable-diffusion-webui-master\extensions\SadTalker\checkpoints\hub\checkpoints\s3fd-619a316812.pth:
Traceback (most recent call last):
File "C:\stable-diffusion-webui-master\modules\safe.py", line 81, in check_pt
with zipfile.ZipFile(filename) as z:
File "C:\Users\LordDM\anaconda3\lib\zipfile.py", line 1266, in init
self._RealGetContents()
File "C:\Users\LordDM\anaconda3\lib\zipfile.py", line 1333, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\stable-diffusion-webui-master\modules\safe.py", line 135, in load_with_extra
check_pt(filename, extra_handler)
File "C:\stable-diffusion-webui-master\modules\safe.py", line 102, in check_pt
unpickler.load()
File "C:\stable-diffusion-webui-master\modules\safe.py", line 62, in find_class
raise Exception(f"global '{module}/{name}' is forbidden")
Exception: global 'torch._utils/_rebuild_tensor' is forbidden

The file may be malicious, so the program is not going to read it.
You can skip this check with --disable-safe-unpickle commandline argument.

Traceback (most recent call last):
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api
result = await self.call_function(
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function
prediction = await anyio.to_thread.run_sync(
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "C:\stable-diffusion-webui-master\modules\call_queue.py", line 15, in f
res = func(*args, **kwargs)
File "C:\stable-diffusion-webui-master/extensions/SadTalker\src\gradio_demo.py", line 64, in test
self.preprocess_model = CropAndExtract(self.path_of_lm_croper, self.path_of_net_recon_model, self.dir_of_BFM_fitting, self.device)
File "C:\stable-diffusion-webui-master/extensions/SadTalker\src\utils\preprocess.py", line 46, in init
self.kp_extractor = KeypointExtractor(device)
File "C:\stable-diffusion-webui-master/extensions/SadTalker\src\face3d\extract_kp_videos.py", line 16, in init
self.detector = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, device=device)
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\face_alignment\api.py", line 77, in init
self.face_detector = face_detector_module.FaceDetector(device=device, verbose=verbose, **face_detector_kwargs)
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\face_alignment\detection\sfd\sfd_detector.py", line 30, in init
self.face_detector.load_state_dict(model_weights)
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\torch\nn\modules\module.py", line 1624, in load_state_dict
raise TypeError("Expected state_dict to be dict-like, got {}.".format(type(state_dict)))
TypeError: Expected state_dict to be dict-like, got <class 'NoneType'>.

--disable-safe-unpickle is needed as discussed above

--disable-safe-unpickle is needed as discussed above

now

C:\stable-diffusion-webui-master\extensions\SadTalker\checkpoints\shape_predictor_68_face_landmarks.dat
C:\stable-diffusion-webui-master\extensions\SadTalker\checkpoints\auido2pose_00140-model.pth
Traceback (most recent call last):
File "C:\stable-diffusion-webui-master/extensions/SadTalker\src\test_audio2coeff.py", line 41, in init
load_cpk(audio2pose_checkpoint, model=self.audio2pose_model, device=device)
File "C:\stable-diffusion-webui-master/extensions/SadTalker\src\test_audio2coeff.py", line 13, in load_cpk
checkpoint = torch.load(checkpoint_path, map_location=torch.device(device))
File "C:\stable-diffusion-webui-master\modules\safe.py", line 106, in load
return load_with_extra(filename, extra_handler=global_extra_handler, *args, **kwargs)
File "C:\stable-diffusion-webui-master\modules\safe.py", line 151, in load_with_extra
return unsafe_torch_load(filename, *args, **kwargs)
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\torch\serialization.py", line 771, in load
with _open_file_like(f, 'rb') as opened_file:
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\torch\serialization.py", line 270, in _open_file_like
return _open_file(name_or_buffer, mode)
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\torch\serialization.py", line 251, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'C:\stable-diffusion-webui-master\extensions\SadTalker\checkpoints\auido2pose_00140-model.pth'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api
result = await self.call_function(
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function
prediction = await anyio.to_thread.run_sync(
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "C:\stable-diffusion-webui-master\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "C:\stable-diffusion-webui-master\modules\call_queue.py", line 15, in f
res = func(*args, **kwargs)
File "C:\stable-diffusion-webui-master/extensions/SadTalker\src\gradio_demo.py", line 67, in test
self.audio_to_coeff = Audio2Coeff(self.audio2pose_checkpoint, self.audio2pose_yaml_path,
File "C:\stable-diffusion-webui-master/extensions/SadTalker\src\test_audio2coeff.py", line 43, in init
raise Exception("Failed in loading audio2pose_checkpoint")
Exception: Failed in loading audio2pose_checkpoint

I'm sorry it was my mistake, I didn't download the models well, thank you very much.

Now everything is fine.

commented

Error executing callback ui_tabs_callback for E:\novelai-webui-aki-v3\extensions\SadTalker\scripts\extension.py
Traceback (most recent call last):
File "E:\novelai-webui-aki-v3\modules\script_callbacks.py", line 119, in ui_tabs_callback
res += c.callback() or []
File "E:\novelai-webui-aki-v3\extensions\SadTalker\scripts\extension.py", line 68, in on_ui_tabs
install()
File "E:\novelai-webui-aki-v3\extensions\SadTalker\scripts\extension.py", line 64, in install
download_model(paths.script_path+'/extensions/SadTalker/checkpoints')
File "E:\novelai-webui-aki-v3\extensions\SadTalker\scripts\extension.py", line 14, in download_model
snapshot_download(repo_id=REPO_ID, local_dir=local_dir, local_dir_use_symlinks=True)
File "E:\novelai-webui-aki-v3\py310\lib\site-packages\huggingface_hub\utils_deprecation.py", line 101, in inner_f
return f(*args, **kwargs)
File "E:\novelai-webui-aki-v3\py310\lib\site-packages\huggingface_hub\utils_validators.py", line 124, in _inner_fn
return fn(*args, **kwargs)
TypeError: snapshot_download() got an unexpected keyword argument 'local_dir'
这是什么原因呢?秋叶大佬整合包,2023年第8周包不支持么?

commented

另外,好像高清一点的图片就不行了,求修复,wai2lip可以的,本地部署之后试出来的,高清图片不行

这个是huggingface_hub包的版本问题。两种方案,第一种,手动设置 SADTALKER_CHECKPOINTS,参考上面的回复。第二种就是更新huggingface_hub,可以在extensions/SadTalker/scripts/extension.py中添加第48行的内容:
image

--disable-safe-unpickle is needed as discussed above

重新通过网址安装新版本后,照上图编辑了extension.py,将模型复制到了 webui\extensions\SadTalker\checkpoints,重启后,显示了另一个错误:

Error loading script: extension.py
Traceback (most recent call last):
File "H:\SDW\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "H:\SDW\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 879, in exec_module
File "", line 1017, in get_code
File "", line 947, in source_to_code
File "", line 241, in _call_with_frames_removed
File "H:\SDW\stable-diffusion-webui\extensions\SadTalker\scripts\extension.py", line 49
"gfpgan": "gfpgan",
^
SyntaxError: invalid syntax

这个是huggingface_hub包的版本问题。两种方案,第一种,手动设置 SADTALKER_CHECKPOINTS,参考上面的回复。第二种就是更新huggingface_hub,可以在extensions/SadTalker/scripts/extension.py中添加第48行的内容: image

终于安装上了!

总结:
1、在线安装最新版本
2、webui-user.bat 添加 set SADTALKER_CHECKPOINTS=(webui默认目录名)\extensions\SadTalker\checkpoints
3、复制模型到(webui默认目录名)\extensions\SadTalker\checkpoints
即可。

之前的错误,主要是:
1、组件没有更新到最新版;
2、之前模型一直是放在另一个目录里的,即使在webui-user.bat中添加指定目录,还是会报错,只能使用默认路径。

commented

看了大家的步骤 ,还是解决不了这个问题,忽然想到webui_user.bat里的call webui.bat,才发现要从webui-user.bat启动,终于解决了😂

pyyaml False
Installing requirements for SadTalker
dlib True
huggingface_hub True
gfpgan True
Error executing callback ui_tabs_callback for E:\AIhuihua\extensions\SadTalker\scripts\extension.py
Traceback (most recent call last):
File "E:\AIhuihua\modules\script_callbacks.py", line 125, in ui_tabs_callback
res += c.callback() or []
File "E:\AIhuihua\extensions\SadTalker\scripts\extension.py", line 69, in on_ui_tabs
install()
File "E:\AIhuihua\extensions\SadTalker\scripts\extension.py", line 65, in install
download_model(paths.script_path+'/extensions/SadTalker/checkpoints')
File "E:\AIhuihua\extensions\SadTalker\scripts\extension.py", line 14, in download_model
snapshot_download(repo_id=REPO_ID, local_dir=local_dir, local_dir_use_symlinks=True)
File "E:\AIhuihua\py310\lib\site-packages\huggingface_hub\utils_deprecation.py", line 101, in inner_f
return f(*args, **kwargs)
File "E:\AIhuihua\py310\lib\site-packages\huggingface_hub\utils_validators.py", line 124, in _inner_fn
return fn(*args, **kwargs)
TypeError: snapshot_download() got an unexpected keyword argument 'local_dir'
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。
大佬,这个问题怎么解决,我48行添加了"huggingface_hub":"huggingface_hub==0.13.4",还是不得

pyyaml False Installing requirements for SadTalker dlib True huggingface_hub True gfpgan True Error executing callback ui_tabs_callback for E:\AIhuihua\extensions\SadTalker\scripts\extension.py Traceback (most recent call last): File "E:\AIhuihua\modules\script_callbacks.py", line 125, in ui_tabs_callback res += c.callback() or [] File "E:\AIhuihua\extensions\SadTalker\scripts\extension.py", line 69, in on_ui_tabs install() File "E:\AIhuihua\extensions\SadTalker\scripts\extension.py", line 65, in install download_model(paths.script_path+'/extensions/SadTalker/checkpoints') File "E:\AIhuihua\extensions\SadTalker\scripts\extension.py", line 14, in download_model snapshot_download(repo_id=REPO_ID, local_dir=local_dir, local_dir_use_symlinks=True) File "E:\AIhuihua\py310\lib\site-packages\huggingface_hub\utils_deprecation.py", line 101, in inner_f return f(*args, **kwargs) File "E:\AIhuihua\py310\lib\site-packages\huggingface_hub\utils_validators.py", line 124, in _inner_fn return fn(*args, **kwargs) TypeError: snapshot_download() got an unexpected keyword argument 'local_dir' 提示:Python 运行时抛出了一个异常。请检查疑难解答页面。 大佬,这个问题怎么解决,我48行添加了"huggingface_hub":"huggingface_hub==0.13.4",还是不得

可以手动指定checkpoint的位置,
image

你好,第一种也添加了,第二中也添加了,启动还是一样报错像我发出来的那种,模型已经放到checkpoints里面了 该邮件从移动设备发送  

------------------ 原始邮件 ------------------ 发件人: "Winfredy/SadTalker" @.>; 发送时间: 2023年4月11日(星期二) 凌晨0:05 @.>; @.@.>; 主题: Re: [Winfredy/SadTalker] After adding SadTalker in WebUI and restarting, received an error report (Issue #78) 这个是huggingface_hub包的版本问题。两种方案,第一种,手动设置 SADTALKER_CHECKPOINTS,参考上面的回复。第二种就是更新huggingface_hub,可以在extensions/SadTalker/scripts/extension.py中添加第48行的内容: — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

要设置环境变量,set SADTALKER_CHECKPOINTS=(webui默认目录名)\extensions\SadTalker\checkpoints,因为秋叶一键包不是从webui_user.bat启动的,及复制模型到(webui默认目录名)\extensions\SadTalker\checkpoints。我刚刚解决了

commented

关于用秋叶的启动器无法显示的问题,按前面的设置好之后,用webui-user.bat启动就成功显示了 =_= 。

commented

image没有UI怎么办

可以看一下log,应该是checkpoints路径没有设置正确

commented

image
这是什么情况!

音频文件只支持MP3或者wav。

commented

image
这里怎么处理

上吗的error应该不是Sadalker的问题哦,然后程序还在处理,下面face renderer那边的进度条是你的audio好像比较长,正在处理中。

commented

image
一天了~~~

你是CPU跑的吗😂

这样渲染的时候可能会爆显存。推荐audio 切段

commented

这样渲染的时候可能会爆显存。推荐音频切段

我在调试用GPU跑,运行环境总是有问题,先跑着吧 快一半了 也不能关了呀。。

我用的是云版本 (谷歌colab) 的SD,我已经安装了SadTalker,并且已经安装了model,但是运行SadTalker点了generate后,显示Error,不知道是什么原因

colab那边有log吗

colab那边有log吗

报错信息如下:
File "/usr/local/lib/python3.9/dist-packages/gradio/routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 1015, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 833, in call_function
prediction = await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.9/dist-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/call_queue.py", line 15, in f
res = func(*args, **kwargs)
File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/SadTalker/src/gradio_demo.py", line 65, in test
self.audio_to_coeff = Audio2Coeff(self.audio2pose_checkpoint, self.audio2pose_yaml_path,
File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/SadTalker/src/test_audio2coeff.py", line 35, in init
self.audio2pose_model = Audio2Pose(cfg_pose, wav2lip_checkpoint, device=device)
File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/SadTalker/src/audio2pose_models/audio2pose.py", line 15, in init
self.audio_encoder = AudioEncoder(wav2lip_checkpoint, device)
File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/SadTalker/src/audio2pose_models/audio_encoder.py", line 45, in init
wav2lip_state_dict = torch.load(wav2lip_checkpoint, map_location=torch.device(device))['state_dict']
File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/safe.py", line 106, in load
return load_with_extra(filename, extra_handler=global_extra_handler, *args, **kwargs)
File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/safe.py", line 151, in load_with_extra
return unsafe_torch_load(filename, *args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/torch/serialization.py", line 795, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python3.9/dist-packages/torch/serialization.py", line 1020, in _legacy_load
typed_storage._storage._set_from_file(
RuntimeError: unexpected EOF, expected 15613475 more bytes. The file might be corrupted.

wav2lip_checkpoint 好像没有正确下载?

能在SDWEBUI作为扩展使用,到最后出视频之前,总会弹出如下错误,请问怎么解决。

Exception in callback _ProactorBasePipeTransport._call_connection_lost(None)
handle: <Handle _ProactorBasePipeTransport._call_connection_lost(None)>
Traceback (most recent call last):
File "E:\SDWebUI230418\python\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "E:\SDWebUI230418\python\lib\asyncio\proactor_events.py", line 162, in _call_connection_lost
self._sock.shutdown(socket.SHUT_RDWR)
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。

这个好像是sdwebui的bug AUTOMATIC1111/stable-diffusion-webui#7524

THX

请问这个问题怎么解决
Traceback (most recent call last):
File "D:\novelai-webui-aki-v3\py310\lib\site-packages\gradio\routes.py", line 394, in run_predict
output = await app.get_blocks().process_api(
File "D:\novelai-webui-aki-v3\py310\lib\site-packages\gradio\blocks.py", line 1075, in process_api
result = await self.call_function(
File "D:\novelai-webui-aki-v3\py310\lib\site-packages\gradio\blocks.py", line 884, in call_function
prediction = await anyio.to_thread.run_sync(
File "D:\novelai-webui-aki-v3\py310\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "D:\novelai-webui-aki-v3\py310\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "D:\novelai-webui-aki-v3\py310\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "D:\novelai-webui-aki-v3\modules\call_queue.py", line 15, in f
res = func(*args, **kwargs)
File "D:\novelai-webui-aki-v3/extensions/SadTalker\src\gradio_demo.py", line 111, in test
first_coeff_path, crop_pic_path, crop_info = self.preprocess_model.generate(pic_path, first_frame_dir, preprocess)
File "D:\novelai-webui-aki-v3/extensions/SadTalker\src\utils\preprocess.py", line 94, in generate
x_full_frames, crop, quad = self.croper.crop(x_full_frames, still=True, xsize=512)
File "D:\novelai-webui-aki-v3/extensions/SadTalker\src\utils\croper.py", line 170, in crop
raise 'can not detect the landmark from source image'
TypeError: exceptions must derive from BaseException
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

hi,这个是没有检测到人脸【我们不支持二次元的图像】。可以换张图。

hi,这个是没有检测到人脸【我们不支持二次元的图像】。可以换张图。

谢谢,我所使用的图片脸部画面占比比较小,已近替换了其他脸部画面面积更大的图片,成功运行了。非常感谢!!

出现了一个新的问题,请再帮我解答一下:
我的outputs文件夹路径是:D:\novelai-webui-aki-v3\outputs,我尝试修改extension.py中tex2img路径无法成功,
...
File "D:\novelai-webui-aki-v3\extensions\SadTalker\scripts\extension.py", line 50, in get_img_from_txt2img
img_from_txt_path = os.path.join(imgs_from_txt_dir, imgs[-1])
IndexError: list index out of range
...
THX!

早期的sdwebui不会有时间的文件夹,可以尝试更新sdwebui或者把scripts/extensions.py48行变成

imgs = glob.glob(imgs_from_txt_dir+'/*.png')

Error while decoding stream #0:0: Invalid data found when processing input
[graph_0_in_0_0 @ 0000013c29347bc0] Value inf for parameter 'time_base' out of range [0 - 2.14748e+09]
Last message repeated 1 times
[graph_0_in_0_0 @ 0000013c29347bc0] Error setting option time_base to value 1/0.
[graph_0_in_0_0 @ 0000013c29347bc0] Error applying generic filter options.
Error reinitializing filters!
Error while filtering: Result too large
[aost#0:0/pcm_s16le @ 0000013c29349ec0] Finishing stream without any data written to it.
[graph_0_in_0_0 @ 0000013c29347340] Value inf for parameter 'time_base' out of range [0 - 2.14748e+09]
Last message repeated 1 times
[graph_0_in_0_0 @ 0000013c29347340] Error setting option time_base to value 1/0.
[graph_0_in_0_0 @ 0000013c29347340] Error applying generic filter options.
[aost#0:0/pcm_s16le @ 0000013c29349ec0] Error configuring filter graph
Conversion failed!

本地搭建以及快速入门google colab都报一下错误,
/content/stable-diffusion-webui/extensions/SadTalker/checkpoints/shape_predictor_68_face_landmarks.dat
/content/stable-diffusion-webui/extensions/SadTalker/checkpoints/auido2pose_00140-model.pth
/content/stable-diffusion-webui/extensions/SadTalker/checkpoints/facevid2vid_00189-model.pth.tar
/tmp/tmp_3pkl444.png
landmark Det:: 100% 1/1 [00:18<00:00, 18.25s/it]
3DMM Extraction In Video:: 100% 1/1 [00:00<00:00, 2.67it/s]
mel:: 100% 255/255 [00:00<00:00, 37885.57it/s]
audio2exp:: 100% 26/26 [00:00<00:00, 88.07it/s]
Face Renderer:: 100% 128/128 [01:13<00:00, 1.74it/s]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/gradio/routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1015, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 833, in call_function
prediction = await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 31, 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 937, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/content/stable-diffusion-webui/modules/call_queue.py", line 15, in f
res = func(*args, **kwargs)
File "/content/stable-diffusion-webui/extensions/SadTalker/src/gradio_demo.py", line 121, in test
return_path = self.animate_from_coeff.generate(data, save_dir, pic_path, crop_info, enhancer='gfpgan' if use_enhancer else None, preprocess=preprocess)
File "/content/stable-diffusion-webui/extensions/SadTalker/src/facerender/animate.py", line 176, in generate
sound = AudioSegment.from_mp3(audio_path)
File "/usr/local/lib/python3.10/dist-packages/pydub/audio_segment.py", line 796, in from_mp3
return cls.from_file(file, 'mp3', parameters=parameters)
File "/usr/local/lib/python3.10/dist-packages/pydub/audio_segment.py", line 773, in from_file
raise CouldntDecodeError(
pydub.exceptions.CouldntDecodeError: Decoding failed. ffmpeg returned error code: 1

Output from ffmpeg/avlib:

ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
[mp3float @ 0x55ad6ad26d80] Header missing
Last message repeated 394 times
[mp3 @ 0x55ad6ad2a000] decoding for stream 0 failed
[mp3 @ 0x55ad6ad2a000] Could not find codec parameters for stream 0 (Audio: mp3 (mp3float), 0 channels, fltp): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mp3, from './results/f5962313-3c3d-417e-b775-1ef1b264365a/input/28ro5oipi.MP3':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Audio: mp3, 0 channels, fltp
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help

commented

Traceback (most recent call last):
File "/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 394, in run_predict
output = await app.get_blocks().process_api(
File "/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1075, in process_api
result = await self.call_function(
File "/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 884, in call_function
prediction = await anyio.to_thread.run_sync(
File "/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/stable-diffusion-webui/modules/call_queue.py", line 15, in f
res = func(*args, **kwargs)
File "/stable-diffusion-webui/extensions/SadTalker/src/gradio_demo.py", line 122, in test
return_path = self.animate_from_coeff.generate(data, save_dir, pic_path, crop_info, enhancer='gfpgan' if use_enhancer else None, preprocess=preprocess)
File "/stable-diffusion-webui/extensions/SadTalker/src/facerender/animate.py", line 187, in generate
save_video_with_watermark(path, new_audio_path, av_path, watermark= False)
File "/stable-diffusion-webui/extensions/SadTalker/src/utils/videoio.py", line 26, in save_video_with_watermark
shutil.move(temp_file, save_path)
File "/usr/lib/python3.10/shutil.py", line 836, in move
copy_function(src, real_dst)
File "/usr/lib/python3.10/shutil.py", line 434, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.10/shutil.py", line 254, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '77f12bbd-c45a-43ea-8c38-10a6cd760073.mp4'
请问这是什么问题呀??

RuntimeError: Cannot load audio from file: ffprobe not found. Please install ffmpeg in your system to use non-WAV audio file formats and make sure ffprobe is in your PATH.
求解

you need to install the ffmpeg manually: https://www.wikihow.com/Install-FFmpeg-on-Windows

把中文关掉~

用的秋叶安装包, extension.py加了,"huggingface_hub":"huggingface_hub==0.13.4",webui-user.bat也设置了set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--no-gradio-queue --disable-safe-unpickle
set SADTALKER_CHECKPOINTS=D:\sd-webui-aki-v4\extensions\SadTalker\checkpoints
call webui.bat
还是报错:To create a public link, set share=True in launch().
Startup time: 19.2s (import torch: 3.2s, import gradio: 1.7s, import ldm: 0.5s, other imports: 2.6s, setup codeformer: 0.1s, load scripts: 1.9s, load SD checkpoint: 4.2s, create ui: 4.5s, gradio launch: 0.4s).
D:\sd-webui-aki-v4\extensions\SadTalker\checkpoints\auido2pose_00140-model.pth
D:\sd-webui-aki-v4\extensions\SadTalker\checkpoints\shape_predictor_68_face_landmarks.dat
Error verifying pickled file from D:\sd-webui-aki-v4\extensions\SadTalker\checkpoints\hub\checkpoints\s3fd-619a316812.pth:
Traceback (most recent call last):
File "D:\sd-webui-aki-v4\modules\safe.py", line 81, in check_pt
with zipfile.ZipFile(filename) as z:
File "zipfile.py", line 1269, in init
File "zipfile.py", line 1336, in _RealGetContents
zipfile.BadZipFile: File is not a zip file

我的webui无法从链接下载,手动下载了所有文件包括checkpoints拷贝到extentions,重启后webui界面为什么没有扩展项呢?谢谢!
网页捕获_1-6-2023_92936_127 0 0 1

我使用 RTX4090+ Intel i7 13700K + 32GB 内存, 在处理988x1366 分辨率图片生成视频的时候爆内存了, 这合理吗? 我已经生成了 FULL的视频, 但是在跑 ENHENCER的时候 处理到一半爆内存了, 我还设置了100GB虚拟内存.

commented

能在SDWEBUI作为扩展使用,到最后出视频之前,总会弹出如下错误,请问怎么解决。

Exception in callback _ProactorBasePipeTransport._call_connection_lost(None) handle: <Handle _ProactorBasePipeTransport._call_connection_lost(None)> Traceback (most recent call last): File "E:\SDWebUI230418\python\lib\asyncio\events.py", line 80, in _run self._context.run(self._callback, *self._args) File "E:\SDWebUI230418\python\lib\asyncio\proactor_events.py", line 162, in _call_connection_lost self._sock.shutdown(socket.SHUT_RDWR) ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。

因为你的网络没有正确出站,可能是没有开代理,所以你无法pull到远程服务器的数据,建议使用正规代理出站即可修复

commented

我的webui无法从链接下载,手动下载了所有文件包括checkpoints拷贝到extentions,重启后webui界面为什么没有扩展项呢?谢谢! 网页捕获_1-6-2023_92936_127 0 0 1

用的秋叶安装包, extension.py加了,"huggingface_hub":"huggingface_hub==0.13.4",webui-user.bat也设置了set PYTHON= set GIT= set VENV_DIR= set COMMANDLINE_ARGS=--no-gradio-queue --disable-safe-unpickle set SADTALKER_CHECKPOINTS=D:\sd-webui-aki-v4\extensions\SadTalker\checkpoints call webui.bat 还是报错:To create a public link, set share=True in launch(). Startup time: 19.2s (import torch: 3.2s, import gradio: 1.7s, import ldm: 0.5s, other imports: 2.6s, setup codeformer: 0.1s, load scripts: 1.9s, load SD checkpoint: 4.2s, create ui: 4.5s, gradio launch: 0.4s). D:\sd-webui-aki-v4\extensions\SadTalker\checkpoints\auido2pose_00140-model.pth D:\sd-webui-aki-v4\extensions\SadTalker\checkpoints\shape_predictor_68_face_landmarks.dat Error verifying pickled file from D:\sd-webui-aki-v4\extensions\SadTalker\checkpoints\hub\checkpoints\s3fd-619a316812.pth: Traceback (most recent call last): File "D:\sd-webui-aki-v4\modules\safe.py", line 81, in check_pt with zipfile.ZipFile(filename) as z: File "zipfile.py", line 1269, in init File "zipfile.py", line 1336, in _RealGetContents zipfile.BadZipFile: File is not a zip file

你这不是开玩笑吗?这个安装包走的都不是web-user.bat的启动,当然失效,你们这个安装包,基本只能靠作者帮你装了

commented

Traceback (most recent call last): File "/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 394, in run_predict output = await app.get_blocks().process_api( File "/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1075, in process_api result = await self.call_function( File "/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 884, in call_function prediction = await anyio.to_thread.run_sync( File "/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run result = context.run(func, *args) File "/stable-diffusion-webui/modules/call_queue.py", line 15, in f res = func(*args, **kwargs) File "/stable-diffusion-webui/extensions/SadTalker/src/gradio_demo.py", line 122, in test return_path = self.animate_from_coeff.generate(data, save_dir, pic_path, crop_info, enhancer='gfpgan' if use_enhancer else None, preprocess=preprocess) File "/stable-diffusion-webui/extensions/SadTalker/src/facerender/animate.py", line 187, in generate save_video_with_watermark(path, new_audio_path, av_path, watermark= False) File "/stable-diffusion-webui/extensions/SadTalker/src/utils/videoio.py", line 26, in save_video_with_watermark shutil.move(temp_file, save_path) File "/usr/lib/python3.10/shutil.py", line 836, in move copy_function(src, real_dst) File "/usr/lib/python3.10/shutil.py", line 434, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "/usr/lib/python3.10/shutil.py", line 254, in copyfile with open(src, 'rb') as fsrc: FileNotFoundError: [Errno 2] No such file or directory: '77f12bbd-c45a-43ea-8c38-10a6cd760073.mp4' 请问这是什么问题呀??

文件路径设置错误

File "/Users/aa/install/sd/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/serialization.py", line 166, in validate_cuda_device
raise RuntimeError('Attempting to deserialize object on a CUDA '
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.


我是MacBook(m1)用户,确实没有cuda。请问要在哪里设置关闭这个cuda?

注:已经在 “/stable-diffusion-webui/webui-user.sh"中加入以下内容
export COMMANDLINE_ARGS="--disable-safe-unpickle"
export COMMANDLINE_ARGS="--skip-torch-cuda-test"

commented

To create a public link, set share=True in launch().
[Lobe]: Initializing Lobe
Startup time: 46.9s (import torch: 0.9s, import gradio: 0.6s, import ldm: 0.3s, other imports: 0.5s, setup codeformer: 0.2s, load scripts: 39.8s, create ui: 2.0s, gradio launch: 2.5s, scripts app_started_callback: 0.1s).
Traceback (most recent call last):
File "/dockerx/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 422, in run_predict
output = await app.get_blocks().process_api(
File "/dockerx/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1321, in process_api
inputs = self.preprocess_data(fn_index, inputs, state)
File "/dockerx/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1171, in preprocess_data
processed_input.append(block.preprocess(inputs[i]))
File "/dockerx/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/components.py", line 1848, in preprocess
return self._format_image(im)
File "/dockerx/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/components.py", line 1796, in _format_image
path = self.pil_to_temp_file(
TypeError: save_pil_to_file() got an unexpected keyword argument 'format'

amd显卡,ubuntu系统下报错

出现以下情况,请问怎么解决?
using safetensor as default
{'checkpoint': 'D:\sd-webui-aki-v4.2\extensions\SadTalker\checkpoints\SadTalker_V0.0.2_512.safetensors', 'dir_of_BFM_fitting': 'D:\sd-webui-aki-v4.2/extensions/SadTalker/src/config', 'audio2pose_yaml_path': 'D:\sd-webui-aki-v4.2/extensions/SadTalker/src/config\auido2pose.yaml', 'audio2exp_yaml_path': 'D:\sd-webui-aki-v4.2/extensions/SadTalker/src/config\auido2exp.yaml', 'use_safetensor': True, 'mappingnet_checkpoint': 'D:\sd-webui-aki-v4.2\extensions\SadTalker\checkpoints\mapping_00229-model.pth.tar', 'facerender_yaml': 'D:\sd-webui-aki-v4.2/extensions/SadTalker/src/config\facerender.yaml'}
C:\Users\ADMINI~1\AppData\Local\Temp\gradio\tmpq1opt86j.png
'ffmpeg' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���
Traceback (most recent call last):
File "D:\sd-webui-aki-v4.2\python\lib\shutil.py", line 816, in move
os.rename(src, real_dst)
FileNotFoundError: [WinError 2] 系统找不到指定的文件。: '2fbc5d38-f8ac-4b58-9d15-75e682940779.mp4' -> './results/fa25738e-a56f-4094-9ed1-6ef65b1685e3\tmpq1opt86j##8月5日-0-100.mp4'
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\sd-webui-aki-v4.2\python\lib\site-packages\gradio\routes.py", line 422, in run_predict
output = await app.get_blocks().process_api(
File "D:\sd-webui-aki-v4.2\python\lib\site-packages\gradio\blocks.py", line 1323, in process_api
result = await self.call_function(
File "D:\sd-webui-aki-v4.2\python\lib\site-packages\gradio\blocks.py", line 1051, in call_function
prediction = await anyio.to_thread.run_sync(
File "D:\sd-webui-aki-v4.2\python\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "D:\sd-webui-aki-v4.2\python\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "D:\sd-webui-aki-v4.2\python\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "D:\sd-webui-aki-v4.2/extensions/SadTalker\src\gradio_demo.py", line 139, in test
File "D:\sd-webui-aki-v4.2/extensions/SadTalker\src\facerender\animate.py", line 222, in generate
video_name_full = x['video_name'] + '_full.mp4'
File "D:\sd-webui-aki-v4.2/extensions/SadTalker\src\utils\videoio.py", line 26, in save_video_with_watermark
shutil.move(temp_file, save_path)
File "D:\sd-webui-aki-v4.2\python\lib\shutil.py", line 836, in move
copy_function(src, real_dst)
File "D:\sd-webui-aki-v4.2\python\lib\shutil.py", line 434, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "D:\sd-webui-aki-v4.2\python\lib\shutil.py", line 254, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '2fbc5d38-f8ac-4b58-9d15-75e682940779.mp4'

为什么我将preprocess的参数设置为resize会报错,但是设置为full就没问题??

isnt disable safe unpickle, BAD FOR VIRUS and spyware potential? Why do we have exactly to remove it please? Can someone give me a proper explanation? Thanks

微信截图_20240306093845
这是为啥呢

出现错误
OSError: [Errno 32] Broken pipe
FFMPEG STDERR OUTPUT:
这个怎么解决?

或批处理文件。
Error executing callback ui_tabs_callback for H:\SDW\stable-diffusion-webui\extensions\SadTalker\scripts\extension.py
Traceback (most recent call last):
File "H:\SDW\stable-diffusion-webui\modules\script_callbacks.py", line 125, in ui_tabs_callback
res += c.callback() or []
File "H:\SDW\stable-diffusion-webui\extensions\SadTalker\scripts\extension.py", line 62, in on_ui_tabs
install()
File "H:\SDW\stable-diffusion-webui\extensions\SadTalker\scripts\extension.py", line 57, in install
launch.run("cd " + paths.script_path+"/extensions/SadTalker && bash ./scripts/download_models.sh", live=True)
File "H:\SDW\stable-diffusion-webui\launch.py", line 81, in run
raise RuntimeError(f"""{errdesc or 'Error running command'}.

秋叶安装包可以用这个方法吗?

AttributeError: module 'numpy' has no attribute 'float'.
np.float was a deprecated alias for the builtin float. To avoid this error in existing code, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 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

ERROR: Could not find a version that satisfies the requirement torch==1.12.1+cu113 (from versions: 2.2.0, 2.2.1, 2.2.2)
ERROR: No matching distribution found for torch==1.12.1+cu113

how to fix?

venv "venv\Scripts\Python.exe"
Python 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)]
Commit hash: cd4c046
Installing requirements for SadTalker WebUI (may take longer time in first time)
Launching SadTalker Web UI
Traceback (most recent call last):
File "Launcher.py", line 204, in
start()
File "Launcher.py", line 198, in start
demo = sadtalker_demo()
File "E:\SadTalker\SadTalker\app_sadtalker.py", line 35, in sadtalker_demo
with gr.Row().style(equal_height=False):
AttributeError: 'Row' object has no attribute 'style'

Launch unsuccessful. Exiting.
大佬们怎么解决?

Traceback (most recent call last):
File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 422, in run_predict
output = await app.get_blocks().process_api(
File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1321, in process_api
inputs = self.preprocess_data(fn_index, inputs, state)
File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1171, in preprocess_data
processed_input.append(block.preprocess(inputs[i]))
File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 1848, in preprocess
return self._format_image(im)
File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 1796, in _format_image
path = self.pil_to_temp_file(
File "D:\stable-diffusion-webui\modules\ui_tempdir.py", line 55, in save_pil_to_file
file_obj = tempfile.NamedTemporaryFile(delete=False, suffix=".png", dir=dir)
File "C:\Users\15457\AppData\Local\Programs\Python\Python310\lib\tempfile.py", line 559, in NamedTemporaryFile
file = _io.open(dir, mode, buffering=buffering,
File "C:\Users\15457\AppData\Local\Programs\Python\Python310\lib\tempfile.py", line 556, in opener
fd, name = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
File "C:\Users\15457\AppData\Local\Programs\Python\Python310\lib\tempfile.py", line 256, in _mkstemp_inner
fd = _os.open(file, flags, 0o600)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\15457\AppData\Local\Temp\gradio\tmp4sanvexb.png'