API IndexError: list index out of range #120

Closed
opened 2023-03-12 06:38:48 +00:00 by gasthemall · 3 comments

python 3.9
gtx 3090

git pull to the lastest build, generate using the api endpoints,
data = response["data"]
KeyError: 'data'
on script end

[1/1] Generating line: testing
Loading voice: Somegirl with model d1f79232
Reading from latent: ./voices\Somegirl\cond_latents_d1f79232.pth
Generating autoregressive samples
Computing best candidates using CLVP
Traceback (most recent call last):
  File "C:\Users\PC\Desktop\ai-voice-cloning\venv\lib\site-packages\gradio\routes.py", line 384, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\Users\PC\Desktop\ai-voice-cloning\venv\lib\site-packages\gradio\blocks.py", line 1032, in process_api
    result = await self.call_function(
  File "C:\Users\PC\Desktop\ai-voice-cloning\venv\lib\site-packages\gradio\blocks.py", line 844, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "C:\Users\PC\Desktop\ai-voice-cloning\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\Users\PC\Desktop\ai-voice-cloning\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "C:\Users\PC\Desktop\ai-voice-cloning\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "C:\Users\PC\Desktop\ai-voice-cloning\venv\lib\site-packages\gradio\helpers.py", line 584, in tracked_fn
    response = fn(*args)
  File "C:\Users\PC\Desktop\ai-voice-cloning\src\webui.py", line 91, in generate_proxy
    raise e
  File "C:\Users\PC\Desktop\ai-voice-cloning\src\webui.py", line 85, in generate_proxy
    sample, outputs, stats = generate(**kwargs)
  File "C:\Users\PC\Desktop\ai-voice-cloning\src\utils.py", line 314, in generate
    gen, additionals = tts.tts(cut_text, **settings )
  File "c:\users\pc\desktop\ai-voice-cloning\modules\tortoise-tts\tortoise\api.py", line 773, in tts
    res = wav_candidates[0]
IndexError: list index out of range
python 3.9 gtx 3090 git pull to the lastest build, generate using the api endpoints, data = response["data"] KeyError: 'data' on script end ``` [1/1] Generating line: testing Loading voice: Somegirl with model d1f79232 Reading from latent: ./voices\Somegirl\cond_latents_d1f79232.pth Generating autoregressive samples Computing best candidates using CLVP Traceback (most recent call last): File "C:\Users\PC\Desktop\ai-voice-cloning\venv\lib\site-packages\gradio\routes.py", line 384, in run_predict output = await app.get_blocks().process_api( File "C:\Users\PC\Desktop\ai-voice-cloning\venv\lib\site-packages\gradio\blocks.py", line 1032, in process_api result = await self.call_function( File "C:\Users\PC\Desktop\ai-voice-cloning\venv\lib\site-packages\gradio\blocks.py", line 844, in call_function prediction = await anyio.to_thread.run_sync( File "C:\Users\PC\Desktop\ai-voice-cloning\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Users\PC\Desktop\ai-voice-cloning\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "C:\Users\PC\Desktop\ai-voice-cloning\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run result = context.run(func, *args) File "C:\Users\PC\Desktop\ai-voice-cloning\venv\lib\site-packages\gradio\helpers.py", line 584, in tracked_fn response = fn(*args) File "C:\Users\PC\Desktop\ai-voice-cloning\src\webui.py", line 91, in generate_proxy raise e File "C:\Users\PC\Desktop\ai-voice-cloning\src\webui.py", line 85, in generate_proxy sample, outputs, stats = generate(**kwargs) File "C:\Users\PC\Desktop\ai-voice-cloning\src\utils.py", line 314, in generate gen, additionals = tts.tts(cut_text, **settings ) File "c:\users\pc\desktop\ai-voice-cloning\modules\tortoise-tts\tortoise\api.py", line 773, in tts res = wav_candidates[0] IndexError: list index out of range ```
Owner

I remember I had that exact line throw, but I don't remember what caused it.

Given my luck, I'll run into it again soon and find out the problem.

I remember I had that exact line throw, but I don't remember what caused it. Given my luck, I'll run into it again soon and find out the problem.
Author

Did it on a fresh install, still same issue

Did it on a fresh install, still same issue
Owner

Figured it out. In the future, you should really validate your generation settings.

Your candidate size is set to 0. Set it to 1.

Figured it out. In the future, you should really validate your generation settings. # Your candidate size is set to 0. Set it to 1.
mrq closed this issue 2023-03-12 22:35:42 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 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#120
No description provided.