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
    )
相关推荐
金伟API10243 小时前
如何从零打造一个极简的DeepSeek-R1大模型
人工智能·ai
江畔柳前堤3 小时前
大语言模型分布式训练:从并行策略到万卡工程的系统梳理
人工智能·分布式·深度学习·算法·目标检测·机器学习·语言模型
Shockang3 小时前
智能体环路工程实战
人工智能
美摄科技3 小时前
美摄美颜特效SDK Skill:以AI赋能智能视音频新视界
人工智能
Web3_Daisy4 小时前
Pump.fun 与 FOMO 竞争背后的 Meme 市场变局
大数据·人工智能·金融·web3·区块链
AI创界者4 小时前
MiniMax-H3 本地一键部署整合包:8G 显存玩转文图生视频、视频参考、角色替换与超分补帧全流程
人工智能·深度学习
江畔柳前堤4 小时前
HBM:大语言模型时代的「算力血液」——从内存墙到带宽革命的深度拆解
服务器·人工智能·windows·目标检测·语言模型·自然语言处理·软件工程
美摄科技4 小时前
视频一键成片SDK Skill:AI智能分析与语义理解
人工智能
fthux5 小时前
装闭 RenoPit 源码解析(05):FastAPI与Celery如何执行AI装修分析
人工智能·ai·开源·github·open source·renopit
格数致用5 小时前
数据库设计与表结构详解|信息化项目全流程管理系统源码逐行精讲(五)
人工智能·政务·数据库设计·外键约束