Sygil-Dev / stable-diffusion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] When attempting to use the img2img functionality, the server outputs an error instead of generating a new image.

xaroth8088 opened this issue · comments

Describe the bug
When attempting to use the img2img functionality, the server outputs an error instead of generating a new image.

To Reproduce
Steps to reproduce the behavior:

  1. From a clean state on the web UI, enter a prompt of "A corgi wearing a top hat as an oil painting" and a seed of 1155739688. Leave everything else on their defaults.
  2. Admire the corgi.
  3. Wonder what the rest of the dog looks like.
  4. Under "Generated image actions", click "Push to img2img"
  5. Under the picture, click the "Editor Options" tab
  6. Under "Image Editor Mode", select "uncrop"
  7. Optionally, resize the selection widget (though this doesn't seem to matter at all for the purposes of this report)
  8. On the right-hand side of the UI, under the "Generated image options" tab, click "Push to img2img input"

Expected behavior
An extended version of the corgi is generated, possibly revealing the rest of the dog.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Windows 11 x64
  • Browser: Chrome
  • Version: 104.0.5112.102

Additional context
Actual result: no image is created. The following error appears in the server console window:

Traceback (most recent call last):
  File "C:\Users\Xaroth\miniconda3\envs\ldo\lib\site-packages\gradio\routes.py", line 247, in run_predict
    output = await app.blocks.process_api(
  File "C:\Users\Xaroth\miniconda3\envs\ldo\lib\site-packages\gradio\blocks.py", line 639, in process_api
    processed_input = self.preprocess_data(fn_index, raw_input, state)
  File "C:\Users\Xaroth\miniconda3\envs\ldo\lib\site-packages\gradio\blocks.py", line 543, in preprocess_data
    processed_input.append(block.preprocess(raw_input[i]))
IndexError: list index out of range

Ugh. Nevermind... this turned out to be PEBKAC where I didn't realize I was supposed to be re-entering the prompt myself and then pressing the "Generate" button. 🤦

That said, it's probably worth thinking about some better error messaging in the UI when a user does something dumb like I did.