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 ) ```

相关推荐
黄焖鸡能干四碗几秒前
信息安全管理制度(Word)
大数据·数据库·人工智能·智慧城市·规格说明书
paopao_wu1 分钟前
DeepSeek-OCR实战(01):基础运行环境搭建-Ubuntu
linux·人工智能·ubuntu·ai·ocr
Altair澳汰尔1 分钟前
新闻速递丨Altair RapidMiner 数据分析和 AI 平台助力企业加速智能升级:扩展智能体 AI 及分析生态系统
人工智能·ai·数据分析·仿真·cae·rapidminer·数据自动化
oil欧哟6 分钟前
GitHub星标3万,OpenAI 官方支持——深度解读 AI Agent 连接协议的行业标准 MCP
人工智能·github
极客BIM工作室18 分钟前
单层前馈神经网络的万能逼近定理
人工智能·深度学习·神经网络
我的offer在哪里19 分钟前
RAG 2025 深度实战指南:从技术原理到企业级落地,解锁大模型应用核心能力
人工智能
工藤学编程27 分钟前
零基础学AI大模型之LangChain Embedding框架全解析
人工智能·langchain·embedding
IT_陈寒36 分钟前
React性能优化实战:这5个Hooks技巧让我的应用快了40%
前端·人工智能·后端
leijiwen1 小时前
规则优先:AI 时代的规范驱动开发(SDD)新范式
人工智能·驱动开发
MarkHD1 小时前
蓝牙钥匙 第69次 蓝牙钥匙安全与便捷性平衡:从理论到实践的全方位解析
网络·人工智能·安全