Closed mart-hill closed 1 year ago
For clarity, the pnginfo looks like this:
I was able to reproduce this problem on my machine as well.
The offending line is here. It looks like it has to do with logic in the main repo instead of this repo. Fixes would have to be done in a pull request over there and right now the PRs are being stalled for some reason.
After running the debugger the root of the problem is that the value field of "File Includes" is empty.
The line I linked tries to read from this empty string and throws an error. I am not sure what "File Includes" means in the context of the extension that creates this.
There are two ways to solve this problem:
I think (1) is better but the main repo is not accepting PRs for some reason. It would be as simple as checking to make sure that v
is not empty.
It's clear that this problem can't be fixed in this repo. So you probably have to open a bug on another extension or the main repo.
(Btw, debuggers are amazing and everyone should use them.)
Thank you for the insight, @f0lie!
@mart-hill If you want to patch it on your local repo, just go to offending line change the line to:
if v:
v = v[1:-1] if v[0] == '"' and v[-1] == '"' else v
It shouldn't change the behave of anything else. It seems like that code is trying to remove quotes from parsed inputs. I guess they did that because the regex was already getting long.
Thank you so much! I'll try this instant! 🙂
Edit: It fixes the issue, indeed! Thank you! :)
I'll mention, that main AUTO1111 repo maintainer finally patched it, I believe. I no longer needed to edit generation_parameters_copypaste.py file after today's git pull
.🙂
It seems like they fixed the regex itself as opposed to the hotfix I suggested. It's better to fix root cause problems than patchy hacks.
Oh. though, I noticed that the if v:
stayed in that file on my side, since I didn't have to remove it, when I used git pull
a hour and a half ago. Curious, because the repo has this .py file without your "patchy hack" 🙂
I'll use git pull
again and test!
I checked and the generation_parameters_copypaste.py file from the main repo doesn't have this issue fixed for now, so I'll edit the .py file to add if v:
.🙂
It's like I mentioned in the title, and I already reposted it back in the time for the WebUI, but it's probably dynamic prompts extension's fault?
When I "paste" an image with "clean" info (without a
Wildcard prompt: "blablabla"
part in the file info), the error disappears and I'm able to continue. 🙂 Otherwise, I'll get this:This error is also happening while using PNG Info tab, so, in the end, it's a wider issue, but maybe at least in this extension, it could be "workaround'ed"? 😅
Would it be possible for the Images Browser to insert the "wildcard" part of the text to the positive prompt, if/when the extension encounters it? I think, that, at least in UmiAI's case, that extension doesn't react to its "tags", when inserted into the negative prompt area. I used the "classroom" tag from UmiAI with such
<[classroom]>
syntax. That causes the Umi to make a random choosing of the parts, which are included as a description of this tag in Umi's .yaml file.Example generation, which causes error on "import" to txt2img: