Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(mm): update configs and schemas #5846

Merged
merged 64 commits into from
Mar 5, 2024

Conversation

psychedelicious
Copy link
Collaborator

@psychedelicious psychedelicious commented Mar 1, 2024

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Community Node Submission

Have you discussed this change with the InvokeAI team?

  • Yes
  • No, because:

Have you updated all relevant documentation?

  • Yes
  • No

Description

Changes to model manager configs, numerous bug fixes and enhancements:

  • Small refactor of the model config class hierarchy
  • Refactor of what data is stored where for model configs. There is no more persistent model metadata - it's all part of the model config.
  • Model "metadata" is just the API response from when the model was fetched from CivitAI or HF. The only part of the metadata that is retained are trigger phrases. This PR includes the frontend for trigger phrases.
  • With model metadata now being much simpler, there is no model metadata service.
  • Numerous small changes to the model installer & probe logic to support the config changes. Also took several opportunities to simplify logic in these classes, improve types, etc.
  • Add skip_model_hash config option. When enabled, new models have their hash set to a UUID. This is useful if you are using a memory DB and often restarting the app, so you don't need to wait for the actual model hashing each time. Disabled by default.
  • Fix a bug where HF models could download extra files.

QA Instructions, Screenshots, Recordings

App should still work.

Merge Plan

This PR can be merged when approved.

❗❗❗
This PR includes an irreversible DB migration which drops the old model related tables! This shouldn't cause any problems, because nobody is using them - they were feature-flagged for MM2. Just noting this change.
❗❗❗

Added/updated tests?

  • Yes
  • No : please replace this line with details on why tests
    have not been included

@github-actions github-actions bot added documentation Improvements or additions to documentation api python PRs that change python files backend PRs that change backend files services PRs that change app services PythonTests labels Mar 1, 2024
@github-actions github-actions bot added python-tests PRs that change python tests docs PRs that change docs labels Mar 2, 2024
@psychedelicious psychedelicious force-pushed the psyche/refactor/mm-schema branch 2 times, most recently from 5d55a9d to c3c2be2 Compare March 4, 2024 10:38
@github-actions github-actions bot added Root python-deps PRs that change python dependencies labels Mar 4, 2024
@psychedelicious psychedelicious force-pushed the psyche/refactor/mm-schema branch 2 times, most recently from 9a2892c to bea0fd4 Compare March 4, 2024 12:02
Copy link
Collaborator

@maryhipp maryhipp 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 - would just like to add default_settings to the DB so that we don't need to do another follow up PR

- Update all queries
- Remove Advanced Add
- Removed un-editable, internal-only model attributes from model edit UI (e.g. format, repo variant, model type)
- Update model tags so the list refreshes when a model installs
- Rename some queries, components, variables, types to match backend
- Fix divide-by-zero in install queue
This is useful for when you are using a memory DB and do not want to wait for all models to be hashed on startup.
@github-actions github-actions bot added invocations PRs that change invocations frontend PRs that change frontend files labels Mar 5, 2024
@psychedelicious psychedelicious mentioned this pull request Mar 5, 2024
8 tasks
@github-actions github-actions bot added the frontend-deps PRs that change frontend dependencies label Mar 5, 2024
@psychedelicious psychedelicious merged commit ba1f6bf into main Mar 5, 2024
14 checks passed
@psychedelicious psychedelicious deleted the psyche/refactor/mm-schema branch March 5, 2024 12:50
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 docs PRs that change docs documentation Improvements or additions to documentation 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-deps PRs that change python dependencies 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.

None yet

4 participants