comfyui下载地址:https://docs.comfy.org/installation/comfyui_portable_windows

运行update下的update_comfyui_and_python_dependencies.bat

安装Manager

  1. 进入你的新目录
F:\ComfyUI_windows_portable_nvidia_cu126_new\ComfyUI_windows_portable
  1. 访问下面这个官方 bat 文件链接,保存install-manager-for-portable-version.bat,和 run_nvidia_gpu.bat 同级,运行
https://github.com/ltdrdata/ComfyUI-Manager/raw/main/scripts/install-manager-for-portable-version.bat

安装需要的 Custom Nodes

Manager安装ComfyUI-VideoHelperSuite:v1.5.10
手动安装ComfyUI-ReActor:
  1. 下载insightface-0.7.3-cp312-cp312-win_amd64.whl,下载后把 .whl 文件放到 ComfyUI_windows_portable 根目录
https://github.com/Gourieff/Assets/raw/main/Insightface/insightface-0.7.3-cp312-cp312-win_amd64.whl
  1. 然后执行:
.\python_embeded\python.exe -m pip install insightface-0.7.3-cp312-cp312-win_amd64.whl
  1. 安装ReActor
cd ComfyUI\custom_nodes
git clone https://github.com/Gourieff/ComfyUI-ReActor
cd ComfyUI-ReActor
..\..\..\python_embeded\python.exe -m pip install -r requirements.txt
Manager安装Wav2Lip Node for ComfyUI
安装 CPU-only 版 torchcodec
cd /d F:\ComfyUI_windows_portable_nvidia_cu126_new\ComfyUI_windows_portable

:: 2. 安装 CPU-only 版 torchcodec(这是目前 Windows 上最稳的方式)
.\python_embeded\python.exe -m pip install torchcodec --index-url https://download.pytorch.org/whl/cpu
修改 Wav2Lip 节点源码,彻底绕过 torchcodec
  1. 打开文件:
F:\ComfyUI_windows_portable_nvidia_cu126_new\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_wav2lip\wav2lip.py
  1. 找到 torchaudio.save 调用处(大约在 process 方法第 160~170 行附近):
torchaudio.save(temp_audio_path, waveform_tensor, sample_rate)
  1. 替换为以下代码(强制使用 soundfile 后端,稳定且兼容):
# === 企业级修复:强制使用 soundfile 后端,彻底绕过 torchcodec ===
import soundfile as sf
import torch

# 如果 waveform 是 torch.Tensor,先转 numpy
if isinstance(waveform_tensor, torch.Tensor):
    waveform_np = waveform_tensor.squeeze().cpu().numpy()
    if len(waveform_np.shape) == 1:
        waveform_np = waveform_np.reshape(1, -1)  # soundfile 需要 (channels, samples) 或 (samples,)
else:
    waveform_np = waveform_tensor

sf.write(temp_audio_path, waveform_np.T if waveform_np.shape[0] < waveform_np.shape[1] else waveform_np, sample_rate)
# =================================================================
  1. 彻底修复 ReActor + ReActorRestoreFace(追求高清质量)
cd /d F:\ComfyUI_windows_portable_nvidia_cu126_new\ComfyUI_windows_portable

:: 1. 先清理冲突库(之前 soxr、scipy 等问题)
.\python_embeded\python.exe -m pip uninstall -y soxr torchcodec insightface

:: 2. 安装最稳版本
.\python_embeded\python.exe -m pip install soxr==0.5.0.post1 --force-reinstall
.\python_embeded\python.exe -m pip install soundfile --force-reinstall

:: 3. 安装 insightface(ReActor 核心)
.\python_embeded\python.exe -m pip install https://github.com/Gourieff/Assets/raw/main/Insightface/insightface-0.7.3-cp312-cp312-win_amd64.whl

:: 4. 重新安装 ReActor(使用稳定分支)
cd ComfyUI\custom_nodes
rd /s /q ComfyUI-ReActor 2>nul
git clone https://github.com/Gourieff/ComfyUI-ReActor
cd ComfyUI-ReActor
..\..\..\python_embeded\python.exe -m pip install -r requirements.txt
Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐