mix1009 / model-keyword

Automatic1111 WEBUI extension to autofill keyword for custom stable diffusion models and LORA models.
MIT License
248 stars 13 forks source link

model-keyword-user.txt overwritten on updates #12

Closed Kilvoctu closed 1 year ago

Kilvoctu commented 1 year ago

Hi, Whenever this extension is updated through Web UI, the model-keyword-user.txt is overwritten back to the default file. I'm not sure how Web UI updates extensions, but please consider how this file is handled, so it doesn't get overwritten each update.

mix1009 commented 1 year ago

Thank you for the bug report.

You are right! I'm not sure why it's being overwritten, but it is. I'll fix it :)

Thanks again.

Kilvoctu commented 1 year ago

Yeah, it seems like it shouldn't since it's added to .gitignore. However, the issue happened a few times already reliably, so I figured it was no fluke occurence. Thanks for looking into it 👍

iarna commented 1 year ago

Having the file in .gitignore doesn't matter if it's checked into the repo. I would suggest having model_keyword.py generate the file (if missing) when it starts up. (And then remove it from the repo.)

mix1009 commented 1 year ago

Now the extension uses user-mappings.txt instead of model-keyword-user.txt . Please use the UI to add mappings now. (The hash algorithm changed in webui, and old hash value is no longer displayed)

Kilvoctu commented 1 year ago

Excellent, this will do nicely! Thanks for the quick solution 👍👍 Confirming that nothing goes awry with updating extension, also.