-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用 conda 克隆之后,运行时报错 #25
Comments
安装transformers== 4.42.4试试 |
另外我看你使用的是cpu,没有显卡? |
确实,我安装了 cuda 11.8 之后,
transformers 已经安装了你说的版本,但还是会出现这个错误。请问该如何处理呢? 另: |
将 dvae.py 中的 解决了 报错信息:
请问作者使用的是什么版本的 我在 conda 里测试过单个文件,读取是正常的: 测试单个音频文件的返回结果: ---12-20 追加将
尝试修改 |
soundfile=0.12.1 |
应该是有个bug,已修复,请更新最新的代码 |
好的,更新后测试过了,已经可以正常运行,点赞! 另: |
大哥 克隆训练lora的时候 loss收敛了吗?我这个好慢啊 |
不要看loss收敛,我在readme里写了,训很久loss很低但会很容易过拟合,训2000steps可以去试试效果了 |
好的 大佬 谢谢 |
(chatttsplus) PS E:\chatttsplus> python webui.py --cfg configs/infer/chattts_plus.yaml INFO:ChatTTSPlusPipeline:device: cpu INFO:ChatTTSPlusPipeline:dtype: torch.float32 INFO:ChatTTSPlusPipeline:DVAE coef: 榧澓趀漷嵂偡竼绣砏篱揼跆病懻炿脾曟彳豨蚺嶵莂仿琣像袄嵘譻稓燷澉脿禭瓳豎师巬坰滻詣萏琍斀謾巿懫垳蔾樑勣蒁嘃差琜諸纊罏帄璄讴訿几箩栿芰緓虻補嶿瑓盼蚯艏穫崀賚垄至嶙蘿薞促豆戤巁漉滻牮扏荢貼費晗凸柵嬿裗蓣跩慄巑呧盾亗膏澣猠趠幝臞紵嬿磖徣誠畠巤媥苽曳垏玌榬賯芏臽炅砾稄嵓蘳菥嶙傛勸些喏屓忸赜封凸份堾礒譳虷幐巕嬠盼耐歏豷垀贬褄懪垣栾碵悃豺匒巆區竿廇瞏矈耬賖炮燪聬茾稑諳虬买巬紙諸嫤憏澅榈讀種凛賤萿媟董谇噐巼孥拺皛勏狋毄貒揬凮瓽猿姼亣豂艷巘塯勲抁粏疤滨跅幞燸仓蜽粺喳貔砸巀㴁 INFO:ChatTTSPlusPipeline:loading model: tokenizer >>>> INFO:ChatTTSPlusPipeline:{'name': 'Tokenizer', 'infer_type': 'pytorch', 'kwargs': {'model_path': 'checkpoints/asset/tokenizer.pt'}} INFO:Tokenizer:loading Tokenizer pretrained model: E:\chatttsplus\chattts_plus\checkpoints\asset/tokenizer.pt E:\chatttsplus\chattts_plus\models\tokenizer.py:27: FutureWarning: You are using
torch.loadwith
weights_only=False(the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for
weights_onlywill be flipped to
True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via
torch.serialization.add_safe_globals. We recommend you start setting
weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.tokenizer: BertTokenizerFast = torch.load(
INFO:ChatTTSPlusPipeline:loading model: dvae_encode >>>>
INFO:ChatTTSPlusPipeline:{'name': 'DVAE', 'infer_type': 'pytorch', 'kwargs': {'model_path': 'checkpoints/asset/DVAE_full.pt', 'dim': 512, 'decoder_config': {'idim': 512, 'odim': 512, 'hidden': 256, 'n_layer': 12, 'bn_dim': 128}, 'encoder_config': {'idim': 512, 'odim': 1024, 'hidden': 256, 'n_layer': 12, 'bn_dim': 128}, 'vq_config': {'dim': 1024, 'levels': [5, 5, 5, 5], 'G': 2, 'R': 2}, 'coef': '榧澓趀漷嵂偡竼绣砏篱揼跆病懻炿脾曟彳豨蚺嶵莂仿琣像袄嵘譻稓燷澉脿禭瓳豎师巬坰滻詣萏琍斀謾巿懫垳蔾樑勣蒁嘃差琜諸纊罏帄璄讴訿几箩栿芰緓虻補嶿瑓盼蚯艏穫崀賚垄至嶙蘿薞促豆戤巁漉滻牮扏荢貼費晗凸柵嬿裗蓣跩慄巑呧盾亗膏澣猠趠幝臞紵嬿磖徣誠畠巤媥苽曳垏玌榬賯芏臽炅砾稄嵓蘳菥嶙傛勸些喏屓忸赜封凸份堾礒譳虷幐巕嬠盼耐歏豷垀贬褄懪垣栾碵悃豺匒巆區竿廇瞏矈耬賖炮燪聬茾稑諳虬买巬紙諸嫤憏澅榈讀種凛賤萿媟董谇噐巼孥拺皛勏狋毄貒揬凮瓽猿姼亣豂艷巘塯勲抁粏疤滨跅幞燸仓蜽粺喳貔砸巀㴁'}}
INFO:DVAE:loading DVAE pretrained model: E:\chatttsplus\chattts_plus\checkpoints\asset/DVAE_full.pt
INFO:ChatTTSPlusPipeline:loading model: dvae_decode >>>>
INFO:ChatTTSPlusPipeline:{'name': 'DVAE', 'infer_type': 'pytorch', 'kwargs': {'model_path': 'checkpoints/asset/Decoder.pt', 'dim': 384, 'decoder_config': {'idim': 384, 'odim': 384, 'hidden': 512, 'n_layer': 12, 'bn_dim': 128}, 'coef': '榧澓趀漷嵂偡竼绣砏篱揼跆病懻炿脾曟彳豨蚺嶵莂仿琣像袄嵘譻稓燷澉脿禭瓳豎师巬坰滻詣萏琍斀謾巿懫垳蔾樑勣蒁嘃差琜諸纊罏帄璄讴訿几箩栿芰緓虻補嶿瑓盼蚯艏穫崀賚垄至嶙蘿薞促豆戤巁漉滻牮扏荢貼費晗凸柵嬿裗蓣跩慄巑呧盾亗膏澣猠趠幝臞紵嬿磖徣誠畠巤媥苽曳垏玌榬賯芏臽炅砾稄嵓蘳菥嶙傛勸些喏屓忸赜封凸份堾礒譳虷幐巕嬠盼耐歏豷垀贬褄懪垣栾碵悃豺匒巆區竿廇瞏矈耬賖炮燪聬茾稑諳虬买巬紙諸嫤憏澅榈讀種凛賤萿媟董谇噐巼孥拺皛勏狋毄貒揬凮瓽猿姼亣豂艷巘塯勲抁粏疤滨跅幞燸仓蜽粺喳貔砸巀㴁'}}
INFO:DVAE:loading DVAE pretrained model: E:\chatttsplus\chattts_plus\checkpoints\asset/Decoder.pt
INFO:ChatTTSPlusPipeline:loading model: vocos >>>>
INFO:ChatTTSPlusPipeline:{'name': 'Vocos', 'infer_type': 'pytorch', 'kwargs': {'model_path': 'checkpoints/asset/Vocos.pt', 'feature_extractor_config': {'sample_rate': 24000, 'n_fft': 1024, 'hop_length': 256, 'n_mels': 100, 'padding': 'center'}, 'backbone_config': {'input_channels': 100, 'dim': 512, 'intermediate_dim': 1536, 'num_layers': 8}, 'head_config': {'dim': 512, 'n_fft': 1024, 'hop_length': 256, 'padding': 'center'}}}
INFO:ChatTTSPlusPipeline:loading model: gpt >>>>
INFO:ChatTTSPlusPipeline:{'name': 'GPT', 'infer_type': 'pytorch', 'kwargs': {'model_path': 'checkpoints/asset/GPT.pt', 'gpt_config': {'hidden_size': 768, 'intermediate_size': 3072, 'num_attention_heads': 12, 'num_hidden_layers': 20, 'use_cache': False, 'max_position_embeddings': 4096, 'spk_emb_dim': 192, 'spk_KL': False, 'num_audio_tokens': 626, 'num_vq': 4}}}
INFO:GPT:loading GPT pretrained model: E:\chatttsplus\chattts_plus\checkpoints\asset/GPT.pt
INFO:ChatTTSPlusPipeline:loading speaker stat: E:\chatttsplus\chattts_plus\checkpoints\asset/spk_stat.pt
INFO:ChatTTSPlusPipeline:loading normalizer: E:\chatttsplus\chattts_plus\checkpoints\homophones_map.json
INFO: Could not find files for the given pattern(s).
To create a public link, set
share=True
inlaunch()
.INFO:ChatTTSPlusPipeline:speaker_emb is None, random select a speaker!
INFO:ChatTTSPlusPipeline:speaker embedding is : 蘁淰敥欀櫌凖絘螜瞑掉孖捰槗琜蓻患瑈窲妧柔唣誧螺蚆莫娻簠丅瓞冥戗豔浹跪嬁昜维挖仐弄弶螓乺羠笷啣筸垎艚捰瞅礲挒识碚袀熹噜膗祒擂淥虀葌舮磹嚙佃泲缭塕呸蚳経娞虁皙匄蠜峹碿紻肅塱蕻噑俌悍蔩宛墌巣綫泞榞縬堫掝舞呼是蝲睗庫淺劦澓砷幠场睂蒅悞从扂咪兾敘媢利菩剻譵笇唦茞蓨晤罥敃瓿毐榄作検壏蓇抁檓硶泞裲悑缷牸藯螚繊帽芝搢塈壿抶塾脳虎旙崓腢変犧某莯賠杸寳趩悕勶入啷艛刈煾菑谝典斔繼蘱嘊堮焂蝍胗簀尻桭詋璵栈潳渥议潃笐茞瞪浍伵稽崮滁茠忘羔諐沤掐沌谱瀙蓆梠曌襺稤幞厸滫拇嫣噼赺喡烈肙栅姆不宄疁蓡褵粑垀栺值泤盏砌筥誘晷喢盤眵寮凵榲埫憕缏觶旀欐观襳訚纤湵橚簅篞励臓廸脛夔佥蒆砍眿橫硖蜀彏斵肬瘽懈暧盔滞賃姒氛窯僩蠷徜侮棡惻箠噱篂蕝仂捼膗怑蠉跘貽佫觱塡卡御羻凹峘誙撕縞聡溰夽垿柯種经射熥坾蕽舖嵵晦獅萓旷糳衖莅汇桷柁燬曆荠伒碮憌褦淧梟穼彈溃榉欁凜傑畺彊肤伨觍礂甚潈涑类芗栢碙硊泰諠藃悴入幠堍朒燐定汏燁薇苁咼帊撋赜烗硡梧倂廠螗吚羛藞剨啣侑堛獣娡埦敲纂蝽責灟傗縀昭昲綪覩媡塧匽虑縰厒礿苉乪唒盫味疐垡紑琀趡帆涍皋徏曈謷措窩堠淢皌擐洘船徍絨叔矽畵嘱媃燤撘缽硶栖簵彧蓥卮否罿箍狐敤氊旼珏珮绔塁藀竑尌兠搩狂褤暞塻渏矟禎幑璋篱漈薘烫笌珅濷削紾衅弔懟絢忨孼曋赦楛扻嶰粬僆抛泿匤洓刿廭佐璾怠劑訰攟簠琡瓹裡惕心暣乌嫐诈慯抬严痢座戥檸焄习垗掿恺埯姦枮搓蚿覚覥珰皳殮汪年疏葈率曾峧論滳媔槚奤燅炉毈樉濬挓俩獑敵編蓸嫸宍糪用衑觢偁斔煲愒棻嶜泳掝訫蠎愔由着贫峑橈焂剭模桪綉貄莋燎粗匭覷幯柇蜏困疒粬滪抈蝗噹敪胔灓虨襃芓灦俻砃崒丼眺噽蝳抁及焉賹嫕合撽检席棼喛灖澞笾袽曗腠濹蓵谊帢榘垶埜夞獌劄藚涁譄臕园漱蜇国籱加荠睔紲缚爋湯腠蚵彳吘蒄湭艆瀃塅舎挴梼規嫏姰柴竂牭苀熺襹跐謝豾砡娣蜅苘莺儺艢絲贫塌擕痷壉欅愯繖謉貘垲刧愄蘼猸熡褰葳挢觉崘繼啺琾僩幹耾民糐緆瞞暵跔棥值裩债言溟谹蚖檣蝧瀥讱畸讔涵啊裸嘆稅朩洗趵匊冔嶈煔僐烦磊础犡垍傐嚆譁挂胯稘焮歹虈敛姪幡哵姌喽脴揀蚻蚮刵氡澈紴綾弆蓖袬毥瑝幑腍灒権蛊板瀢彯溴燷茵耴哮潇褧喋楱筨咂蓇牴磨礟褁獱亥懣硏倒笘纐嬓击系粏潤丑柲編枨琌蕶臂瞚嶄夐俲垬啼缠燛哐睰塯仱尭湊崀
INFO:ChatTTSPlusPipeline:saving speaker emb at: E:\chatttsplus\chattts_plus\pipelines....\results/speakers/1734577058.2154176.pt
INFO:ChatTTSPlusPipeline:Params refine text:
INFO:ChatTTSPlusPipeline:{'prompt': '[oral_2][laugh_0][break_4]', 'top_P': 0.7, 'top_K': 20, 'temperature': 0.3, 'repetition_penalty': 1.0, 'max_new_token': 384, 'min_new_token': 0, 'show_tqdm': True, 'ensure_non_empty': True}
INFO:ChatTTSPlusPipeline:Params infer code:
INFO:ChatTTSPlusPipeline:{'prompt': '[speed_5]', 'top_P': 0.7, 'top_K': 20, 'temperature': 0.3, 'repetition_penalty': 1.05, 'max_new_token': 2048, 'min_new_token': 0, 'show_tqdm': True, 'ensure_non_empty': True, 'spk_emb': '蘁淰敥欀櫌凖絘螜瞑掉孖捰槗琜蓻患瑈窲妧柔唣誧螺蚆莫娻簠丅瓞冥戗豔浹跪嬁昜维挖仐弄弶螓乺羠笷啣筸垎艚捰瞅礲挒识碚袀熹噜膗祒擂淥虀葌舮磹嚙佃泲缭塕呸蚳経娞虁皙匄蠜峹碿紻肅塱蕻噑俌悍蔩宛墌巣綫泞榞縬堫掝舞呼是蝲睗庫淺劦澓砷幠场睂蒅悞从扂咪兾敘媢利菩剻譵笇唦茞蓨晤罥敃瓿毐榄作検壏蓇抁檓硶泞裲悑缷牸藯螚繊帽芝搢塈壿抶塾脳虎旙崓腢変犧某莯賠杸寳趩悕勶入啷艛刈煾菑谝典斔繼蘱嘊堮焂蝍胗簀尻桭詋璵栈潳渥议潃笐茞瞪浍伵稽崮滁茠忘羔諐沤掐沌谱瀙蓆梠曌襺稤幞厸滫拇嫣噼赺喡烈肙栅姆不宄疁蓡褵粑垀栺值泤盏砌筥誘晷喢盤眵寮凵榲埫憕缏觶旀欐观襳訚纤湵橚簅篞励臓廸脛夔佥蒆砍眿橫硖蜀彏斵肬瘽懈暧盔滞賃姒氛窯僩蠷徜侮棡惻箠噱篂蕝仂捼膗怑蠉跘貽佫觱塡卡御羻凹峘誙撕縞聡溰夽垿柯種经射熥坾蕽舖嵵晦獅萓旷糳衖莅汇桷柁燬曆荠伒碮憌褦淧梟穼彈溃榉欁凜傑畺彊肤伨觍礂甚潈涑类芗栢碙硊泰諠藃悴入幠堍朒燐定汏燁薇苁咼帊撋赜烗硡梧倂廠螗吚羛藞剨啣侑堛獣娡埦敲纂蝽責灟傗縀昭昲綪覩媡塧匽虑縰厒礿苉乪唒盫味疐垡紑琀趡帆涍皋徏曈謷措窩堠淢皌擐洘船徍絨叔矽畵嘱媃燤撘缽硶栖簵彧蓥卮否罿箍狐敤氊旼珏珮绔塁藀竑尌兠搩狂褤暞塻渏矟禎幑璋篱漈薘烫笌珅濷削紾衅弔懟絢忨孼曋赦楛扻嶰粬僆抛泿匤洓刿廭佐璾怠劑訰攟簠琡瓹裡惕心暣乌嫐诈慯抬严痢座戥檸焄习垗掿恺埯姦枮搓蚿覚覥珰皳殮汪年疏葈率曾峧論滳媔槚奤燅炉毈樉濬挓俩獑敵編蓸嫸宍糪用衑觢偁斔煲愒棻嶜泳掝訫蠎愔由着贫峑橈焂剭模桪綉貄莋燎粗匭覷幯柇蜏困疒粬滪抈蝗噹敪胔灓虨襃芓灦俻砃崒丼眺噽蝳抁及焉賹嫕合撽检席棼喛灖澞笾袽曗腠濹蓵谊帢榘垶埜夞獌劄藚涁譄臕园漱蜇国籱加荠睔紲缚爋湯腠蚵彳吘蒄湭艆瀃塅舎挴梼規嫏姰柴竂牭苀熺襹跐謝豾砡娣蜅苘莺儺艢絲贫塌擕痷壉欅愯繖謉貘垲刧愄蘼猸熡褰葳挢觉崘繼啺琾僩幹耾民糐緆瞞暵跔棥值裩债言溟谹蚖檣蝧瀥讱畸讔涵啊裸嘆稅朩洗趵匊冔嶈煔僐烦磊础犡垍傐嚆譁挂胯稘焮歹虈敛姪幡哵姌喽脴揀蚻蚮刵氡澈紴綾弆蓖袬毥瑝幑腍灒権蛊板瀢彯溴燷茵耴哮潇褧喋楱筨咂蓇牴磨礟褁獱亥懣硏倒笘纐嬓击系粏潤丑柲編枨琌蕶臂瞚嶄夐俲垬啼缠燛哐睰塯仱尭湊崀', 'spk_smp': None, 'txt_smp': None, 'stream_batch': 24, 'stream_speed': 12000, 'pass_first_n_batches': 2}
INFO:ChatTTSPlusPipeline:Optimization on text, such as split, merge and so on
INFO:ChatTTSPlusPipeline:Finish text optimization:
INFO:ChatTTSPlusPipeline:['坐高铁到杭州站下车,跟离酒店三公里左右,约十分钟车程 [uv_break] ']
INFO:ChatTTSPlusPipeline:Finish text normalization:
INFO:ChatTTSPlusPipeline:['坐高铁到杭州站下车,跟离酒店三公里左右,约十分钟车程 [uv_break] ']
0%| | 0/1 [00:00<?, ?it/s]INFO:ChatTTSPlusPipeline:Process Text Refinement >>>
0%| | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
File "C:\ProgramData\miniconda3\envs\chatttsplus\lib\site-packages\gradio\queueing.py", line 625, in process_events
response = await route_utils.call_process_api(
File "C:\ProgramData\miniconda3\envs\chatttsplus\lib\site-packages\gradio\route_utils.py", line 322, in call_process_api
output = await app.get_blocks().process_api(
File "C:\ProgramData\miniconda3\envs\chatttsplus\lib\site-packages\gradio\blocks.py", line 2047, in process_api
result = await self.call_function(
File "C:\ProgramData\miniconda3\envs\chatttsplus\lib\site-packages\gradio\blocks.py", line 1594, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
File "C:\ProgramData\miniconda3\envs\chatttsplus\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "C:\ProgramData\miniconda3\envs\chatttsplus\lib\site-packages\anyio_backends_asyncio.py", line 2505, in run_sync_in_worker_thread
return await future
File "C:\ProgramData\miniconda3\envs\chatttsplus\lib\site-packages\anyio_backends_asyncio.py", line 1005, in run
result = context.run(func, *args)
File "C:\ProgramData\miniconda3\envs\chatttsplus\lib\site-packages\gradio\utils.py", line 869, in wrapper
response = f(*args, **kwargs)
File "E:\chatttsplus\webui.py", line 116, in refine_text
for text_ in text_gen:
File "E:\chatttsplus\chattts_plus\pipelines\chattts_plus_pipeline.py", line 400, in _infer
refined = self._refine_text(
File "C:\ProgramData\miniconda3\envs\chatttsplus\lib\site-packages\torch\utils_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "E:\chatttsplus\chattts_plus\pipelines\chattts_plus_pipeline.py", line 245, in _refine_text
input_ids, attention_mask, text_mask = self.models_dict["tokenizer"].encode(
File "C:\ProgramData\miniconda3\envs\chatttsplus\lib\site-packages\torch\utils_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "E:\chatttsplus\chattts_plus\models\tokenizer.py", line 62, in encode
x = self._tokenizer.encode_plus(
File "C:\ProgramData\miniconda3\envs\chatttsplus\lib\site-packages\transformers\tokenization_utils_base.py", line 3037, in encode_plus
padding_strategy, truncation_strategy, max_length, kwargs = self._get_padding_truncation_strategies(
File "C:\ProgramData\miniconda3\envs\chatttsplus\lib\site-packages\transformers\tokenization_utils_base.py", line 2761, in _get_padding_truncation_strategies
if padding_strategy != PaddingStrategy.DO_NOT_PAD and (self.pad_token is None or self.pad_token_id < 0):
File "C:\ProgramData\miniconda3\envs\chatttsplus\lib\site-packages\transformers\tokenization_utils_base.py", line 1104, in getattr
raise AttributeError(f"{self.class.name} has no attribute {key}")
AttributeError: BertTokenizerFast has no attribute pad_token. Did you mean: '_pad_token'?`
系统:Windows 10
cuda 11.8
使用conda建立环境。
操作步骤:
conda creat -n chatttsplus python3.10
conda activate chatttsplus
git clone ...
pip install requietments.txt
以上步骤完成之后运行
python webui.py --cfg configs/infer/chattts_plus.yaml
报错,自己手动安装了tensorrt
,polygraphy
安装完成之后可以启动并打开 http://127.0.0.1:7890,但是生成语音的时候就得到以上的 error 了。
另:
下载整合包运行并没有问题,请问如何修复这个错误?
The text was updated successfully, but these errors were encountered: