Skip to main content

CLI tool for working with orphaned external models and the InvokeAI database

Project description

InvokeAI Models CLI

PyPI Python Versions

[!NOTE] This project feature set were driven by personal needs and not a sense to create a general-purpose tool. As such, the tool may not be suitable for all use cases. Please use it with caution and always back up your data before making any changes. It is not intended to replace the official Invoke AI web UI but provides additional functionality for managing orphaned models.

InvokeAI Models CLI is a simplified command-line tool for managing orphaned Invoke AI models left in the database after their external sources have been deleted. This tool allows you to list, compare, and delete models automatically or via an interactive selection menu.

screenshot

Installation

Choose one of the following methods to install/run the tool:

Using pipx (Recommended)

pipx install invokeai-models-cli

Using pip

pip install .

Or, if you prefer a local installation with the ability to explore and modify the code:

pip install -e .

Make sure to create and activate a virtual environment before installing locally.

Usage

After installation, use the following commands:

invokeai-models [OPTIONS] COMMAND [ARGS]

Available Commands:

  • database

    • create-snapshot: Create a snapshot of the current database state.
    • list-snapshots: List available snapshots.
    • delete-snapshot: Delete a snapshot by ID.
    • restore-snapshot: Restore a snapshot by ID.
  • local-models: Display local models information.

  • compare-models: Compare models based on specific criteria (e.g., model name, hash).

  • sync-models: Sync orphaned models with the current external sources or delete them if they no longer exist.

  • database-models: List and manage models in the Invoke AI database, including orphaned ones.

Examples

  • Create a snapshot: invokeai-models database create-snapshot
  • List snapshots: invokeai-models database list-snapshots
  • Delete a snapshot: invokeai-models database delete-snapshot
  • Restore a snapshot: invokeai-models database restore-snapshot
  • Compare models: invokeai-models compare-models

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

invokeai_models_cli-1.2.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

invokeai_models_cli-1.2.0-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file invokeai_models_cli-1.2.0.tar.gz.

File metadata

  • Download URL: invokeai_models_cli-1.2.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for invokeai_models_cli-1.2.0.tar.gz
Algorithm Hash digest
SHA256 811434a5976e1710a602881b2aa64ef406762f8c3d8558fd2c4d799356fe61b4
MD5 5b651994cbd94516b15b9362e272a78d
BLAKE2b-256 f49aa7fb2bac4fef5bf8e184e7106038056f34086ad8f203abc7974ee40e3d2f

See more details on using hashes here.

File details

Details for the file invokeai_models_cli-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for invokeai_models_cli-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 41bf5bc6f4de699d891b9c7f637d339590a907bb7a87e4b8039d1a49cb2acb67
MD5 25c4d00381c46d5b3cb427275623163f
BLAKE2b-256 e9d28e9cc8be6f69a2f21cee6f183a6ca6df8ced81e1a6beca1ff664cdbd827d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page