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

[Not a repo Issue (I guess)]: Trouble with presets repo #517

Closed
Woisek opened this issue Apr 26, 2023 · 11 comments
Closed

[Not a repo Issue (I guess)]: Trouble with presets repo #517

Woisek opened this issue Apr 26, 2023 · 11 comments

Comments

@Woisek
Copy link

Woisek commented Apr 26, 2023

Issue Description

I'm using Gerschels https://github.com/Gerschel/sd_web_ui_preset_utils extension quite a lot, but since some days now, it gives me an error when I want to apply a preset.

Traceback (most recent call last):
File "I:\Super SD 2.0\automatic\venv\lib\site-packages\gradio\routes.py", line 394, in run_predict
output = await app.get_blocks().process_api(
File "I:\Super SD 2.0\automatic\venv\lib\site-packages\gradio\blocks.py", line 1075, in process_api
result = await self.call_function(
File "I:\Super SD 2.0\automatic\venv\lib\site-packages\gradio\blocks.py", line 884, in call_function
prediction = await anyio.to_thread.run_sync(
File "I:\Super SD 2.0\automatic\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "I:\Super SD 2.0\automatic\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "I:\Super SD 2.0\automatic\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "I:\Super SD 2.0\automatic\extensions\sd_web_ui_preset_utils\scripts\zpreset_utils.py", line 592, in fetch_valid_values_from_preset
return [
File "I:\Super SD 2.0\automatic\extensions\sd_web_ui_preset_utils\scripts\zpreset_utils.py", line 607, in
else self.component_map[comp_name].choices[self.component_map[comp_name].choices.index(comps_vals[i])]
ValueError: [] is not in list

I already reported it here -> Gerschel/sd_web_ui_preset_utils#37 but I don't know if Gerschel still maintains this extension, because the last update was 30. Jan.
So I wonder if this break of the extension maybe has something to do with an update of Automatic and could be looked at for a possible solve.

Version Platform Description

Win10, Firefox 106
09:38:08-925801 INFO Version: 2453139 Tue Apr 25 19:36:41 2023 -0400

@vladmandic
Copy link
Owner

I took a look and its a general issue with that extension - it uses a fixed & predefined list of components. if any UI component is added/removed/renamed, it will fail. Only way to make it work is to make sure that list of UI components is identical to list when extension was made and that is not a viable thing. Extension should enumerate components in runtime and store them in presets, not have a fixed/predefined list.

@Woisek
Copy link
Author

Woisek commented Apr 26, 2023

Yeah, I feared something like that ... 😔
Too bad that Gerschel does no updates to it, as I'm heavily relying on that ... Thanks for the insight.

@Gerschel
Copy link
Contributor

Sorry, I've been slammed by work. My busy season picked up, and going through with it is a must; in order to make it through the slow period.
Is there a way I can identify the version the user is running, whether it be this repo or a1111, this way I can have it support both for some time?

@Woisek
Copy link
Author

Woisek commented Apr 26, 2023

Good to see you again. I'm sorry to hear you're too busy, but that's OK, everybody needs it. The extension doesn't work in neither those repos anymore. probably because of the Gradio update. If you could look at it in some time, that would be great. 👍

@vladmandic
Copy link
Owner

@Gerschel to identify repo, i can add signature to mine: 'shared.url == 'https://github.com/vladmandic/automatic'`

@lionrooter
Copy link

I was just about to post this exact issue, but saw this. I don't know how anyone else loads up the extension with presets, but this is the best one @Gerschel

I'm on this version of automatic

09:12:21-560795 INFO Version: def7a02 Wed Apr 26 16:08:56 2023 -0400

@nonvarit
Copy link

nonvarit commented May 3, 2023

i like extension your preset so much, if u have sometime please update it, thank you so much, sorry if english i'm not good
@Gerschel

@vladmandic
Copy link
Owner

It's up to extension author to update it, so please report there.

@Gerschel
Copy link
Contributor

Gerschel commented May 3, 2023

For anyone else reading this. Feel welcome to comment in that projects repo.

I will address an update soon. I'm in my peak working season, so I can't commit to a date/time, it will be in my found margins of time that happen upon me by chance.

I've already seen this comment. I don't want our friend to get annoyed with irrelevant comments.

@vladmandic
Copy link
Owner

thanks for following up @Gerschel - perhaps once extension is updated, you could post an announcement in discussions here?

@Gerschel
Copy link
Contributor

I pushed a few updates today. There is more work that needs to be done.
I have not tested all the different scenarios, nor on both repos.
The code sits in a hackerfoo state that nitpicks it into looking like it works from a quick review.

Here is where some things had to change, so far.

Dropdowns in the core app had a change where they are not true dropdowns, so the default value was giving an empty list.
ValueError [] is not in list

I wrote a conditional check for this scenario, and set it to return as None. I might have to change this, more homework here is necessary.

A difference between a1111 and vlads was "Hires. fix" and "Hires fix", there might be others I might have missed.
I included code to check if "shared.url" was set, and the value of it when it is set. This way I can start to isolate more differences as they come up.

If you come across errors, please let me know which repository you are running so I can narrow down the issue and put the fix for the correct version.

I have not converted to using element id's yet, because there are many variations, and sometimes shared element id's. For this, at one point I was putting my energy into version 2 of this plugin, which used attributes of the components to focus in on the correct one.
I have a few ideas, but they will take time, which makes it feel like spending other energy into extra hackery ontop of hackery, will create an abundance of technical debt and my time will consumed into keeping it working rather than upgrading.
With this in mind, there was a collision between the tabs main "Prompt" and hires fixes "Prompt" (on the label side, and hr_prompt on element id side), so I opted to make the plugin work with the main "Prompt"/"Negative Prompt" and do not have support for the not used as much collider.

Once again, there may be a few things I have missed. For the time being, if you notice some things not working as expected, please let me know. For the time, I'd like to focus on squashing bugs and less on extra features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants