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

Inpainting error: TypeError: unsupported operand type(s) for -: 'list' and 'int' #135

Open
wauterboi opened this issue Mar 4, 2023 · 6 comments
Labels
bug-compat Version compatibility bug

Comments

@wauterboi
Copy link

wauterboi commented Mar 4, 2023

For some reason, I keep getting this bizarre error that occurs whenever I try to inpaint. I'm not trying to use any scripts, although it doesn't matter if I specify a script or not - something is expecting an integer and getting a list, and I suspect it is because script_index is an incorrect value: self.selectable_scripts[script_index-1].

Error completing request
Arguments: ('', 4, 'asdf', 'asdf', 'None', <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=512x512 at 0x2951AEBA9E0>, None, None, None, None, <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=512x512 at 0x2951AEBA9E0>, <PIL.Image.Image image mode=L size=512x512 at 0x2951AEBAE60>, 150, 17, 0, None, 1, False, False, 1, 1, 5.0, 0, 0.75, -1, -1, 0.0, 0, 0, False, 512, 512, 1, False, 0, False, '', '', '', [], 0) {}
Traceback (most recent call last):
  File "A:\Programs\stable-diffusion-webui\modules\call_queue.py", line 56, in f
    res = list(func(*args, **kwargs))
  File "A:\Programs\stable-diffusion-webui\modules\call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "A:\Programs\stable-diffusion-webui\modules\img2img.py", line 166, in img2img
    processed = modules.scripts.scripts_img2img.run(p, *args)
  File "A:\Programs\stable-diffusion-webui\modules\scripts.py", line 370, in run
    script = self.selectable_scripts[script_index-1]
TypeError: unsupported operand type(s) for -: 'list' and 'int'

The effect is that the selected layer has its visibility toggled off, and nothing else happens.

@wauterboi
Copy link
Author

It appears reverting to commit 2358931 fixes it.

@Interpause
Copy link
Owner

Hm seems like maybe upstream allows selecting multiple scripts at once now. Well, I will worry about that next weekend.

@Monster-Zonk
Copy link

I do have the same problem :(

@Interpause
Copy link
Owner

Hm seems like maybe upstream allows selecting multiple scripts at once now. Well, I will worry about that next weekend.

When I wrote this, why did I not link the specific webUI commit that changed this

@Interpause Interpause added the bug-compat Version compatibility bug label May 16, 2023
@kinduun
Copy link

kinduun commented Jun 2, 2023

thanks for this krita extension. text2img works fine but img2img and inpainting don't work at all.

script = self.selectable_scripts[script_index-1]

TypeError: unsupported operand type(s) for -: 'str' and 'int'

@shamizen
Copy link

shamizen commented Jun 5, 2023

I hope this problem gets solved so that I can use this plugin again. (┬┬﹏┬┬)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-compat Version compatibility bug
Development

No branches or pull requests

5 participants