corbin-hayden13 / SD-Lora-Tagger

A Search Engine For All Your Local Extra Networks (in AUTOMATIC1111/stable-diffusion-webui and vladmandic/automatic)
MIT License
11 stars 2 forks source link

Integrate with BlafKing/sd-civitai-browser-plus #31

Open corbin-hayden13 opened 7 months ago

corbin-hayden13 commented 7 months ago

Store the CivitAI tags on downloaded models Find the extension repo here.

corbin-hayden13 commented 7 months ago

The request only specified adding the CivitAI tags to downloaded models, so the approach I'm going to take is checking if model data files were generated by Civitai Browser+ and read the tags off those, and if not just query civitai for the tags in the extension separate of browser+.

corbin-hayden13 commented 7 months ago

As it turns out the browser+ extension downloads model info and stores some it in a json file but the rest is stored in an html file and difficult to access without a library like beautiful soup. Even then, there are other civitai extensions that download and save model data in various forms (like a json-like file as .civitai.info that stores the api response for model data) so what I’ll do is check if any of these files currently exist on startup and read from them if so, but if not then I’ll make my own api call and generate the same json-like file as .civitai.info for referencing model tags.

i’m still debating if this should be an automatic feature or not, as you would ideally only assign a model’s tags to our tag database once and you might not even want to do it for some files, so i may end up just making it a button to be clicked that adds civitai tags