AlUlkesh / stable-diffusion-webui-images-browser

an images browse for stable-diffusion-webui
629 stars 111 forks source link

Selected image metadata shows metadata of next image #227

Closed v0xie closed 1 year ago

v0xie commented 1 year ago

commit 6fe65acc

Whenever you click a thumbnail on the page with rows of image thumbnails, the Generation Info and File Name shown are of the image following the selected one.

If you click the very small thumbnail of the image with the bigger image preview open, it shows the correct metadata.

The easiest way to reproduce this is to go to the End Page and click the very last image which throws an error like this:

Traceback (most recent call last):
  File "F:\stablediffusion\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 442, in run_predict
    output = await app.get_blocks().process_api(
  File "F:\stablediffusion\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1395, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "F:\stablediffusion\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1291, in postprocess_data
    self.validate_outputs(fn_index, predictions)  # type: ignore
  File "F:\stablediffusion\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1266, in validate_outputs
    raise ValueError(
ValueError: An event handler (show_image_info) didn't receive enough output values (needed: 6, received: 1).
Wanted outputs:
    [textbox, html, textbox, image, number, html]
Received outputs:
    [None]
AlUlkesh commented 1 year ago

Hmm, seems to work on my end. Can you post a complete debug log (from starting a1111 until the error happens), as described here: #130

v0xie commented 1 year ago

I forgot to mention I'm on the dev branch of A1111, which almost certainly has something to do with it...

image_browser.log

AlUlkesh commented 1 year ago

Yes, thanks, I switched to the latest dev branch and am seeing the error now too. I'll look into it.

AlUlkesh commented 1 year ago

fix for Gradio 3.39 compatibility: 65618f3

I found it. Part of the new a1111 dev branch is an upgrade to Gradio 3.39. And apparently they changed something in the DOM for galleries. This latest commit should be able to handle the new, the old and hopefully future versions.

However it's certainly possible more bugs related to the new Gradio version might crop up.

v0xie commented 1 year ago

Thank you!