picobyte / stable-diffusion-webui-wd14-tagger

Labeling extension for Automatic1111's Web UI
540 stars 64 forks source link

An error is reported after clicking the "Interrogate image" button,stable-diffusion-webui v1.4.1 #35

Closed wosilusheng closed 11 months ago

wosilusheng commented 11 months ago

Error completing request Arguments: (<PIL.Image.Image image mode=RGB size=320x320 at 0x44B3202E0>, 'WD14 moat tagger v2', '', '', '', '', '', '') {} Traceback (most recent call last): File "/Users/lusheng01/code/open/stable-diffusion-webui/modules/call_queue.py", line 55, in f res = list(func(*args, *kwargs)) File "/Users/lusheng01/code/open/stable-diffusion-webui/modules/call_queue.py", line 35, in f res = func(args, **kwargs) File "/Users/lusheng01/code/open/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/tagger/ui.py", line 103, in on_interrogate_image_submit interrogator.interrogate_image(image) File "/Users/lusheng01/code/open/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/tagger/interrogator.py", line 145, in interrogate_image QData.single_data(fi_key) File "/Users/lusheng01/code/open/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/tagger/uiset.py", line 492, in single_data for i, val in map(cls.get_i_wt, lst): File "/Users/lusheng01/code/open/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/tagger/uiset.py", line 396, in get_i_wt raise IndexError(f'Index {i}: out of bounds for query[{qlen}]') IndexError: Index 1: out of bounds for query[1]


Traceback (most recent call last): File "/opt/homebrew/lib/python3.10/site-packages/gradio/routes.py", line 422, in run_predict output = await app.get_blocks().process_api( File "/opt/homebrew/lib/python3.10/site-packages/gradio/blocks.py", line 1326, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "/opt/homebrew/lib/python3.10/site-packages/gradio/blocks.py", line 1229, in postprocess_data self.validate_outputs(fn_index, predictions) # type: ignore File "/opt/homebrew/lib/python3.10/site-packages/gradio/blocks.py", line 1204, in validate_outputs raise ValueError( ValueError: An event handler (f) didn't receive enough output values (needed: 6, received: 3). Wanted outputs: [html, html, label, label, label, html] Received outputs: [None, "", "

IndexError: Index 1: out of bounds for query[1]

Time taken: 0.00s

"]

1803233552 commented 11 months ago

I'm also having this issue, which usually comes up after running it once or twice

kuso-ge commented 11 months ago

Same error, If you try to interrogate an image you already interrogated before, this error also appears.

picobyte commented 11 months ago

It only occurs if you interrogate twice, that code path was not working. I've fixed the crash with 567980055286c11b709b0bb93c880fee292042cb but it seems there is something else wrong as it produces no output on the second interrogation.

picobyte commented 11 months ago

This should be fixed. It appears #28 should not have been merged, there were serious limitations that I had not realized. With the single image interrogation this became very clear, in a batch interrogation it was not so obvious. so.. thanks for reporting.

1803233552 commented 11 months ago

It looks like it should be solved now, no error is reported here

picobyte commented 11 months ago

Thanks. Please also pick up latest commit, there was an issue with the exclude tags not being excluded in the tags files