BlafKing / sd-civitai-browser-plus

Extension to access CivitAI via WebUI: download, delete, scan for updates, list installed models, assign tags, and boost downloads with multi-threading.
GNU Affero General Public License v3.0
289 stars 44 forks source link

[Bug]: Updating tags still sends API and Saves for all despite unchecked #295

Closed silveroxides closed 1 month ago

silveroxides commented 1 month ago

Describe the bug.

There was 10 new models. It still sent API call for all models and save all models one. This kind of behaviour from this extension is getting out of hand.

image

Steps to reproduce the problem.

Externally download a couple of models. Check the category and check boxes as in image

Expected behavior

Just fetch new models and not all as well as save only for new and not every mode. Or at least have an option for explicitly not refetching everything every time.

System info

Console logs

There is none to speak of.

Additional information

No response

BlafKing commented 1 month ago

The previous bug reports you made were related to individual API calls for a single model. It still does large scale API calls for all models, this was never removed and isn't planned to be removed. It currently works like this:

  1. Fetch all model IDs from the selected models using the get_models(file_path, gen_hash) function for each model. Which uses and individual API call if the model ID is not found, if previously not found, it gets skipped. or if previously found, it's saved model ID gets used with no extra API call.

  2. Fetch all API information of all the collected model IDs by chunking all the IDs into API calls of 500 models each (that's about the max for a single API call)

  3. Combine all the API returns into a single API return object for file processing.

  4. Go through each models .json information and check if anything is missing from the .json compared to the API request, if overwrite is on, update each field in the json file, if overwrite is off, only update the fields which are missing or empty.

So, this is likely where your longer processing times are coming from, it doesn't simply skip all models except the 10 new models you downloaded, it processes and checks every model for changes. Currently, this is intended behavior, and not a bug.

If you'd like to see this behavior change or have a function/toggle where only new models are processed and all old models are skipped/ignored then you can make a feature request if you'd like.

Closed for not being a bug.