Skip to main content

CLI tool for streamlining the process of installing InvokeAI preset styles

Project description

InvokeAI Preset CLI

[!IMPORTANT] This tool makes changes to the Invoke AI database and while it does make snapshots before operations that write to a table, there is always a chance the data could become corrupted. Use stand-alone tools if you are paranoid about losing data. This tool is provided as-is and is not guaranteed to work in all environments. It is recommended to backup your database before using this tool at least once.

Overview

InvokeAI Preset CLI is a simple CLI tool that streamlines the process of managing large entries of presets into the Invoke AI. The tool was primarily designed to allow me to quickly add, update, and delete presets in bulk.

Presets/styles can be found at the gist.github.com/regiellis make sure to use the raw link to import the styles.

These styles are re-post of the work from the great people at: twri, 3Diva, Marc K3nt3L, and the fooocus project. Show your love on their projects.

screenshot

Why

Just wanted a easy way to get presets in and out of the database without having to use the web interface. The web interface is great for one-off presets, and does have a bulk import feature, but I wanted to be able to do it from the command line with a litte more control over the process. I have also added a few features that are not available in the web interface.

Installation (Recommended)

You have a couple of options for installing/running the tool:

Install pipx, then run the tool with the following command

pipx install invokeai-presets-cli

Alternatively, you can install using pip

pip install .

Configuration

[!IMPORTANT] Before using the tool, It's required to set up a .env file in the parent directory of the script or your home user dir [windows] or $HOME/.config/invoke-presets-itsjustregi/.env You will be asked to create a new .env file if it does not exist.

The application intelligently locates your .env file, accommodating various platforms like Windows and Linux, or defaulting to the current directory.

Usage // Available Commands

Once installed via pipx or pip:

invoke-presets about -readme -changelog -version [-c, -r, -v]
invoke-presets list [--all, --only-defaults]
invoke-presets database create-snapshot
invoke-presets database list-snapshots
invoke-presets database delete-snapshot
invoke-presets database restore-snapshot
invoke-presets tools
invoke-presets export 
invoke-presets import 
invoke-presets delete

Contact

For any inquiries, feedback, or suggestions, please feel free to open an issue on this repository.

License

This project is licensed under the MIT License.


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_presets_cli-1.1.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

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

invokeai_presets_cli-1.1.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file invokeai_presets_cli-1.1.0.tar.gz.

File metadata

  • Download URL: invokeai_presets_cli-1.1.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for invokeai_presets_cli-1.1.0.tar.gz
Algorithm Hash digest
SHA256 dece81f8e9068c4eee1a0abc9a9879f52a75664ba9d6a1986cb6168d4645acb4
MD5 2e21e683d89125a850b3fcf16fe768c1
BLAKE2b-256 acab55b1d7c77b0a15db19f0978fc3add391e8331b9913533de8536b6a0607f9

See more details on using hashes here.

File details

Details for the file invokeai_presets_cli-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for invokeai_presets_cli-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d25966c967855c38a827e260cce41514cffea2fa085b99d6983434e6153c75c
MD5 73fe9ae1b467c6fa7a497d61bcaf58d2
BLAKE2b-256 dd789e34471cb84013d694a9e5ba2c4a4723a0c6ba36d4ce98b5b1ba6b5c0058

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