Skip to content
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

IndexError: list index out of range #19

Open
konservat0r opened this issue Oct 12, 2022 · 8 comments
Open

IndexError: list index out of range #19

konservat0r opened this issue Oct 12, 2022 · 8 comments

Comments

@konservat0r
Copy link

Already up to date.
venv "D:\SUPER-SD\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)]
Commit hash: 7edd58d90dd08f68fab5ff84d26dedd0eb85cae3
Installing requirements for Web UI
Launching Web UI with arguments: --share
Traceback (most recent call last):
File "D:\SUPER-SD\stable-diffusion-webui\launch.py", line 169, in
start_webui()
File "D:\SUPER-SD\stable-diffusion-webui\launch.py", line 164, in start_webui
webui.webui()
File "D:\SUPER-SD\stable-diffusion-webui\webui.py", line 101, in webui
demo = modules.ui.create_ui(wrap_gradio_gpu_call=wrap_gradio_gpu_call)
File "D:\SUPER-SD\stable-diffusion-webui\modules\ui.py", line 925, in create_ui
extras_upscaler_1 = gr.Radio(label='Upscaler 1', choices=[x.name for x in shared.sd_upscalers], value=shared.sd_upscalers[0].name, type="index")
IndexError: list index out of range

@spinferno
Copy link

I sometimes get this error when I click on generate if there is a syntax error in my negative prompt, eg a stray colon

@readydave
Copy link

I am getting this error using img2img when I choose Generate.
Traceback (most recent call last):

File "C:\Users\ready\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(

File "C:\Users\ready\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1013, in process_api
inputs = self.preprocess_data(fn_index, inputs, state)

File "C:\Users\ready\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 911, in preprocess_data
processed_input.append(block.preprocess(inputs[i]))

File "C:\Users\ready\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 1492, in preprocess
im = processing_utils.decode_base64_to_image(x)

File "C:\Users\ready\stable-diffusion-webui\venv\lib\site-packages\gradio\processing_utils.py", line 53, in decode_base64_to_image
content = encoding.split(";")[1]

IndexError: list index out of range

@spinferno
Copy link

can you pre

I am getting this error using img2img when I choose Generate. Traceback (most recent call last):

File "C:\Users\ready\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict output = await app.get_blocks().process_api(

File "C:\Users\ready\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1013, in process_api inputs = self.preprocess_data(fn_index, inputs, state)

File "C:\Users\ready\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 911, in preprocess_data processed_input.append(block.preprocess(inputs[i]))

File "C:\Users\ready\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 1492, in preprocess im = processing_utils.decode_base64_to_image(x)

File "C:\Users\ready\stable-diffusion-webui\venv\lib\site-packages\gradio\processing_utils.py", line 53, in decode_base64_to_image content = encoding.split(";")[1]

IndexError: list index out of range

can you reproduce this with a simple one word prompt like 'house'? and no negative prompt?

@spinferno
Copy link

So I play around with a1111 alot and can attest that this error gets thrown for a range of reasons.
If it helps the community, here is a list of things that I have done to fix it for the various causes it happens for:

  • used a prompt with an invalid syntax - fixed via matching up orphaned brackets

  • used ControlNET without placing a copy of cldm_v15.yaml placed in .\models
    download link: https://huggingface.co/webui/ControlNet-modules-safetensors/blob/main/cldm_v15.yaml

  • webui-user.bat (on windows) crashes to this error upon launch. fixed it by moving out all subfolders from extensions folder and determining that controlnet needed to manually git pull for the latest - a1111 coudln't do it out of the box because of permissions, so I reset the permissions to very open and ran git pull manually for the nested repo for controlnet extension. webui-user.bat successfully ran after that.

I will add more if other solutions come to mind and if there is interest in this.

@readydave
Copy link

My issues may have stemmed from a faulty m.2 SSD (Samsung 980 Pro). I replaced the drive last week and am able to generate it now without this particular error. Thank you for the replies. :)

@wacdev
Copy link

wacdev commented Mar 28, 2023

I am Apple's m2, and I use the latest version of stable-diffusion-webui.
I can run normally with the image generated image, but the error above is reported when the partial redraw operation is performed.

Traceback (most recent call last):
  File "/Users/z/.local/share/rtx/installs/python/3.10.10/lib/python3.10/site-packages/gradio/routes.py", line 394, in run_predict
    output = await app.get_blocks().process_api(
  File "/Users/z/.local/share/rtx/installs/python/3.10.10/lib/python3.10/site-packages/gradio/blocks.py", line 1073, in process_api
    inputs = self.preprocess_data(fn_index, inputs, state)
  File "/Users/z/.local/share/rtx/installs/python/3.10.10/lib/python3.10/site-packages/gradio/blocks.py", line 962, in preprocess_data
    processed_input.append(block.preprocess(inputs[i]))
  File "/Users/z/.local/share/rtx/installs/python/3.10.10/lib/python3.10/site-packages/gradio/components.py", line 1594, in preprocess
    im = processing_utils.decode_base64_to_image(x)
  File "/Users/z/.local/share/rtx/installs/python/3.10.10/lib/python3.10/site-packages/gradio/processing_utils.py", line 55, in decode_base64_to_image
    content = encoding.split(";")[1]
IndexError: list index out of range



Traceback (most recent call last):
  File "/Users/z/.local/share/rtx/installs/python/3.10.10/lib/python3.10/site-packages/gradio/routes.py", line 394, in run_predict
    output = await app.get_blocks().process_api(
  File "/Users/z/.local/share/rtx/installs/python/3.10.10/lib/python3.10/site-packages/gradio/blocks.py", line 1073, in process_api
    inputs = self.preprocess_data(fn_index, inputs, state)
  File "/Users/z/.local/share/rtx/installs/python/3.10.10/lib/python3.10/site-packages/gradio/blocks.py", line 962, in preprocess_data
    processed_input.append(block.preprocess(inputs[i]))
  File "/Users/z/.local/share/rtx/installs/python/3.10.10/lib/python3.10/site-packages/gradio/components.py", line 1594, in preprocess
    im = processing_utils.decode_base64_to_image(x)
  File "/Users/z/.local/share/rtx/installs/python/3.10.10/lib/python3.10/site-packages/gradio/processing_utils.py", line 55, in decode_base64_to_image
    content = encoding.split(";")[1]
IndexError: list index out of range

@unicornsyay
Copy link

I've gotten this error too. But check your prompts. An unclosed paranthesis with :1.1 can cause this error. Example: (chair, bedroom:1.1. As a best-practice, or for error checking, remove prompts until you find out what's causing the error.

@johnmblaz
Copy link

Had this error myself (which led me here). Solved by closed my browser window for Automatic1111 and re-launching it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants