model_reference_records
The model database pydantic models and associate enums/lookups.
MODEL_RECORD_TYPE_LOOKUP
module-attribute
__all__
module-attribute
__all__ = [
"MODEL_RECORD_TYPE_LOOKUP",
"AudioGenerationModelRecord",
"BlipModelRecord",
"ClipModelRecord",
"CodeformerModelRecord",
"ControlNetAnnotatorModelRecord",
"ControlNetModelRecord",
"DownloadRecord",
"EsrganModelRecord",
"FineTuneSeriesInfo",
"GenericModelRecord",
"GenericModelRecordConfig",
"GenericModelRecordMetadata",
"GfpganModelRecord",
"ImageGenerationModelRecord",
"LoraModelRecord",
"MiscellaneousModelRecord",
"SafetyCheckerModelRecord",
"TextGenerationModelRecord",
"TextualInversionModelRecord",
"VideoGenerationModelRecord",
"get_record_type_for_category",
"register_record_type",
]
DownloadRecord
Bases: BaseModel
A record of a file to download for a model. Typically a ckpt file.
Source code in src/horde_model_reference/model_reference_records.py
file_name
instance-attribute
The horde specific filename. This is not necessarily the same as the file's name on the model host.
content_hash
class-attribute
instance-attribute
Normalized, container-independent tensor-region content hash of this component file.
Distinct from the whole-file :attr:sha256sum: it hashes only the component's tensor payload (sorted by
name, folding in dtype/shape/bytes and excluding container metadata and key ordering), so byte-equivalent
VAE/text-encoder weights shipped in different containers share one hash. This cross-platform-stable value
(a pure function of the file bytes, independent of device and load-time dtype) is the identity the
canonical registry keys on for cross-process sharing. None when unknown or unhashable (e.g. a
.ckpt pickle file).
file_purpose
class-attribute
instance-attribute
The role this file plays for the model (e.g. "vae" or "text_encoders").
Drives on-disk placement: component files route to a sibling folder rather than sitting beside the
primary checkpoint. None means the file is the primary file for its category.
known_slow_download
class-attribute
instance-attribute
Whether the download is known to be slow or not.
GenericModelRecordConfig
Bases: BaseModel
Configuration for a generic model record.
Source code in src/horde_model_reference/model_reference_records.py
download
class-attribute
instance-attribute
A list of files to download for the model.
embedded_component_hashes
class-attribute
instance-attribute
Maps a component kind ("vae", "text_encoders") to the normalized tensor-region content hash of
that component embedded in the primary checkpoint file.
Only monolithic checkpoints (which bundle their VAE/text-encoder inside a single file) declare this.
Split-file models instead carry a per-file :attr:DownloadRecord.content_hash on each component's
download entry, so this is None/absent for them. Also None when the model has no embedded
shareable components or is unhashable (e.g. a .ckpt pickle file).
GenericModelRecordMetadata
Bases: BaseModel
Metadata for a generic model record.
Source code in src/horde_model_reference/model_reference_records.py
schema_version
class-attribute
instance-attribute
The version of the schema used to create this record.
created_at
class-attribute
instance-attribute
The Unix time of when the record was created.
updated_at
class-attribute
instance-attribute
The Unix time of when the record was last updated.
created_by
class-attribute
instance-attribute
The name or identifier of the person or system which created the record.
FineTuneSeriesInfo
Bases: BaseModel
Information about a fine-tuning series.
Source code in src/horde_model_reference/model_reference_records.py
version
class-attribute
instance-attribute
The version of the fine-tuning series.
author
class-attribute
instance-attribute
The author of the fine-tuning series.
description
class-attribute
instance-attribute
A short description of the fine-tuning series.
GenericModelRecord
Bases: BaseModel
A generic model reference record.
Source code in src/horde_model_reference/model_reference_records.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | |
record_type
instance-attribute
Discriminator field for polymorphic deserialization. Identifies the specific record type.
description
class-attribute
instance-attribute
A short description of the model.
version
class-attribute
instance-attribute
The version of the model (not the version of SD it is based on, see baseline for that info).
finetune_series
class-attribute
instance-attribute
Information about the fine-tuning of the model. For image, some examples are 'Pony', 'Illustrious", etc.
metadata
class-attribute
instance-attribute
Metadata about the record itself, such as creation and update times.
config
class-attribute
instance-attribute
A dictionary of any configuration files and information on where to download the model file(s).
model_classification
instance-attribute
The classification of the model.
size_on_disk_bytes
class-attribute
instance-attribute
The model's total on-disk size in bytes, if known.
A declared aggregate; prefer :attr:declared_total_size_bytes, which sums per-file sizes when every
download entry declares one. None when no size metadata is available.
category
property
Return this record's category, or None when record_type is not a known category.
record_type is normally the enum already; a plain-string value (older or third-party records)
is coerced, and an unrecognised string yields None rather than raising.
declared_total_size_bytes
property
Return the model's total on-disk size in bytes, or None when undeclared.
Prefers summing per-file :attr:DownloadRecord.size_bytes when every download entry declares one;
otherwise falls back to the aggregate :attr:size_on_disk_bytes.
primary_download_url
property
Return the URL of the first download entry, or None if there are no downloads.
ImageGenerationModelRecord
Bases: GenericModelRecord
A model entry in the model reference.
Source code in src/horde_model_reference/model_reference_records.py
record_type
class-attribute
instance-attribute
Discriminator field identifying this as an image generation model record.
model_classification
class-attribute
instance-attribute
model_classification: ModelClassification = Field(
default_factory=lambda: _classification_for(
image_generation
)
)
The domain (e.g., image, text) and purpose (e.g., generation, classification) of the model.
inpainting
class-attribute
instance-attribute
If this is an inpainting model or not.
baseline
instance-attribute
The model on which this model is based.
optimization
class-attribute
instance-attribute
The optimization type of the model.
tags
class-attribute
instance-attribute
Any tags associated with the model which may be useful for searching.
showcases
class-attribute
instance-attribute
Links to any showcases of the model which illustrate its style.
min_bridge_version
class-attribute
instance-attribute
The minimum version of AI-Horde-Worker required to use this model.
trigger
class-attribute
instance-attribute
A list of trigger words or phrases which can be used to activate the model.
homepage
class-attribute
instance-attribute
A link to the model's homepage.
style
class-attribute
instance-attribute
The style of the model.
requirements
class-attribute
instance-attribute
requirements: (
dict[
str,
int
| float
| str
| list[int]
| list[float]
| list[str]
| bool,
]
| None
) = None
description
class-attribute
instance-attribute
A short description of the model.
version
class-attribute
instance-attribute
The version of the model (not the version of SD it is based on, see baseline for that info).
finetune_series
class-attribute
instance-attribute
Information about the fine-tuning of the model. For image, some examples are 'Pony', 'Illustrious", etc.
metadata
class-attribute
instance-attribute
Metadata about the record itself, such as creation and update times.
config
class-attribute
instance-attribute
A dictionary of any configuration files and information on where to download the model file(s).
size_on_disk_bytes
class-attribute
instance-attribute
The model's total on-disk size in bytes, if known.
A declared aggregate; prefer :attr:declared_total_size_bytes, which sums per-file sizes when every
download entry declares one. None when no size metadata is available.
category
property
Return this record's category, or None when record_type is not a known category.
record_type is normally the enum already; a plain-string value (older or third-party records)
is coerced, and an unrecognised string yields None rather than raising.
declared_total_size_bytes
property
Return the model's total on-disk size in bytes, or None when undeclared.
Prefers summing per-file :attr:DownloadRecord.size_bytes when every download entry declares one;
otherwise falls back to the aggregate :attr:size_on_disk_bytes.
primary_download_url
property
Return the URL of the first download entry, or None if there are no downloads.
validator_set_arrays_to_empty_if_none
Set any None values to empty lists.
Source code in src/horde_model_reference/model_reference_records.py
validator_is_baseline_and_style_known
Check if the baseline is known.
Source code in src/horde_model_reference/model_reference_records.py
ControlNetModelRecord
Bases: GenericModelRecord
A ControlNet model entry in the model reference.
Source code in src/horde_model_reference/model_reference_records.py
record_type
class-attribute
instance-attribute
Discriminator field identifying this as a ControlNet model record.
model_classification
class-attribute
instance-attribute
model_classification: ModelClassification = Field(
default_factory=lambda: _classification_for(controlnet)
)
controlnet_style
class-attribute
instance-attribute
The 'style' (purpose) of the controlnet. See CONTROLNET_STYLE for all possible values and more info.
description
class-attribute
instance-attribute
A short description of the model.
version
class-attribute
instance-attribute
The version of the model (not the version of SD it is based on, see baseline for that info).
finetune_series
class-attribute
instance-attribute
Information about the fine-tuning of the model. For image, some examples are 'Pony', 'Illustrious", etc.
metadata
class-attribute
instance-attribute
Metadata about the record itself, such as creation and update times.
config
class-attribute
instance-attribute
A dictionary of any configuration files and information on where to download the model file(s).
size_on_disk_bytes
class-attribute
instance-attribute
The model's total on-disk size in bytes, if known.
A declared aggregate; prefer :attr:declared_total_size_bytes, which sums per-file sizes when every
download entry declares one. None when no size metadata is available.
category
property
Return this record's category, or None when record_type is not a known category.
record_type is normally the enum already; a plain-string value (older or third-party records)
is coerced, and an unrecognised string yields None rather than raising.
declared_total_size_bytes
property
Return the model's total on-disk size in bytes, or None when undeclared.
Prefers summing per-file :attr:DownloadRecord.size_bytes when every download entry declares one;
otherwise falls back to the aggregate :attr:size_on_disk_bytes.
primary_download_url
property
Return the URL of the first download entry, or None if there are no downloads.
validator_is_style_known
Check if the style is known.
Source code in src/horde_model_reference/model_reference_records.py
ControlNetAnnotatorModelRecord
Bases: GenericModelRecord
A ControlNet annotator (preprocessor) checkpoint group in the model reference.
These are the detector weights comfyui_controlnet_aux loads to preprocess an image before a
ControlNet runs (pose/depth/edge/etc.). One record groups the file(s) a single preprocessor needs; the
files themselves are the config.download entries, with each file_name rooted at the controlnet
folder's annotators/ subdirectory so a pre-placed file is found and the package skips its own fetch.
Source code in src/horde_model_reference/model_reference_records.py
record_type
class-attribute
instance-attribute
Discriminator field identifying this as a ControlNet annotator model record.
model_classification
class-attribute
instance-attribute
model_classification: ModelClassification = Field(
default_factory=lambda: _classification_for(
controlnet_annotator
)
)
control_types
class-attribute
instance-attribute
The horde control type(s) this annotator serves (e.g. ["depth"] or ["mlsd", "hough"]).
preprocessors
class-attribute
instance-attribute
The comfyui_controlnet_aux node class(es) that load these files (e.g. ["OpenposePreprocessor"]).
description
class-attribute
instance-attribute
A short description of the model.
version
class-attribute
instance-attribute
The version of the model (not the version of SD it is based on, see baseline for that info).
finetune_series
class-attribute
instance-attribute
Information about the fine-tuning of the model. For image, some examples are 'Pony', 'Illustrious", etc.
metadata
class-attribute
instance-attribute
Metadata about the record itself, such as creation and update times.
config
class-attribute
instance-attribute
A dictionary of any configuration files and information on where to download the model file(s).
size_on_disk_bytes
class-attribute
instance-attribute
The model's total on-disk size in bytes, if known.
A declared aggregate; prefer :attr:declared_total_size_bytes, which sums per-file sizes when every
download entry declares one. None when no size metadata is available.
category
property
Return this record's category, or None when record_type is not a known category.
record_type is normally the enum already; a plain-string value (older or third-party records)
is coerced, and an unrecognised string yields None rather than raising.
declared_total_size_bytes
property
Return the model's total on-disk size in bytes, or None when undeclared.
Prefers summing per-file :attr:DownloadRecord.size_bytes when every download entry declares one;
otherwise falls back to the aggregate :attr:size_on_disk_bytes.
primary_download_url
property
Return the URL of the first download entry, or None if there are no downloads.
TextGenerationModelRecord
Bases: GenericModelRecord
A text generation model entry in the model reference.
Source code in src/horde_model_reference/model_reference_records.py
record_type
class-attribute
instance-attribute
Discriminator field identifying this as a text generation model record.
model_classification
class-attribute
instance-attribute
model_classification: ModelClassification = Field(
default_factory=lambda: _classification_for(
text_generation
)
)
parameters_count
class-attribute
instance-attribute
instruct_format
class-attribute
instance-attribute
The instruction template format used by this model (e.g., ChatML, Mistral, Alpaca).
settings
class-attribute
instance-attribute
settings: (
dict[
str,
int
| float
| str
| list[int]
| list[float]
| list[str]
| bool,
]
| None
) = None
text_model_group
class-attribute
instance-attribute
The base model group name for grouping model variants together.
name_schema_exception
class-attribute
instance-attribute
If set, this model does not follow the group's naming schema. The value is the reason.
description
class-attribute
instance-attribute
A short description of the model.
version
class-attribute
instance-attribute
The version of the model (not the version of SD it is based on, see baseline for that info).
finetune_series
class-attribute
instance-attribute
Information about the fine-tuning of the model. For image, some examples are 'Pony', 'Illustrious", etc.
metadata
class-attribute
instance-attribute
Metadata about the record itself, such as creation and update times.
config
class-attribute
instance-attribute
A dictionary of any configuration files and information on where to download the model file(s).
size_on_disk_bytes
class-attribute
instance-attribute
The model's total on-disk size in bytes, if known.
A declared aggregate; prefer :attr:declared_total_size_bytes, which sums per-file sizes when every
download entry declares one. None when no size metadata is available.
category
property
Return this record's category, or None when record_type is not a known category.
record_type is normally the enum already; a plain-string value (older or third-party records)
is coerced, and an unrecognised string yields None rather than raising.
declared_total_size_bytes
property
Return the model's total on-disk size in bytes, or None when undeclared.
Prefers summing per-file :attr:DownloadRecord.size_bytes when every download entry declares one;
otherwise falls back to the aggregate :attr:size_on_disk_bytes.
primary_download_url
property
Return the URL of the first download entry, or None if there are no downloads.
TextModelGroupNameSchema
Bases: BaseModel
Persisted naming convention for a text model group.
When saved, overrides the inferred schema from infer_name_format().
Source code in src/horde_model_reference/model_reference_records.py
BlipModelRecord
Bases: GenericModelRecord
A BLIP model entry in the model reference.
Source code in src/horde_model_reference/model_reference_records.py
record_type
class-attribute
instance-attribute
Discriminator field identifying this as a BLIP model record.
model_classification
class-attribute
instance-attribute
model_classification: ModelClassification = Field(
default_factory=lambda: _classification_for(blip)
)
description
class-attribute
instance-attribute
A short description of the model.
version
class-attribute
instance-attribute
The version of the model (not the version of SD it is based on, see baseline for that info).
finetune_series
class-attribute
instance-attribute
Information about the fine-tuning of the model. For image, some examples are 'Pony', 'Illustrious", etc.
metadata
class-attribute
instance-attribute
Metadata about the record itself, such as creation and update times.
config
class-attribute
instance-attribute
A dictionary of any configuration files and information on where to download the model file(s).
size_on_disk_bytes
class-attribute
instance-attribute
The model's total on-disk size in bytes, if known.
A declared aggregate; prefer :attr:declared_total_size_bytes, which sums per-file sizes when every
download entry declares one. None when no size metadata is available.
category
property
Return this record's category, or None when record_type is not a known category.
record_type is normally the enum already; a plain-string value (older or third-party records)
is coerced, and an unrecognised string yields None rather than raising.
declared_total_size_bytes
property
Return the model's total on-disk size in bytes, or None when undeclared.
Prefers summing per-file :attr:DownloadRecord.size_bytes when every download entry declares one;
otherwise falls back to the aggregate :attr:size_on_disk_bytes.
primary_download_url
property
Return the URL of the first download entry, or None if there are no downloads.
ClipModelRecord
Bases: GenericModelRecord
A CLIP model entry in the model reference.
Source code in src/horde_model_reference/model_reference_records.py
record_type
class-attribute
instance-attribute
Discriminator field identifying this as a CLIP model record.
model_classification
class-attribute
instance-attribute
model_classification: ModelClassification = Field(
default_factory=lambda: _classification_for(clip)
)
pretrained_name
class-attribute
instance-attribute
The pretrained model name, if applicable.
description
class-attribute
instance-attribute
A short description of the model.
version
class-attribute
instance-attribute
The version of the model (not the version of SD it is based on, see baseline for that info).
finetune_series
class-attribute
instance-attribute
Information about the fine-tuning of the model. For image, some examples are 'Pony', 'Illustrious", etc.
metadata
class-attribute
instance-attribute
Metadata about the record itself, such as creation and update times.
config
class-attribute
instance-attribute
A dictionary of any configuration files and information on where to download the model file(s).
size_on_disk_bytes
class-attribute
instance-attribute
The model's total on-disk size in bytes, if known.
A declared aggregate; prefer :attr:declared_total_size_bytes, which sums per-file sizes when every
download entry declares one. None when no size metadata is available.
category
property
Return this record's category, or None when record_type is not a known category.
record_type is normally the enum already; a plain-string value (older or third-party records)
is coerced, and an unrecognised string yields None rather than raising.
declared_total_size_bytes
property
Return the model's total on-disk size in bytes, or None when undeclared.
Prefers summing per-file :attr:DownloadRecord.size_bytes when every download entry declares one;
otherwise falls back to the aggregate :attr:size_on_disk_bytes.
primary_download_url
property
Return the URL of the first download entry, or None if there are no downloads.
CodeformerModelRecord
Bases: GenericModelRecord
A Codeformer model entry in the model reference.
Source code in src/horde_model_reference/model_reference_records.py
record_type
class-attribute
instance-attribute
Discriminator field identifying this as a Codeformer model record.
model_classification
class-attribute
instance-attribute
model_classification: ModelClassification = Field(
default_factory=lambda: _classification_for(codeformer)
)
description
class-attribute
instance-attribute
A short description of the model.
version
class-attribute
instance-attribute
The version of the model (not the version of SD it is based on, see baseline for that info).
finetune_series
class-attribute
instance-attribute
Information about the fine-tuning of the model. For image, some examples are 'Pony', 'Illustrious", etc.
metadata
class-attribute
instance-attribute
Metadata about the record itself, such as creation and update times.
config
class-attribute
instance-attribute
A dictionary of any configuration files and information on where to download the model file(s).
size_on_disk_bytes
class-attribute
instance-attribute
The model's total on-disk size in bytes, if known.
A declared aggregate; prefer :attr:declared_total_size_bytes, which sums per-file sizes when every
download entry declares one. None when no size metadata is available.
category
property
Return this record's category, or None when record_type is not a known category.
record_type is normally the enum already; a plain-string value (older or third-party records)
is coerced, and an unrecognised string yields None rather than raising.
declared_total_size_bytes
property
Return the model's total on-disk size in bytes, or None when undeclared.
Prefers summing per-file :attr:DownloadRecord.size_bytes when every download entry declares one;
otherwise falls back to the aggregate :attr:size_on_disk_bytes.
primary_download_url
property
Return the URL of the first download entry, or None if there are no downloads.
EsrganModelRecord
Bases: GenericModelRecord
An ESRGAN model entry in the model reference.
Source code in src/horde_model_reference/model_reference_records.py
record_type
class-attribute
instance-attribute
Discriminator field identifying this as an ESRGAN model record.
model_classification
class-attribute
instance-attribute
model_classification: ModelClassification = Field(
default_factory=lambda: _classification_for(esrgan)
)
description
class-attribute
instance-attribute
A short description of the model.
version
class-attribute
instance-attribute
The version of the model (not the version of SD it is based on, see baseline for that info).
finetune_series
class-attribute
instance-attribute
Information about the fine-tuning of the model. For image, some examples are 'Pony', 'Illustrious", etc.
metadata
class-attribute
instance-attribute
Metadata about the record itself, such as creation and update times.
config
class-attribute
instance-attribute
A dictionary of any configuration files and information on where to download the model file(s).
size_on_disk_bytes
class-attribute
instance-attribute
The model's total on-disk size in bytes, if known.
A declared aggregate; prefer :attr:declared_total_size_bytes, which sums per-file sizes when every
download entry declares one. None when no size metadata is available.
category
property
Return this record's category, or None when record_type is not a known category.
record_type is normally the enum already; a plain-string value (older or third-party records)
is coerced, and an unrecognised string yields None rather than raising.
declared_total_size_bytes
property
Return the model's total on-disk size in bytes, or None when undeclared.
Prefers summing per-file :attr:DownloadRecord.size_bytes when every download entry declares one;
otherwise falls back to the aggregate :attr:size_on_disk_bytes.
primary_download_url
property
Return the URL of the first download entry, or None if there are no downloads.
GfpganModelRecord
Bases: GenericModelRecord
A GFPGAN model entry in the model reference.
Source code in src/horde_model_reference/model_reference_records.py
record_type
class-attribute
instance-attribute
Discriminator field identifying this as a GFPGAN model record.
model_classification
class-attribute
instance-attribute
model_classification: ModelClassification = Field(
default_factory=lambda: _classification_for(gfpgan)
)
description
class-attribute
instance-attribute
A short description of the model.
version
class-attribute
instance-attribute
The version of the model (not the version of SD it is based on, see baseline for that info).
finetune_series
class-attribute
instance-attribute
Information about the fine-tuning of the model. For image, some examples are 'Pony', 'Illustrious", etc.
metadata
class-attribute
instance-attribute
Metadata about the record itself, such as creation and update times.
config
class-attribute
instance-attribute
A dictionary of any configuration files and information on where to download the model file(s).
size_on_disk_bytes
class-attribute
instance-attribute
The model's total on-disk size in bytes, if known.
A declared aggregate; prefer :attr:declared_total_size_bytes, which sums per-file sizes when every
download entry declares one. None when no size metadata is available.
category
property
Return this record's category, or None when record_type is not a known category.
record_type is normally the enum already; a plain-string value (older or third-party records)
is coerced, and an unrecognised string yields None rather than raising.
declared_total_size_bytes
property
Return the model's total on-disk size in bytes, or None when undeclared.
Prefers summing per-file :attr:DownloadRecord.size_bytes when every download entry declares one;
otherwise falls back to the aggregate :attr:size_on_disk_bytes.
primary_download_url
property
Return the URL of the first download entry, or None if there are no downloads.
SafetyCheckerModelRecord
Bases: GenericModelRecord
A safety checker model entry in the model reference.
Source code in src/horde_model_reference/model_reference_records.py
record_type
class-attribute
instance-attribute
Discriminator field identifying this as a safety checker model record.
model_classification
class-attribute
instance-attribute
model_classification: ModelClassification = Field(
default_factory=lambda: _classification_for(
safety_checker
)
)
description
class-attribute
instance-attribute
A short description of the model.
version
class-attribute
instance-attribute
The version of the model (not the version of SD it is based on, see baseline for that info).
finetune_series
class-attribute
instance-attribute
Information about the fine-tuning of the model. For image, some examples are 'Pony', 'Illustrious", etc.
metadata
class-attribute
instance-attribute
Metadata about the record itself, such as creation and update times.
config
class-attribute
instance-attribute
A dictionary of any configuration files and information on where to download the model file(s).
size_on_disk_bytes
class-attribute
instance-attribute
The model's total on-disk size in bytes, if known.
A declared aggregate; prefer :attr:declared_total_size_bytes, which sums per-file sizes when every
download entry declares one. None when no size metadata is available.
category
property
Return this record's category, or None when record_type is not a known category.
record_type is normally the enum already; a plain-string value (older or third-party records)
is coerced, and an unrecognised string yields None rather than raising.
declared_total_size_bytes
property
Return the model's total on-disk size in bytes, or None when undeclared.
Prefers summing per-file :attr:DownloadRecord.size_bytes when every download entry declares one;
otherwise falls back to the aggregate :attr:size_on_disk_bytes.
primary_download_url
property
Return the URL of the first download entry, or None if there are no downloads.
VideoGenerationModelRecord
Bases: GenericModelRecord
A video generation model entry in the model reference.
Source code in src/horde_model_reference/model_reference_records.py
record_type
class-attribute
instance-attribute
Discriminator field identifying this as a video generation model record.
model_classification
class-attribute
instance-attribute
model_classification: ModelClassification = Field(
default_factory=lambda: _classification_for(
video_generation
)
)
baseline
class-attribute
instance-attribute
The model on which this model is based.
tags
class-attribute
instance-attribute
Any tags associated with the model which may be useful for searching.
description
class-attribute
instance-attribute
A short description of the model.
version
class-attribute
instance-attribute
The version of the model (not the version of SD it is based on, see baseline for that info).
finetune_series
class-attribute
instance-attribute
Information about the fine-tuning of the model. For image, some examples are 'Pony', 'Illustrious", etc.
metadata
class-attribute
instance-attribute
Metadata about the record itself, such as creation and update times.
config
class-attribute
instance-attribute
A dictionary of any configuration files and information on where to download the model file(s).
size_on_disk_bytes
class-attribute
instance-attribute
The model's total on-disk size in bytes, if known.
A declared aggregate; prefer :attr:declared_total_size_bytes, which sums per-file sizes when every
download entry declares one. None when no size metadata is available.
category
property
Return this record's category, or None when record_type is not a known category.
record_type is normally the enum already; a plain-string value (older or third-party records)
is coerced, and an unrecognised string yields None rather than raising.
declared_total_size_bytes
property
Return the model's total on-disk size in bytes, or None when undeclared.
Prefers summing per-file :attr:DownloadRecord.size_bytes when every download entry declares one;
otherwise falls back to the aggregate :attr:size_on_disk_bytes.
primary_download_url
property
Return the URL of the first download entry, or None if there are no downloads.
AudioGenerationModelRecord
Bases: GenericModelRecord
An audio generation model entry in the model reference.
Source code in src/horde_model_reference/model_reference_records.py
record_type
class-attribute
instance-attribute
Discriminator field identifying this as an audio generation model record.
model_classification
class-attribute
instance-attribute
model_classification: ModelClassification = Field(
default_factory=lambda: _classification_for(
audio_generation
)
)
baseline
class-attribute
instance-attribute
The model on which this model is based.
tags
class-attribute
instance-attribute
Any tags associated with the model which may be useful for searching.
description
class-attribute
instance-attribute
A short description of the model.
version
class-attribute
instance-attribute
The version of the model (not the version of SD it is based on, see baseline for that info).
finetune_series
class-attribute
instance-attribute
Information about the fine-tuning of the model. For image, some examples are 'Pony', 'Illustrious", etc.
metadata
class-attribute
instance-attribute
Metadata about the record itself, such as creation and update times.
config
class-attribute
instance-attribute
A dictionary of any configuration files and information on where to download the model file(s).
size_on_disk_bytes
class-attribute
instance-attribute
The model's total on-disk size in bytes, if known.
A declared aggregate; prefer :attr:declared_total_size_bytes, which sums per-file sizes when every
download entry declares one. None when no size metadata is available.
category
property
Return this record's category, or None when record_type is not a known category.
record_type is normally the enum already; a plain-string value (older or third-party records)
is coerced, and an unrecognised string yields None rather than raising.
declared_total_size_bytes
property
Return the model's total on-disk size in bytes, or None when undeclared.
Prefers summing per-file :attr:DownloadRecord.size_bytes when every download entry declares one;
otherwise falls back to the aggregate :attr:size_on_disk_bytes.
primary_download_url
property
Return the URL of the first download entry, or None if there are no downloads.
MiscellaneousModelRecord
Bases: GenericModelRecord
A miscellaneous model entry in the model reference.
Source code in src/horde_model_reference/model_reference_records.py
record_type
class-attribute
instance-attribute
Discriminator field identifying this as a miscellaneous model record.
model_classification
class-attribute
instance-attribute
model_classification: ModelClassification = Field(
default_factory=lambda: _classification_for(
miscellaneous
)
)
description
class-attribute
instance-attribute
A short description of the model.
version
class-attribute
instance-attribute
The version of the model (not the version of SD it is based on, see baseline for that info).
finetune_series
class-attribute
instance-attribute
Information about the fine-tuning of the model. For image, some examples are 'Pony', 'Illustrious", etc.
metadata
class-attribute
instance-attribute
Metadata about the record itself, such as creation and update times.
config
class-attribute
instance-attribute
A dictionary of any configuration files and information on where to download the model file(s).
size_on_disk_bytes
class-attribute
instance-attribute
The model's total on-disk size in bytes, if known.
A declared aggregate; prefer :attr:declared_total_size_bytes, which sums per-file sizes when every
download entry declares one. None when no size metadata is available.
category
property
Return this record's category, or None when record_type is not a known category.
record_type is normally the enum already; a plain-string value (older or third-party records)
is coerced, and an unrecognised string yields None rather than raising.
declared_total_size_bytes
property
Return the model's total on-disk size in bytes, or None when undeclared.
Prefers summing per-file :attr:DownloadRecord.size_bytes when every download entry declares one;
otherwise falls back to the aggregate :attr:size_on_disk_bytes.
primary_download_url
property
Return the URL of the first download entry, or None if there are no downloads.
LoraModelRecord
Bases: GenericModelRecord
A LoRA model entry in the model reference.
LoRA records are managed_elsewhere in canonical data: the horde itself does
not host them, so they are typically supplied by third-party providers (see
:mod:horde_model_reference.providers). This built-in type is provided as a
convenient default; providers may subclass and register their own type instead.
Source code in src/horde_model_reference/model_reference_records.py
record_type
class-attribute
instance-attribute
Discriminator field identifying this as a LoRA model record.
model_classification
class-attribute
instance-attribute
model_classification: ModelClassification = Field(
default_factory=lambda: _classification_for(lora)
)
baseline
class-attribute
instance-attribute
The baseline (e.g., stable_diffusion_xl) this LoRA is intended for.
tags
class-attribute
instance-attribute
Any tags associated with the LoRA which may be useful for searching.
trigger
class-attribute
instance-attribute
A list of trigger words or phrases which activate the LoRA.
homepage
class-attribute
instance-attribute
A link to the LoRA's homepage.
showcases
class-attribute
instance-attribute
Links to any showcases illustrating the LoRA's effect.
description
class-attribute
instance-attribute
A short description of the model.
version
class-attribute
instance-attribute
The version of the model (not the version of SD it is based on, see baseline for that info).
finetune_series
class-attribute
instance-attribute
Information about the fine-tuning of the model. For image, some examples are 'Pony', 'Illustrious", etc.
metadata
class-attribute
instance-attribute
Metadata about the record itself, such as creation and update times.
config
class-attribute
instance-attribute
A dictionary of any configuration files and information on where to download the model file(s).
size_on_disk_bytes
class-attribute
instance-attribute
The model's total on-disk size in bytes, if known.
A declared aggregate; prefer :attr:declared_total_size_bytes, which sums per-file sizes when every
download entry declares one. None when no size metadata is available.
category
property
Return this record's category, or None when record_type is not a known category.
record_type is normally the enum already; a plain-string value (older or third-party records)
is coerced, and an unrecognised string yields None rather than raising.
declared_total_size_bytes
property
Return the model's total on-disk size in bytes, or None when undeclared.
Prefers summing per-file :attr:DownloadRecord.size_bytes when every download entry declares one;
otherwise falls back to the aggregate :attr:size_on_disk_bytes.
primary_download_url
property
Return the URL of the first download entry, or None if there are no downloads.
TextualInversionModelRecord
Bases: GenericModelRecord
A textual inversion (embedding) model entry in the model reference.
Like :class:LoraModelRecord, textual inversions are managed_elsewhere and
are normally supplied by third-party providers.
Source code in src/horde_model_reference/model_reference_records.py
record_type
class-attribute
instance-attribute
Discriminator field identifying this as a textual inversion model record.
model_classification
class-attribute
instance-attribute
model_classification: ModelClassification = Field(
default_factory=lambda: _classification_for(ti)
)
baseline
class-attribute
instance-attribute
The baseline (e.g., stable_diffusion_1) this embedding is intended for.
tags
class-attribute
instance-attribute
Any tags associated with the embedding which may be useful for searching.
trigger
class-attribute
instance-attribute
A list of trigger words or phrases which activate the embedding.
homepage
class-attribute
instance-attribute
A link to the embedding's homepage.
showcases
class-attribute
instance-attribute
Links to any showcases illustrating the embedding's effect.
description
class-attribute
instance-attribute
A short description of the model.
version
class-attribute
instance-attribute
The version of the model (not the version of SD it is based on, see baseline for that info).
finetune_series
class-attribute
instance-attribute
Information about the fine-tuning of the model. For image, some examples are 'Pony', 'Illustrious", etc.
metadata
class-attribute
instance-attribute
Metadata about the record itself, such as creation and update times.
config
class-attribute
instance-attribute
A dictionary of any configuration files and information on where to download the model file(s).
size_on_disk_bytes
class-attribute
instance-attribute
The model's total on-disk size in bytes, if known.
A declared aggregate; prefer :attr:declared_total_size_bytes, which sums per-file sizes when every
download entry declares one. None when no size metadata is available.
category
property
Return this record's category, or None when record_type is not a known category.
record_type is normally the enum already; a plain-string value (older or third-party records)
is coerced, and an unrecognised string yields None rather than raising.
declared_total_size_bytes
property
Return the model's total on-disk size in bytes, or None when undeclared.
Prefers summing per-file :attr:DownloadRecord.size_bytes when every download entry declares one;
otherwise falls back to the aggregate :attr:size_on_disk_bytes.
primary_download_url
property
Return the URL of the first download entry, or None if there are no downloads.
_classification_for
Build the default ModelClassification for category from the registry.
Source code in src/horde_model_reference/model_reference_records.py
get_default_config
Get the default config for model records based on whether AI Horde is being tested or not.
Source code in src/horde_model_reference/model_reference_records.py
register_record_type
register_record_type(
category: MODEL_REFERENCE_CATEGORY | str,
) -> Callable[
[type[GenericModelRecord]], type[GenericModelRecord]
]
Register a model record type with its category.
Source code in src/horde_model_reference/model_reference_records.py
_field_policy_for
_field_policy_for(
category: MODEL_REFERENCE_CATEGORY | str,
field_name: str,
fallback: FieldPolicy,
) -> FieldPolicy
Source code in src/horde_model_reference/model_reference_records.py
_apply_policy
_apply_policy(
*,
category: MODEL_REFERENCE_CATEGORY | str,
field_name: str,
value: str,
fallback_policy: FieldPolicy,
model_name: str,
) -> None
Source code in src/horde_model_reference/model_reference_records.py
get_record_type_for_category
get_record_type_for_category(
category: MODEL_REFERENCE_CATEGORY | str,
) -> type[GenericModelRecord]
Return the registered record type for category, falling back to GenericModelRecord.
Parameters:
-
category(MODEL_REFERENCE_CATEGORY | str) –The model reference category (enum member or plain string).
Returns:
-
type[GenericModelRecord]–The record type class registered for the category, or
GenericModelRecord -
type[GenericModelRecord]–if no specific type has been registered.