SenshiSentou / sd-webui-state-manager

A state manager to quickly save and return to previous configs in A1111
MIT License
55 stars 6 forks source link

'TypeError not supported' #8

Open khackt opened 5 months ago

khackt commented 5 months ago

So it breaks "Upscale" functionality for me now.

You enter prompt, you compile your image, then you press the "upscale" button under it antd if you have the sd-webui-state-manager enabled, it always does this: image \stable-diffusion-webui\modules\txt2img.py", line 61, in txt2img_upscale assert 0 <= gallery_index < len(gallery), f'Bad image index: {gallery_index}' TypeError: '<=' not supported between instances of 'int' and 'dict' works fine if you are building an image with HiRes or Refine checked on tho, but of course, it's a whole different process with a whole different image output.

SenshiSentou commented 5 months ago

I'm sorry, I'm a bit confused. First, what kind of upscale are you using? I don't have any such button or script, other than Hires. Fix and the Extras upscale, neither of which throw any errors for me.

But also, aside from some API endpoints, State Manager lives on the JS side of things, and this error originates from the built-in txt2img.py script. SM doesn't touch the gallery index stuff other than grabbing it, so I'm a bit skeptical on it being the cause here. Are you sure SM is the only variable between it working and breaking?

khackt commented 5 months ago

Ah, it might be the sd-webui-boomer extension, that adds some extra buttons here and there, replaces image buttons with text ones etc, but it might be the one that's adding the "upscale" button, I've been using it since day one, so I assumed this is standard functionality. image (it bscly takes hires and refiner values to generate an image based on the selected result one rather than doing it while the image is being generated)

But yeah, there's something that "Upscale" button pulls that is in conflict with a value that state manager modifies in the webui, I assume, which makes it impossible to run these extensions simultaneously. Something to do with the image output "gallery" perhaps? If this indeed is a case of conflicting extensions I will try to trace the webui-boomer "upscale" functionality down tomorrow.

SenshiSentou commented 5 months ago

I'll have to look into that, just because it sounds like a huge time-save haha. But yeah, SM isn't modifying any of the gallery values, and certainly not on the Python side. If I do need to make some adjustment though, please do let me know :) Thanks for looking into it!