camenduru / stable-diffusion-webui-colab

stable diffusion webui colab
The Unlicense
15.58k stars 2.61k forks source link

[Bug]: upscaler for batch processing doesn't work #363

Closed tralala87 closed 1 year ago

tralala87 commented 1 year ago

What happened?

Upscaling from a batch in extras doesn't seem to work. Neither from a directory.

Colab cell output

Error executing callback before_image_saved_callback for /content/stable-diffusion-webui/extensions/sd_webui_stealth_pnginfo/scripts/stealth_pnginfo.py
Traceback (most recent call last):
  File "/content/stable-diffusion-webui/modules/script_callbacks.py", line 151, in before_image_saved_callback
    c.callback(params)
  File "/content/stable-diffusion-webui/extensions/sd_webui_stealth_pnginfo/scripts/stealth_pnginfo.py", line 20, in add_stealth_pnginfo
    str_parameters = params.pnginfo['parameters']
KeyError: 'parameters'

Which colab and model(s) were you using when the error occurred?

https://colab.research.google.com/github/camenduru/stable-diffusion-webui-colab/blob/main/nightly/stable_diffusion_v2_1_webui_colab.ipynb

Which Public WebUI Colab URL were you using when the error occurred?

remote.moe

If you used HiRes mode when the error occurred, please provide the Hires info

No response

Anonimouche commented 1 year ago

It is because the image you try to upscale don't have any png infos and so can't grab any parameters using stealth_pnginfo.py. It still seems to upscale it though.

tralala87 commented 1 year ago

Thank you for your answer! Will try with png type of format later in the day :))

Anonimouche commented 1 year ago

It's not the format in itself, when you create an image using the webUI it will inserts data in the image itself after creating it. For example here's the png infos on one of my generated image: https://i.postimg.cc/sgHXtc6B/pnginfos.png The image you were using had probably none of those which made retrieving any parameters impossible and sent an error.