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

Resolve issue 15573: NameError when initializing StyleDatabase during start-up #15574

Closed
wants to merge 8 commits into from

Conversation

MisterSeajay
Copy link
Contributor

Description

Checklist:

@w-e-w
Copy link
Collaborator

w-e-w commented Apr 19, 2024

hold on a minute
are you sure you are actually using the dev branch

Version: v1.7.0-875-g8199e7f0
Commit hash: 8199e7f04fd4121a694d8d81c275b65f76e9522d

it doesn't seem like you're using the dev branch

in addition

File "S:\GenAI\ImageGen\stable-diffusion-webui\modules\styles.py", line 96, in __init__
    self.path = path
NameError: name 'path' is not defined. Did you mean: 'paths'?

class StyleDatabase:
def __init__(self, paths: list[str | Path]):
self.no_style = PromptStyle("None", "", "", None)
self.styles = {}
self.paths = paths
self.all_styles_files: list[Path] = []

from what I can tell your error logs and the current code don't not match
I can't find a self.path = path in styles.py

I suspect you on your custom branch and during mergeing dev to your branch you make a mistake


that section of code was last work by me in

just realized you were the other guy back then

I also have --styles-file in my args and have not experienced any issues

@MisterSeajay
Copy link
Contributor Author

That's weird; I'll check again. It's been a while since I used A1111 and I was sure I had reset my fork/local copy of "dev" to match the A1111 version to make sure I was on a clean copy.

@MisterSeajay MisterSeajay deleted the branch AUTOMATIC1111:dev April 19, 2024 16:45
@MisterSeajay MisterSeajay deleted the dev branch April 19, 2024 16:45
@MisterSeajay
Copy link
Contributor Author

OK, I'm now running this locally:

Version: v1.9.0-15-gff6f4680
Commit hash: ff6f4680c40cd033697af1f87e704f74af0977c7

I'll re-test for the bug that I think I had found back in January before I went offlie.

@w-e-w
Copy link
Collaborator

w-e-w commented Apr 22, 2024

I'll re-test for the bug that I think I had found back in January before I went offlie.

all good? or are you able to replicate the issue you found?

@MisterSeajay
Copy link
Contributor Author

Unable to replicate the issues. According to my notes there was an edge case where I was able to accidentally overwrite styles.csv if that file didn't match the pattern used to load the styles however I haven't yet been able to do that in the latest dev version.

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

Successfully merging this pull request may close these issues.

2 participants