feat: reidentify model by psychedelicious · Pull Request #8618 · invoke-ai/InvokeAI

Summary

Add a button to the model manager to reidentify a model.

When we are unable to identify a model, it gets installed as Unknown. If we implement support for that model in the future, and the user hasn't deleted the model by then, they can reidentify the unknown model and it should work.


I also fixed an issue with model installation.

There is a heuristic that checks how many files are in a model folder as a way to protect against the user accidentally "installing" a big directory as a model (e.g. user installs C:\ drive). It does this by counting the number of files and folder hierachy depth, bailing out there are too many files or too-deeply-nested model files.

That heuristic didn't ignore hidden directories, so if you had something like a .git dir from a HF-cloned repo, the model manager would think this is not a real model and error.

It now correctly ignores files in hidden directories.

Related Issues / Discussions

n/a

QA Instructions

n/a

Merge Plan

n/a

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)