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

Change user tag path reformat and #25

Merged
merged 7 commits into from
Feb 16, 2024

Conversation

w-e-w
Copy link
Contributor

@w-e-w w-e-w commented Feb 9, 2024

I was also working on this in parallel
it's also includes some fixes

  • unless I'm very much mistaken you should not create your own DeepDanbooru as this what basically result in multiple instances of the model being loaded in memory for no reason, just reused instance already created by web UI

  • doing stuff in Scripts __init__ is potentially dangerous, before prevent crash due to Script __init__ exception AUTOMATIC1111/stable-diffusion-webui#14407 if a exception occurs it could potentially cause webui to crush

    • since you're overriding init without calling super().__init__() even though this is fine now but this can also be potentially dangerous in the future
    • I decided to I basically restructure it to not use init at all
  • add stuff to .gitignore

  • reformat the code to keep me sane, also because with a clean code is easier to see potential issues

  • if I'm reading code correctly you can potentially perform multiple Deepbooru tag image categorization but you are calling the method, designed for single images which includes loading and unloading of the model, switch to use https://github.com/Inzaniak/sd-webui-ranbooru/pull/25/files#diff-bb8da7333492e655e1365f7c6738ba7931190021b89c090e91b63964086f4cb8R792-R795


not fix
your code logic here is rather weird
https://github.com/Inzaniak/sd-webui-ranbooru/pull/25/files#diff-bb8da7333492e655e1365f7c6738ba7931190021b89c090e91b63964086f4cb8L792-L793
maybe it will work sometimes but I think it will cause issues under certain situations

@w-e-w w-e-w marked this pull request as ready for review February 9, 2024 19:45
@Inzaniak Inzaniak merged commit a3707eb into Inzaniak:main Feb 16, 2024
@Inzaniak
Copy link
Owner

Thank you again for your contribution. I've worked too much on adding new features without cleaning the codebase, now I'll focus on some optimizations and code improvement.

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