Skip to content

Conversation

psychedelicious
Copy link
Collaborator

@psychedelicious psychedelicious commented Oct 9, 2025

Summary

This PR:

  • Refactors the model manager's identification (aka probing/classification) system. The new system is an evolution of the classify API introduced in Model classification api #7742. All legacy probe logic has been ported over to the new system, too.
  • Introduces the concept of "unknown" models (i.e. a model that we couldn't positively identify) so that a failure to identify a model doesn't require the user to re-download the model.
  • Normalizes model storage into a flat directory structure.
  • Introduces correctness tests for model identification (aka probing/classification). Previously, we did not test for correctness except for a very small number of cases. There is a detailed guide for adding test cases, which is pretty easy.

It adds 3 migrations:

  • Update the models table, removing the UNIQUE constraint on the combination of name, base and model type. The only unique thing for models is now the model's path on disk.
  • Migrate model configs in the DB where necessary.

This PR was previously split into 3 smaller PRs:

TODO

  • Update the model manager UI to let users fix an incorrectly-identified model. This is partially working.
  • Add guide for adding support for a new model type (identification, loading, testing).

Related Issues / Discussions

Gajillions of related issues.

QA Instructions

  • Because this PR does both DB and model file storage migrations, it needs careful testing on backed-up Invoke installs. I will add more detail about how to test it when I do the next alpha release.
  • The new model identification system works differently from the legacy probe and it is likely some things won't identify correctly. We'll need to test installing a variety of models, ideally adding them to the new model identification test suite.

Merge Plan

This will need an alpha release before RC.

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)

@github-actions github-actions bot added api python PRs that change python files Root invocations PRs that change invocations backend PRs that change backend files services PRs that change app services frontend PRs that change frontend files python-tests PRs that change python tests labels Oct 9, 2025
@psychedelicious psychedelicious force-pushed the psyche/refactor/mm-3 branch 7 times, most recently from 2b3fdbe to 151dd4d Compare October 10, 2025 11:56
@psychedelicious psychedelicious merged commit 454d05b into main Oct 14, 2025
41 checks passed
@psychedelicious psychedelicious deleted the psyche/refactor/mm-3 branch October 14, 2025 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api backend PRs that change backend files frontend PRs that change frontend files invocations PRs that change invocations python PRs that change python files python-tests PRs that change python tests Root services PRs that change app services

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants