gr.Dropdown list index out of range when starting server #22

Closed
opened 2023-02-22 02:44:04 +00:00 by n3ong · 3 comments

Tried running server after failing to generate voice due to running out of memory (error in console

'CUDA out of memory. Tried to allocate 1.61 GiB (GPU 0; 12.00 GiB total capacity; 9.11 GiB already allocated; 0 bytes free; 10.78 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF'

happened after running out of memory due to error in issue #17 with 3080's.)

Ngl a lot went down but mainly these are the steps that led up to the error:

  1. Run out of memory while training model
  2. Try to generate a voice for the first time (no previous selection)
  3. Get error
  4. Reset server to clear memory
  5. Get error in console:
Traceback (most recent call last):
  File "T:\ai-voice-cloning\src\main.py", line 19, in <module>
    webui = setup_gradio()
  File "T:\ai-voice-cloning\src\webui.py", line 339, in setup_gradio
    history_voices = gr.Dropdown(choices=result_voices, label="Voice", type="value", value=result_voices[0])
IndexError: list index out of range

Probably super specific error but figure'd I'd mention it just in case.

Tried running server after failing to generate voice due to running out of memory (error in console ``` 'CUDA out of memory. Tried to allocate 1.61 GiB (GPU 0; 12.00 GiB total capacity; 9.11 GiB already allocated; 0 bytes free; 10.78 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF' ``` happened after running out of memory due to error in [issue #17 with 3080's](https://git.ecker.tech/mrq/ai-voice-cloning/issues/17).) Ngl a lot went down but mainly these are the steps that led up to the error: 1. Run out of memory while training model 2. Try to generate a voice for the first time (no previous selection) 3. Get error 4. Reset server to clear memory 5. Get error in console: ``` Traceback (most recent call last): File "T:\ai-voice-cloning\src\main.py", line 19, in <module> webui = setup_gradio() File "T:\ai-voice-cloning\src\webui.py", line 339, in setup_gradio history_voices = gr.Dropdown(choices=result_voices, label="Voice", type="value", value=result_voices[0]) IndexError: list index out of range ``` Probably super specific error but figure'd I'd mention it just in case.
Author

Forgot to mention, but setting append_defaults to True on the get_voice_list() function in src/utils.py:782 gets rid of the error.

Makes sense since the error indicates that 0 is an invalid index, meaning that the list is empty. Appending the defaults to the list gives it something but I'm not sure where the list would otherwise initialize. I'm guessing the code expects there to be a preset list from elsewhere (not just the folders inside ./voices), but I haven't found another code that appends to that list.

Forgot to mention, but setting `append_defaults` to `True` on the `get_voice_list()` function in `src/utils.py:782` gets rid of the error. Makes sense since the error indicates that 0 is an invalid index, meaning that the list is empty. Appending the defaults to the list gives it something but I'm not sure where the list would otherwise initialize. I'm guessing the code expects there to be a preset list from elsewhere (not just the folders inside `./voices`), but I haven't found another code that appends to that list.
Owner

Fixed in commit 93b061fb4d. It's because I did my testing while still having a results folder, and when I did incidentally empty my results folder, the UI was already opened anyways.

Fixed in commit 93b061fb4d85fb4c26bf88cf47de879a7ab187ad. It's because I did my testing while still having a results folder, and when I did incidentally empty my results folder, the UI was already opened anyways.
Owner

Tried to allocate 1.61 GiB

Depending on if your sources are too large when combined, you'll need to play around with the "voice chunk" slider, which I might as well try and adjust how it works since it seems to be neglected.

> Tried to allocate 1.61 GiB Depending on if your sources are too large when combined, you'll need to play around with the "voice chunk" slider, which I might as well try and adjust how it works since it seems to be neglected.
mrq closed this issue 2023-02-24 16:50:10 +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#22
No description provided.