错误提示:
ERROR - Failed to swap face in postprocess method : apply_overlay() takes 3 positional arguments but 4 were given
打开插件对应目录:
\sd-webui-aki-v4.6.1\extensions\sd-webui-faceswaplab\scripts\faceswaplab_utils中
imgutils.py文件第224行
img = processing.apply_overlay(img, p.paste_to, batch_index, p.overlay_images)
替换为如下代码,并重启服务
if p.overlay_images and batch_index < len(p.overlay_images): selected_overlay = p.overlay_images[batch_index] img = processing.apply_overlay(img, p.paste_to, selected_overlay) else: return img logger.debug("No overlay selected or overlay list is empty.")
另:如遇到浏览器点击生成无效果,请清理浏览器缓存