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 在下面这个文件夹 ![在这里插入图片描述](https://file.jishuzhan.net/article/1756878182255955969/614a142075c1af1015f567f3602f7108.webp) **问题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_groups\[0\] 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 ) ```

相关推荐
想要成为计算机高手1 小时前
11. isaacsim4.2教程-Transform 树与Odometry
人工智能·机器人·自动驾驶·ros·rviz·isaac sim·仿真环境
静心问道2 小时前
InstructBLIP:通过指令微调迈向通用视觉-语言模型
人工智能·多模态·ai技术应用
宇称不守恒4.02 小时前
2025暑期—06神经网络-常见网络2
网络·人工智能·神经网络
小楓12012 小时前
醫護行業在未來會被AI淘汰嗎?
人工智能·醫療·護理·職業
数据与人工智能律师3 小时前
数字迷雾中的安全锚点:解码匿名化与假名化的法律边界与商业价值
大数据·网络·人工智能·云计算·区块链
chenchihwen3 小时前
大模型应用班-第2课 DeepSeek使用与提示词工程课程重点 学习ollama 安装 用deepseek-r1:1.5b 分析PDF 内容
人工智能·学习
说私域3 小时前
公域流量向私域流量转化策略研究——基于开源AI智能客服、AI智能名片与S2B2C商城小程序的融合应用
人工智能·小程序
Java樱木3 小时前
AI 编程工具 Trae 重要的升级。。。
人工智能
码字的字节3 小时前
深度学习损失函数的设计哲学:从交叉熵到Huber损失的深入探索
深度学习·交叉熵·huber
凪卄12133 小时前
图像预处理 二
人工智能·python·深度学习·计算机视觉·pycharm