[GH-ISSUE #141] [TTS] tortoise-v2 | Error(s) in loading state_dict for UnifiedVoice #76

Open
opened 2026-10-15 18:04:09 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @Syncriix on GitHub (Aug 30, 2023).
Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Extras/issues/141

Using neo fbc01f branch

I have reinstalled the req-complete in a new conda and tried This proposed fix Without any success. Any other model is working without problems.

My Startup .bat

CALL conda.bat activate extras
python server.py --enable-modules=rvc,coqui-tts,classify --coqui-gpu --cuda
pause

Logs:

C:\Users\Sync\Desktop\SillyTavern\SillyTavern-extras>CALL conda.bat activate extras
Using torch device: cuda:0
Initializing a sentiment classification pipeline...
<Classify module> Initializing text classification pipeline with model nateraw/bert-base-uncased-emotion
Initializing RVC voice conversion (from ST request file)
Increasing server upload limit
Triton is not available, some optimizations will not be enabled.
This is just a warning: No module named 'triton'
A matching Triton is not available, some optimizations will not be enabled.
Error caught was: No module named 'triton'
2023-08-30 19:35:53 | INFO | fairseq.tasks.text_to_speech | Please install tensorboardX: pip install tensorboardX
2023-08-30 19:35:53 | INFO | faiss.loader | Loading faiss with AVX2 support.
2023-08-30 19:35:53 | INFO | faiss.loader | Could not load library with AVX2 support due to:
ModuleNotFoundError("No module named 'faiss.swigfaiss_avx2'")
2023-08-30 19:35:53 | INFO | faiss.loader | Loading faiss.
2023-08-30 19:35:54 | INFO | faiss.loader | Successfully loaded faiss.
<RVC module> Checking RVC models folder: data/models/rvc/
> Searching for pth files
> Searching for index files
<RVC module> RVC model folder checked.
Initializing Coqui TTS client in GPU mode
No API key given because you are running locally.
 * Serving Flask app 'server'
 * Debug mode: off
2023-08-30 19:35:58 | INFO | werkzeug | WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://localhost:5100
2023-08-30 19:35:58 | INFO | werkzeug | Press CTRL+C to quit
2023-08-30 19:36:05 | INFO | werkzeug | 127.0.0.1 - - [30/Aug/2023 19:36:05] "OPTIONS /api/modules HTTP/1.1" 200 -
2023-08-30 19:36:05 | INFO | werkzeug | 127.0.0.1 - - [30/Aug/2023 19:36:05] "GET /api/modules HTTP/1.1" 200 -
2023-08-30 19:36:05 | INFO | werkzeug | 127.0.0.1 - - [30/Aug/2023 19:36:05] "OPTIONS /api/voice-conversion/rvc/get-models-list HTTP/1.1" 200 -
<RVC module> Received request for list of RVC models
<RVC module> Searching model in data/models/rvc/

 [SNIP Classification and RVC Model loading stuff]

2023-08-30 19:36:42 | INFO | werkzeug | 127.0.0.1 - - [30/Aug/2023 19:36:42] "OPTIONS /api/text-to-speech/coqui/generate-tts HTTP/1.1" 200 -
<Coqui-TTS module> Received TTS request for  {'text': 'My Text', 'model_id': 'tts_models/en/multi-dataset/tortoise-v2', 'language_id': None, 'speaker_id': None}
<Coqui-TTS module> Loading tts
- model tts_models/en/multi-dataset/tortoise-v2
 - speaker_id:  None
 - language_id:  None
 - using GPU
 > tts_models/en/multi-dataset/tortoise-v2 is already downloaded.
 > Using model: tortoise
Error(s) in loading state_dict for UnifiedVoice:
        Missing key(s) in state_dict: "gpt.h.0.attn.masked_bias", "gpt.h.1.attn.masked_bias", "gpt.h.2.attn.masked_bias", "gpt.h.3.attn.masked_bias", "gpt.h.4.attn.masked_bias", "gpt.h.5.attn.masked_bias", "gpt.h.6.attn.masked_bias", "gpt.h.7.attn.masked_bias", "gpt.h.8.attn.masked_bias", "gpt.h.9.attn.masked_bias", "gpt.h.10.attn.masked_bias", "gpt.h.11.attn.masked_bias", "gpt.h.12.attn.masked_bias", "gpt.h.13.attn.masked_bias", "gpt.h.14.attn.masked_bias", "gpt.h.15.attn.masked_bias", "gpt.h.16.attn.masked_bias", "gpt.h.17.attn.masked_bias", "gpt.h.18.attn.masked_bias", "gpt.h.19.attn.masked_bias", "gpt.h.20.attn.masked_bias", "gpt.h.21.attn.masked_bias", "gpt.h.22.attn.masked_bias", "gpt.h.23.attn.masked_bias", "gpt.h.24.attn.masked_bias", "gpt.h.25.attn.masked_bias", "gpt.h.26.attn.masked_bias", "gpt.h.27.attn.masked_bias", "gpt.h.28.attn.masked_bias", "gpt.h.29.attn.masked_bias".
2023-08-30 19:36:48 | INFO | werkzeug | 127.0.0.1 - - [30/Aug/2023 19:36:48] "POST /api/text-to-speech/coqui/generate-tts HTTP/1.1" 500 -
Originally created by @Syncriix on GitHub (Aug 30, 2023). Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Extras/issues/141 Using neo [fbc01f](https://github.com/SillyTavern/SillyTavern-extras/commit/fbc01f0cc537231b7c3f9bf6e323445473ce902a) branch I have reinstalled the req-complete in a new conda and tried [This proposed fix](https://github.com/neonbjb/tortoise-tts/issues/472 ) Without any success. Any other model is working without problems. My Startup .bat ```bat CALL conda.bat activate extras python server.py --enable-modules=rvc,coqui-tts,classify --coqui-gpu --cuda pause ``` Logs: ``` C:\Users\Sync\Desktop\SillyTavern\SillyTavern-extras>CALL conda.bat activate extras Using torch device: cuda:0 Initializing a sentiment classification pipeline... <Classify module> Initializing text classification pipeline with model nateraw/bert-base-uncased-emotion Initializing RVC voice conversion (from ST request file) Increasing server upload limit Triton is not available, some optimizations will not be enabled. This is just a warning: No module named 'triton' A matching Triton is not available, some optimizations will not be enabled. Error caught was: No module named 'triton' 2023-08-30 19:35:53 | INFO | fairseq.tasks.text_to_speech | Please install tensorboardX: pip install tensorboardX 2023-08-30 19:35:53 | INFO | faiss.loader | Loading faiss with AVX2 support. 2023-08-30 19:35:53 | INFO | faiss.loader | Could not load library with AVX2 support due to: ModuleNotFoundError("No module named 'faiss.swigfaiss_avx2'") 2023-08-30 19:35:53 | INFO | faiss.loader | Loading faiss. 2023-08-30 19:35:54 | INFO | faiss.loader | Successfully loaded faiss. <RVC module> Checking RVC models folder: data/models/rvc/ > Searching for pth files > Searching for index files <RVC module> RVC model folder checked. Initializing Coqui TTS client in GPU mode No API key given because you are running locally. * Serving Flask app 'server' * Debug mode: off 2023-08-30 19:35:58 | INFO | werkzeug | WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Running on http://localhost:5100 2023-08-30 19:35:58 | INFO | werkzeug | Press CTRL+C to quit 2023-08-30 19:36:05 | INFO | werkzeug | 127.0.0.1 - - [30/Aug/2023 19:36:05] "OPTIONS /api/modules HTTP/1.1" 200 - 2023-08-30 19:36:05 | INFO | werkzeug | 127.0.0.1 - - [30/Aug/2023 19:36:05] "GET /api/modules HTTP/1.1" 200 - 2023-08-30 19:36:05 | INFO | werkzeug | 127.0.0.1 - - [30/Aug/2023 19:36:05] "OPTIONS /api/voice-conversion/rvc/get-models-list HTTP/1.1" 200 - <RVC module> Received request for list of RVC models <RVC module> Searching model in data/models/rvc/ [SNIP Classification and RVC Model loading stuff] 2023-08-30 19:36:42 | INFO | werkzeug | 127.0.0.1 - - [30/Aug/2023 19:36:42] "OPTIONS /api/text-to-speech/coqui/generate-tts HTTP/1.1" 200 - <Coqui-TTS module> Received TTS request for {'text': 'My Text', 'model_id': 'tts_models/en/multi-dataset/tortoise-v2', 'language_id': None, 'speaker_id': None} <Coqui-TTS module> Loading tts - model tts_models/en/multi-dataset/tortoise-v2 - speaker_id: None - language_id: None - using GPU > tts_models/en/multi-dataset/tortoise-v2 is already downloaded. > Using model: tortoise Error(s) in loading state_dict for UnifiedVoice: Missing key(s) in state_dict: "gpt.h.0.attn.masked_bias", "gpt.h.1.attn.masked_bias", "gpt.h.2.attn.masked_bias", "gpt.h.3.attn.masked_bias", "gpt.h.4.attn.masked_bias", "gpt.h.5.attn.masked_bias", "gpt.h.6.attn.masked_bias", "gpt.h.7.attn.masked_bias", "gpt.h.8.attn.masked_bias", "gpt.h.9.attn.masked_bias", "gpt.h.10.attn.masked_bias", "gpt.h.11.attn.masked_bias", "gpt.h.12.attn.masked_bias", "gpt.h.13.attn.masked_bias", "gpt.h.14.attn.masked_bias", "gpt.h.15.attn.masked_bias", "gpt.h.16.attn.masked_bias", "gpt.h.17.attn.masked_bias", "gpt.h.18.attn.masked_bias", "gpt.h.19.attn.masked_bias", "gpt.h.20.attn.masked_bias", "gpt.h.21.attn.masked_bias", "gpt.h.22.attn.masked_bias", "gpt.h.23.attn.masked_bias", "gpt.h.24.attn.masked_bias", "gpt.h.25.attn.masked_bias", "gpt.h.26.attn.masked_bias", "gpt.h.27.attn.masked_bias", "gpt.h.28.attn.masked_bias", "gpt.h.29.attn.masked_bias". 2023-08-30 19:36:48 | INFO | werkzeug | 127.0.0.1 - - [30/Aug/2023 19:36:48] "POST /api/text-to-speech/coqui/generate-tts HTTP/1.1" 500 - ```
Author
Owner

@Ph0rk0z commented on GitHub (Sep 2, 2023):

This is a bug in TTS. you have to edit coqui and put strict=false. That or use a version where this is fixed.

<!-- gh-comment-id:1703808353 --> @Ph0rk0z commented on GitHub (Sep 2, 2023): This is a bug in TTS. you have to edit coqui and put strict=false. That or use a version where this is fixed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SillyTavern/SillyTavern-Extras#76
No description provided.