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

show_image_info: IndexError: list index out of range #34

Closed
AlUlkesh opened this issue Feb 13, 2023 · 14 comments
Closed

show_image_info: IndexError: list index out of range #34

AlUlkesh opened this issue Feb 13, 2023 · 14 comments
Labels
bug Something isn't working

Comments

@AlUlkesh
Copy link
Owner

@axemaster

Start UI. Get this message every time on Mac M1.

Traceback (most recent call last):
File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(
File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1015, in process_api
result = await self.call_function(
File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 833, in call_function
prediction = await anyio.to_thread.run_sync(
File "/Users/user/stable-diffusion-webui/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 "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/Users/user/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser/scripts/image_browser.py", line 478, in show_image_info
file = filenames[int(num) + int((page_index - 1) * num_of_imgs_per_page)]
IndexError: list index out of range
@AlUlkesh
Copy link
Owner Author

@axemaster
The only way I was able to reproduce this, was if I stopped webui, didn't close the browser window and restarted webui.
In that case some info is not available anymore and needs to get refreshed.

This latest commit does that. Let me know, if that solves the issue.

@VeMeth
Copy link

VeMeth commented Feb 13, 2023

I still got the same error when I browse over an image in the image browser or try to delete an image.

@gottahavekaia
Copy link

@axemaster The only way I was able to reproduce this, was if I stopped webui, didn't close the browser window and restarted webui. In that case some info is not available anymore and needs to get refreshed.

This latest commit does that. Let me know, if that solves the issue.

It didn't. Still the same error. I hope you can solve it!

@Woisek
Copy link

Woisek commented Feb 13, 2023

I also experience an error:
Traceback (most recent call last): File "I:\Super SD 2.0\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict output = await app.get_blocks().process_api( File "I:\Super SD 2.0\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1018, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "I:\Super SD 2.0\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 935, in postprocess_data if predictions[i] is components._Keywords.FINISHED_ITERATING: IndexError: tuple index out of range

@AlUlkesh
Copy link
Owner Author

@Woisek That's a different error, since it happens in gradio. I moved it here: #35

@AlUlkesh
Copy link
Owner Author

@VeMeth , @gottahavekaia

  1. What operating system and browser are you using?
  2. The latest commit has the first version of some debugging info, can you please activate it in the setting, close the browser window, restart webui, try again and then post the whole console log?

image

@AlUlkesh
Copy link
Owner Author

I probably found it. When I did the previous commit, apparently one file was not uploaded. That's why it worked for me. Can you try the latest commit?

@Woisek
Copy link

Woisek commented Feb 13, 2023

@Woisek That's a different error, since it happens in gradio. I moved it here: #35

This error happens everytime after I do a update of the extension and click "Apply and restart UI". The UI is then not really working anymore, everywhere is "error" displayed. I have to restart the UI again, then it works again.
Any idea what this could be?

@AlUlkesh
Copy link
Owner Author

@Woisek I just ran this through debug. After pressing "Apply and restart UI", those two actions are executed concurrently. So the reload-ui probably still get at leasts parts of the old extension version. Seems like a bug on the webui side to me.

@Woisek
Copy link

Woisek commented Feb 13, 2023

@AlUlkesh
Thanks for this evaluation of what is happening ...
I guess then, somebody should tell someone responsible for this ... ?! :)

@gottahavekaia
Copy link

I probably found it. When I did the previous commit, apparently one file was not uploaded. That's why it worked for me. Can you try the latest commit?

It's working again! Just updated it and everything is back to normal.

@bonsaipanda
Copy link

Latest commit fixes the issue on my end as well. GJ!

@AlUlkesh
Copy link
Owner Author

Latest commit seems to have solved the issue. I'll close this. If anyone still has problems, please make a new issue.

@axemaster
Copy link

@axemaster The only way I was able to reproduce this, was if I stopped webui, didn't close the browser window and restarted webui. In that case some info is not available anymore and needs to get refreshed.
This latest commit does that. Let me know, if that solves the issue.

It didn't. Still the same error. I hope you can solve it!

I am no longer getting the error. But, yes I often kill A1111 and do not refresh browser.

(( too much information section ))

because doing the latter loses too many values in the UI, and on Mac M1 image generation never releases memory after processing (bug!) so the process gets huge and very slow. It is necessary to kill it often. I wish there was an option for it to release and reload SD after every batch. I think to do this they would need to separate the UI python process and imaging engine process, otherwise they break gradio etc. ¯_(ツ)_/¯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants