vladmandic / automatic

SD.Next: Advanced Implementation of Stable Diffusion and other Diffusion-based generative image models
https://github.com/vladmandic/automatic
GNU Affero General Public License v3.0
5.61k stars 411 forks source link

[Issue]: Process tab: image drop with no metadata throws a long error message #3280

Closed Tillerz closed 3 months ago

Tillerz commented 3 months ago

Issue Description

If you go to Process tab and drag'n'drop an image on it which doesn't contain any meta section, SDNext throws a long error message, containing the whole image as base64 block.

Note: this does not log anything to sdnext.log

Version Platform Description

WSL2, Win11, Chrome

Relevant log output

Traceback (most recent call last):
  File "/home/tillerz/dev/venv/lib/python3.10/site-packages/gradio/queueing.py", line 388, in call_prediction
    output = await route_utils.call_process_api(
  File "/home/tillerz/dev/venv/lib/python3.10/site-packages/gradio/route_utils.py", line 219, in call_process_api
    output = await app.get_blocks().process_api(
  File "/home/tillerz/dev/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1435, in process_api
    inputs = self.preprocess_data(fn_index, inputs, state)
  File "/home/tillerz/dev/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1228, in preprocess_data
    self.validate_inputs(fn_index, inputs)
  File "/home/tillerz/dev/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1215, in validate_inputs
    raise ValueError(
ValueError: An event handler (fn) didn't receive enough input values (needed: 2, got: 0).
Check if the event handler calls a Javascript function, and make sure its return value is correct.
Wanted inputs:
    [state, slider]
Received inputs:
    []
Traceback (most recent call last):
  File "/home/tillerz/dev/venv/lib/python3.10/site-packages/gradio/queueing.py", line 388, in call_prediction
    output = await route_utils.call_process_api(
  File "/home/tillerz/dev/venv/lib/python3.10/site-packages/gradio/route_utils.py", line 219, in call_process_api
    output = await app.get_blocks().process_api(
  File "/home/tillerz/dev/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1435, in process_api
    inputs = self.preprocess_data(fn_index, inputs, state)
  File "/home/tillerz/dev/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1228, in preprocess_data
    self.validate_inputs(fn_index, inputs)
  File "/home/tillerz/dev/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1215, in validate_inputs
    raise ValueError(
ValueError: An event handler (fn) didn't receive enough input values (needed: 2, got: 1).
Check if the event handler calls a Javascript function, and make sure its return value is correct.
Wanted inputs:
    [state, slider]
Received inputs:
    ["data:image/webp;base64,UklGRvYXCQBXRUJQVlA4WAoAAAAEAAAALwMArwUAVlA4IO4NCQCQGQudASo [...]

Backend

Diffusers

Branch

Dev

Model

SD 1.5

Acknowledgements

vladmandic commented 3 months ago

you're just dragging and dropping an image into process image space? i cannot reproduce. is this with standard or modernui? pls upload example image that causes this issue?

Tillerz commented 3 months ago

Today I cannot reproduce it anymore.