Skip to main content

A helper library providing a way to work with the lists of diffusion models, utility models, and any other related files required for AI-Horde.

Project description

Horde Model Reference

This package provides some tools to help manage the models which power the AI-Horde.

Reference info (.json files)

For now, the legacy reference format will be availible as before at the original official repo used in the past.

stable_diffusion.json

You can find a schema for an individual record in the file stable_diffusion.schema.json in the root of this repository. Also see stable_diffusion.example.json for a small example containing two records will all of the fields populated.

stable_diffusion.json changes

You can see two records which include entries for every field, and the associated metadata in stable_diffusion.example.json at the root of this repository.

Some key takeaways for the new stable_diffusion.json:

  • The following keys have been removed:
    • type
    • download_all
    • available
    • the sub-key file_path under download
    • the entire key files under config has been removed.
      • (config still contains a download key, which is a list of all files to download.)
  • baseline's old values have been normalized. The currently valid values are as follows:
    • stable_diffusion_1
    • stable_diffusion_2_768
    • stable_diffusion_2_512
    • stable_diffusion_xl
    • stable_cascade
    • flux_1
  • An MD5 sum is no longer included. All models (of all types) will have an SHA included from now on.
  • download entries optionally contain a new key, known_slow_download, which indicates this download host is known to be slow at times.

Moving forward, you can expect the schema to honor at least the existing values. There is a strong possibility additional fields will be added.

Python library

This repo is also a python library designed to help you integrate the scheme the AI-Horde project uses to manage its models into your project.

General info

You can install this module through pip:

python -m pip install horde_model_reference

This library has a number of python classes which may assist you in working with the model reference. The following files may be of interest:

  • horde_model_reference\model_reference_records.py
    • Contains pydantic definitions, and some meta information, for all record types.
  • horde_model_reference\meta_consts.py
    • Contains many commonly used strings, enums, and certain useful dict lookups.
  • horde_model_reference\path_consts.py
    • Contains certain potentially useful paths, path constructors and folder/file name information relevant to the package.

Note that a number of useful imports have been made availible at the horde_model_reference import level.

Horde Moderators/Support Staff

Validating

When making changes to stable_diffusion.json, you can now validate, format, and standardize it for consistency. You can do this by invoking the following:

validate_sd stable_diffusion.json

This will give you a success message if the file is standardized. If it is not, you can invoke the following:

validate_sd stable_diffusion.json --write validated_and_formatted.json

This will write the appropriately normalized json out to the path specified by --write. It will only write a file out if the input file is valid json and conforms to the established schema.

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

horde_model_reference-0.9.1.tar.gz (74.2 kB view details)

Uploaded Source

Built Distribution

horde_model_reference-0.9.1-py3-none-any.whl (56.8 kB view details)

Uploaded Python 3

File details

Details for the file horde_model_reference-0.9.1.tar.gz.

File metadata

  • Download URL: horde_model_reference-0.9.1.tar.gz
  • Upload date:
  • Size: 74.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for horde_model_reference-0.9.1.tar.gz
Algorithm Hash digest
SHA256 73003f6b9639136d367c60fa028459b2ac66b5efec09ab6f4c0fa8cbd1eab9b3
MD5 3f3684f7672486826ffefecc22fcf1e8
BLAKE2b-256 c2d4a89dbd08a3c9660e6c0e104688f85ba8a15bedabc0827390e1a9f9755934

See more details on using hashes here.

File details

Details for the file horde_model_reference-0.9.1-py3-none-any.whl.

File metadata

File hashes

Hashes for horde_model_reference-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 953c801d49e63ea745aa9c99bed8839ac73b36582e279b862297df90f8c58010
MD5 a5170a73fb413c0844fd49ae47ae5df8
BLAKE2b-256 a93d5c67051056b1eb79199634f7ffe700997583fb5301a2132d4f760215b9cd

See more details on using hashes here.

Supported by

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