Closed Puratoke closed 7 months ago
这个bot只能使用vits,bot调用voice/check这个接口也是检查vits模型是否加载,因为当时写代码的时候Bert-VITS2还未诞生。
所以这个问题无法解决,只能等bot更新,或者自行更换成vits模型使用
好的,非常感谢您的答复!希望您的项目可以继续蒸蒸日上(褒义)!
刚刚光看着bot项目了,没细看日志还有别的报错,抱歉。
File "C:\Users\Puratoke\Desktop\BOT\VITS\bert_vits2\utils.py", line 13, in load_checkpoint
assert os.path.isfile(checkpoint_path)
AssertionError
可能是模型路径填写错误,或者是模型不存在,你可以检查一下模型路径、模型后缀等是否正确。
多人模型的训练方式去训练单人模型导致的问题
你的报错不是这个导致的。而且程序内部已经修复了这个问题,现在只要n_speakers>0
就视为是多人模型训练的方法训练的模型。
运行环境
问题描述
在尝试接ls233的chatgpt mirai qqbot项目时,在使用自行训练的bert_vits2(2.3)模型后,webui可以正常使用播放器生成,而接入后则会出现VITS not loaded及"POST /voice/check HTTP/1.1" 400 - 以下是输出的全部内容: INFO:root:Loading yaml from C:\Users\Puratoke\Desktop\BOT\VITS\config.yml Building prefix dict from the default dictionary ... DEBUG:jieba:Building prefix dict from the default dictionary ... Loading model from cache C:\Users\Puratoke\AppData\Local\Temp\jieba.cache DEBUG:jieba:Loading model from cache C:\Users\Puratoke\AppData\Local\Temp\jieba.cache Loading model cost 0.651 seconds. DEBUG:jieba:Loading model cost 0.651 seconds. Prefix dict has been built successfully. DEBUG:jieba:Prefix dict has been built successfully. 2024-01-11 13:49:36 [INFO] [model_handler.load_bert:134] Loading BERT model: C:\Users\Puratoke\Desktop\BOT\VITS\bert_vits2/bert/deberta-v2-large-japanese-char-wwm 2024-01-11 13:49:39 [INFO] [model_handler.load_bert:143] Success loading: C:\Users\Puratoke\Desktop\BOT\VITS\bert_vits2/bert/deberta-v2-large-japanese-char-wwm 2024-01-11 13:49:39 [INFO] [model_handler.load_bert:134] Loading BERT model: C:\Users\Puratoke\Desktop\BOT\VITS\bert_vits2/bert/deberta-v3-large C:\Users\Puratoke\Desktop\BOT\VITS\py310\lib\site-packages\transformers\convert_slow_tokenizer.py:473: UserWarning: The sentencepiece tokenizer that you are converting to a fast tokenizer uses the byte fallback option which is not implemented in the fast tokenizers. In practice this means that the fast version of the tokenizer can produce unknown tokens whereas the sentencepiece version would have converted these unknown tokens into a sequence of byte tokens matching the original piece of text. warnings.warn( Some weights of DebertaV2ForMaskedLM were not initialized from the model checkpoint at C:\Users\Puratoke\Desktop\BOT\VITS\bert_vits2/bert/deberta-v3-large and are newly initialized: ['cls.predictions.transform.dense.weight', 'cls.predictions.bias', 'cls.predictions.decoder.bias', 'cls.predictions.transform.dense.bias', 'cls.predictions.transform.LayerNorm.weight', 'cls.predictions.transform.LayerNorm.bias'] You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference. 2024-01-11 13:49:42 [INFO] [model_handler.load_bert:143] Success loading: C:\Users\Puratoke\Desktop\BOT\VITS\bert_vits2/bert/deberta-v3-large 2024-01-11 13:49:42 [INFO] [model_handler.load_bert:134] Loading BERT model: C:\Users\Puratoke\Desktop\BOT\VITS\bert_vits2/bert/chinese-roberta-wwm-ext-large Some weights of the model checkpoint at C:\Users\Puratoke\Desktop\BOT\VITS\bert_vits2/bert/chinese-roberta-wwm-ext-large were not used when initializing BertForMaskedLM: ['cls.seq_relationship.weight', 'cls.seq_relationship.bias', 'bert.pooler.dense.bias', 'bert.pooler.dense.weight']
2024-01-11 13:49:47 [INFO] [ModelManager.log_device_info:148] PyTorch Version: 1.13.1+cpu Cuda available:False Device type:cpu 2024-01-11 13:49:48 [INFO] [ModelManager.log_device_info:161] Using CPU on Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz with 6 cores and 6 threads. 2024-01-11 13:49:48 [INFO] [ModelManager.model_init:99] [BERT-VITS2] 1 speakers 2024-01-11 13:49:48 [INFO] [ModelManager.model_init:101] 1 speakers in total. 2024-01-11 13:49:48 [INFO] [phrases_dict.phrases_dict_init:33] Loading phrases_dict 2024-01-11 13:49:49 [DEBUG] [phrases_dict.load_phrases_from_file:27] File C:\Users\Puratoke\Desktop\BOT\VITS/phrases_dict.txt not found. You can create C:\Users\Puratoke\Desktop\BOT\VITS/phrases_dict.txt and write your phrases_dict. 2024-01-11 13:49:50 [DEBUG] [win32._get_localzone_name:58] Looking up time zone info from registry 2024-01-11 13:49:50 [INFO] [base.start:181] Scheduler started 2024-01-11 13:49:50 [INFO] [base._real_add_job:895] Added job "clean_task" to job store "default"
然后我在网上下载了其他人制作的vits模型,导入后一切正常,可以正常调用输出 之前有参考一个issues,大概讲的是用多人模型的训练方式去训练单人模型导致的问题,但是那一篇issues的解决方式似乎已经不能使用了,请问可能是因为同一个问题导致的吗
问题复现步骤
如上叙述,其中过程中使用的问题模型是:https://www.123pan.com/s/a8lNjv-JnFov.html 如果提出的问题太过简单很抱歉给您带来的麻烦,如果您愿意抽出百忙中的片刻提供些帮助非常感谢您施以援手