bert-vits2本地部署报错疑难问题汇总

环境:

bert-vits2.3

win 和wsl

问题描述:

bert-vits2本地部署报错疑难问题汇总

解决方案:

问题1:

Conda安装requirements里面依赖出现ERROR: No matching distribution found for opencc==1.1.6

解决方法

bash 复制代码
需要在 Python 3.11 上使用 OpenCC
打开requirements把opencc== 1.16改成1.17保存文本

问题2:

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tool

解决方法

bash 复制代码
conda install libpython m2w64-toolchain -c msys2
bash 复制代码
 conda install -c conda-forge jieba_fast

安装VS2019

单独安装2个组件

问题3:

训练报错

TypeError: Webui_config.init() got an unexpected keyword argument 'fp16_run'

解决方法

bash 复制代码
配置文件没有更新,更新配置文件

问题4:

训练报错

rank0: OSError: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory ./slm/wavlm-base-plus.

解决方法

没有下载pytorch_model.bin 在下面这个文件夹

问题5:

训练报错

RuntimeError: The expanded size of the tensor (1024) must match the existing size (2048) at non-singleton dimension 0. Target sizes: 1024, 157. Tensor sizes: 2048, 157

解决方法

bash 复制代码
删除原来生产bert文件重新生成

问题6:

raise KeyError("param 'initial_lr' is not specified "

rank0: KeyError: "param 'initial_lr' is not specified in param_groups0 when resuming an optimizer"

解决方法

bash 复制代码
优化爆了,手动改优化器train_ms.py代码




# 更改优化器的初始学习率参数
optim_g.param_groups[0]['initial_lr'] = 0.1
optim_d.param_groups[0]['initial_lr'] = 0.1
optim_wd.param_groups[0]['initial_lr'] = 0.1
optim_dur_disc.param_groups[0]['initial_lr'] = 0.1

# 创建调度器并应用更改后的优化器
scheduler_g = torch.optim.lr_scheduler.ExponentialLR(
    optim_g, gamma=hps.train.lr_decay, last_epoch=epoch_str - 2
)
scheduler_d = torch.optim.lr_scheduler.ExponentialLR(
    optim_d, gamma=hps.train.lr_decay, last_epoch=epoch_str - 2
)
scheduler_wd = torch.optim.lr_scheduler.ExponentialLR(
    optim_wd, gamma=hps.train.lr_decay, last_epoch=epoch_str - 2
)
if net_dur_disc is not None:
    scheduler_dur_disc = torch.optim.lr_scheduler.ExponentialLR(
        optim_dur_disc, gamma=hps.train.lr_decay, last_epoch=epoch_str - 2
    )
相关推荐
能源探索家3 分钟前
能源资讯[26M10W2] 本周热点复盘:电力交易放量、六张网底座建设、浙江储能入市
人工智能·能源·新型电力系统·十五五规划·能源信息化·能源资讯
工具派8 分钟前
Agent 不是玄学:用 Java 状态机思维理解 LangGraph
java·人工智能·python
szxinmai主板定制专家11 分钟前
基于RK3588+FPGA+AI的储能电站边缘网关,实现电力数据采集与智能预警
arm开发·人工智能·fpga开发·rk3576·半导体设备
阿里云大数据AI技术16 分钟前
阿里云 Milvus 磁盘索引新利器:百万级Topk高性能召回
人工智能
独立开发者阿乐16 分钟前
llms.txt 是什么?为什么 AI 爬虫需要这个文件
人工智能·爬虫·geo优化·ai爬虫·llms.txt·ai收录·robots.txt
czq_268671948744 分钟前
Python打卡第36天
pytorch·python·深度学习
福兮说1 小时前
秋招简历让 AI 写了一版:它替我加了 JWT,还把课程设计写成了「高并发」
人工智能·课程设计·秋招·求职·简历
ZDN_is_beauty1 小时前
深度学习2-卷积神经网络
人工智能·深度学习·cnn
QQ机器人_插件1 小时前
鲲鹏恒控的跨平台交付 —— Windows 上组态,Linux 上运行
人工智能
XMAIPC_Robot1 小时前
储能控制器产品化:ARM+FPGA整机高低温、EMC可靠性测试实战总结
arm开发·人工智能·fpga开发·arm+fpga·rk3588+fpga