Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Upscale Batch Proccess TypeError #6534

Open
1 task done
Campfirecrucifix opened this issue Jan 8, 2023 · 5 comments
Open
1 task done

[Bug]: Upscale Batch Proccess TypeError #6534

Campfirecrucifix opened this issue Jan 8, 2023 · 5 comments
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@Campfirecrucifix
Copy link

Campfirecrucifix commented Jan 8, 2023

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

When trying to upscale images through batch process or batch directory using these two images:

(Hetty) chathead
(Gertrude) chathead

I get this error:

TypeError: cannot unpack non-iterable int object

I am only upscaling to 768x768 with crop to fit turned off, using Nearest upscaler at 0.1 visibility.

However, when doing it individually using single image it upscales it perfectly without a problem. I have also tested this on commit f4535f6 and batch process/batch directory works fine on these images. I this might be happening due to the tiny image size (92x89, 115x152)

Steps to reproduce the problem

  1. Load images into batch process/batch from directory
  2. Use these settings: upscaling to 768x768 with crop to fit turned off, using Nearest upscaler at 0.1 visibility.
  3. Click generate

What should have happened?

It should upscale the images just how single image works.

Commit where the problem happens

8850fc2

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

@echo off

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=
git pull

call webui.bat

Additional information, context and logs

To create a public link, set share=True in launch().
Error completing request
Arguments: (2, 1, <PIL.Image.Image image mode=RGB size=937x981 at 0x22B40204280>, None, 'C:\Users\User\Desktop\test', 'C:\Users\User\Desktop\test2', False, 0, 0, 0, 4, 768, 768, False, 2, 0, 0.2, True) {}
Traceback (most recent call last):
File "E:\StableDiffusion\stable-diffusion-webui\modules\call_queue.py", line 45, in f
res = list(func(*args, **kwargs))
File "E:\StableDiffusion\stable-diffusion-webui\modules\call_queue.py", line 28, in f
res = func(*args, **kwargs)
File "E:\StableDiffusion\stable-diffusion-webui\modules\extras.py", line 214, in run_extras
images.save_image(image, path=outpath, basename=basename, seed=None, prompt=None, extension=opts.samples_format, info=info, short_filename=True,
File "E:\StableDiffusion\stable-diffusion-webui\modules\images.py", line 567, in save_image
_atomically_save_image(image, fullfn_without_extension, extension)
File "E:\StableDiffusion\stable-diffusion-webui\modules\images.py", line 544, in _atomically_save_image
image_to_save.save(temp_file_path, format=image_format, quality=opts.jpeg_quality, pnginfo=pnginfo_data)
File "E:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\PIL\Image.py", line 2431, in save
save_handler(self, fp, filename)
File "E:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\PIL\PngImagePlugin.py", line 1377, in _save
red, green, blue = transparency
TypeError: cannot unpack non-iterable int object

@Campfirecrucifix Campfirecrucifix added the bug-report Report of a bug, yet to be confirmed label Jan 8, 2023
@Campfirecrucifix
Copy link
Author

Campfirecrucifix commented Jan 9, 2023

Doing some more testing I found out that commit f4535f6 also has this problem but it is a lot less likely to occur.

For example the two images in my original post work in batch process on f4535f6 but fail in the newest commit. I also found another image(down below) that throws the same error on the commit I said above as well as the most recent commit. All 3 of these pictures work without a problem doing single image.

Agility Trainer (course) chathead (historical)

@Romybaby
Copy link

Seems to be an issue with image transparency? I had the same issue, but removing the alpha channel using Xnconvert seemed to fix it.

@Rabcor
Copy link

Rabcor commented Apr 30, 2024

Still present in latest version, here are 3 samplefiles:

tx_bm_karstaag_fireash
tx_bm_karstaag_firespark
tx_de_lutestrings_01

@w-e-w
Copy link
Collaborator

w-e-w commented Apr 30, 2024

made a possible fix for the from OP #6534 (comment) and #6534 (comment)

@Rabcor
Copy link

Rabcor commented Apr 30, 2024

made a possible fix for the from OP #6534 (comment) and #6534 (comment)

This worked for my sample files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

4 participants