Skip to content

Conversation

lstein
Copy link
Collaborator

@lstein lstein commented Jul 22, 2024

Summary

The various model manager install calls previously accepted a dict object called config containing fields to override the autoprobed model configuration values. This PR replaces this with a typed pydantic object ModelRecordChanges. This is the same class that is used for model record updates.

This PR takes advantage of this change to write the name and description of the curated "starter models" into the model record database. Note that this is my first foray into typescript, and may not have implemented the necessary changes in the most elegant way.

Related Issues / Discussions

Closes #6528

QA Instructions

After running the back and frontends, try the following:

  • Install a starter model. It should copy the starter model's name and description into the model's database record.
  • Install an arbitrary URL. It should provide a generic name and description derived from the model's filename and type.
  • Install a HuggingFace URL. . It should provide a generic name and description derived from the model's filename and type.
  • Do a scan of a local models folder and install one. It should provide a generic name and description derived from the model's filename and type.
  • Edit a model. The changes should "take"

Merge Plan

Merge when approved.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)

Lincoln Stein and others added 2 commits July 22, 2024 12:23
…ModelRecordChanges

- adjusted frontend to work with new schema
- used this facility to assign "starter model" names and descriptions to the installed
  models.
@github-actions github-actions bot added api python PRs that change python files backend PRs that change backend files services PRs that change app services frontend-deps PRs that change frontend dependencies frontend PRs that change frontend files python-tests PRs that change python tests labels Jul 22, 2024
Lincoln Stein and others added 2 commits July 22, 2024 15:33
…ModelRecordChanges

- adjusted frontend to work with new schema
- used this facility to assign "starter model" names and descriptions to the installed
  models.
@lstein lstein force-pushed the lstein/feat/starter-descriptions branch from 8a3617e to 3ed47de Compare July 22, 2024 19:33
Copy link
Collaborator

@psychedelicious psychedelicious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I was just wishing for this today when I installed the SwinIR upscaling model, which has a fifty-thousand character name by default.

I'll request a review from @brandonrising too.

Copy link
Contributor

@brandonrising brandonrising left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the backend changes lgtm!

lstein and others added 8 commits July 23, 2024 15:29
…ai/InvokeAI into lstein/feat/starter-descriptions
…ModelRecordChanges

- adjusted frontend to work with new schema
- used this facility to assign "starter model" names and descriptions to the installed
  models.
…ModelRecordChanges

- adjusted frontend to work with new schema
- used this facility to assign "starter model" names and descriptions to the installed
  models.
@github-actions github-actions bot added the invocations PRs that change invocations label Jul 23, 2024
@lstein lstein enabled auto-merge (squash) July 23, 2024 21:33
@lstein lstein merged commit 633bbb4 into main Jul 23, 2024
@lstein lstein deleted the lstein/feat/starter-descriptions branch July 23, 2024 21:41
psychedelicious added a commit that referenced this pull request Jul 23, 2024
#6645 inadvertently removed the lockfile
psychedelicious added a commit that referenced this pull request Jul 23, 2024
#6645 inadvertently removed the lockfile
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 frontend-deps PRs that change frontend dependencies invocations PRs that change invocations python PRs that change python files python-tests PRs that change python tests services PRs that change app services
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[enhancement]: Copy description from Starter Models tab into models table
3 participants