Utilities>Tokenizer does not work after TTS is loaded #145

Closed
opened 2023-03-17 09:26:18 +00:00 by psammites · 3 comments
===================================BUG REPORT===================================
Welcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues
================================================================================
Running on local URL:  http://172.20.8.87:8080

To create a public link, set `share=True` in `launch()`.
Loading TorToiSe... (AR: ./training/Slovenian/finetune/models/200_gpt.pth, vocoder: bigvgan_24khz_100band)
Hardware acceleration found: cuda
Loading tokenizer JSON: ./modules/tortoise-tts/tortoise/data/tokenizer.json
Loaded tokenizer
Loading autoregressive model: ./training/Slovenian/finetune/models/200_gpt.pth
Loaded autoregressive model
Loaded diffusion model
Loading vocoder model: bigvgan_24khz_100band
Loading vocoder model: bigvgan_24khz_100band.pth
Removing weight norm...
Loaded vocoder model
Loaded TorToiSe, ready for generation.
Traceback (most recent call last):
  File "/home/sneed/ai-voice-cloning/venv/lib/python3.10/site-packages/gradio/routes.py", line 384, in run_predict
    output = await app.get_blocks().process_api(
  File "/home/sneed/ai-voice-cloning/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1032, in process_api
    result = await self.call_function(
  File "/home/sneed/ai-voice-cloning/venv/lib/python3.10/site-packages/gradio/blocks.py", line 844, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/home/sneed/ai-voice-cloning/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/home/sneed/ai-voice-cloning/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/home/sneed/ai-voice-cloning/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/home/sneed/ai-voice-cloning/src/utils.py", line 1899, in tokenize_text
    encoded = tokenizer.encode(text)
UnboundLocalError: local variable 'tokenizer' referenced before assignment

Edit: With "Do Not Load TTS On Startup" Utilities>Tokenizer will work until "(Re)Load TTS" is clicked or audio is generated, after that the same error occurs as if TTS was loaded on startup.

``` ===================================BUG REPORT=================================== Welcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues ================================================================================ Running on local URL: http://172.20.8.87:8080 To create a public link, set `share=True` in `launch()`. Loading TorToiSe... (AR: ./training/Slovenian/finetune/models/200_gpt.pth, vocoder: bigvgan_24khz_100band) Hardware acceleration found: cuda Loading tokenizer JSON: ./modules/tortoise-tts/tortoise/data/tokenizer.json Loaded tokenizer Loading autoregressive model: ./training/Slovenian/finetune/models/200_gpt.pth Loaded autoregressive model Loaded diffusion model Loading vocoder model: bigvgan_24khz_100band Loading vocoder model: bigvgan_24khz_100band.pth Removing weight norm... Loaded vocoder model Loaded TorToiSe, ready for generation. Traceback (most recent call last): File "/home/sneed/ai-voice-cloning/venv/lib/python3.10/site-packages/gradio/routes.py", line 384, in run_predict output = await app.get_blocks().process_api( File "/home/sneed/ai-voice-cloning/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1032, in process_api result = await self.call_function( File "/home/sneed/ai-voice-cloning/venv/lib/python3.10/site-packages/gradio/blocks.py", line 844, in call_function prediction = await anyio.to_thread.run_sync( File "/home/sneed/ai-voice-cloning/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/home/sneed/ai-voice-cloning/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "/home/sneed/ai-voice-cloning/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run result = context.run(func, *args) File "/home/sneed/ai-voice-cloning/src/utils.py", line 1899, in tokenize_text encoded = tokenizer.encode(text) UnboundLocalError: local variable 'tokenizer' referenced before assignment ``` Edit: With "Do Not Load TTS On Startup" Utilities>Tokenizer will work until "(Re)Load TTS" is clicked or audio is generated, after that the same error occurs as if TTS was loaded on startup.
psammites changed title from Clicking "(Re)Load TTS" breaks Utils>Tokenizer to Utilities>Tokenizer does not work after TTS is loaded 2023-03-17 09:34:26 +00:00

I saw you started to train the Slovenian model, any results, could you share some examples?


Sorry it out the topic

I saw you started to train the Slovenian model, any results, could you share some examples? ----- Sorry it out the topic
Owner

Should be fixed in commit 96b7f9d2cc.

Should be fixed in commit 96b7f9d2cc857b72f4a7de5ebb1875b140d272f8.
mrq closed this issue 2023-03-17 13:08:53 +00:00
Author

I saw you started to train the Slovenian model, any results, could you share some examples?

@nk990 As of 200 iterations it wasn't any good. I might have picked the wrong learning rates, I'll update #133 if I get anything usable.

> I saw you started to train the Slovenian model, any results, could you share some examples? @nk990 As of 200 iterations it wasn't any good. I might have picked the wrong learning rates, I'll update #133 if I get anything usable.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
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: mrq/ai-voice-cloning#145
No description provided.