legacy_models
Pydantic models encapsulating the legacy-to-new reference normalization rules.
_ALLOWED_CONFIG_FILENAMES
module-attribute
_BASELINE_NORMALIZATION_MAP
module-attribute
_BASELINE_NORMALIZATION_MAP = {
"stable diffusion 1": "stable_diffusion_1",
"stable diffusion 2": "stable_diffusion_2_768",
"stable diffusion 2 512": "stable_diffusion_2_512",
"stable_diffusion_xl": "stable_diffusion_xl",
"stable_cascade": "stable_cascade",
}
LegacyRecordUnion
module-attribute
LegacyRecordUnion = (
LegacyStableDiffusionRecord
| LegacyTextGenerationRecord
| LegacyBlipRecord
| LegacyClipRecord
| LegacyCodeformerRecord
| LegacyControlnetRecord
| LegacyEsrganRecord
| LegacyGfpganRecord
| LegacyGenericRecord
| LegacySafetyCheckerRecord
| LegacyMiscellaneousRecord
)
LegacyConfigFile
Bases: BaseModel
A single legacy config file entry.
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
_ensure_sha256sum_for_model_files
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
LegacyConfigDownload
Bases: BaseModel
A single legacy config download entry.
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
_validate_download_fields
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
LegacyConfig
Bases: BaseModel
Typed representation of the legacy config payload.
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
files
class-attribute
instance-attribute
download
class-attribute
instance-attribute
_coerce_config_dict
classmethod
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
_normalize_entries
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
is_empty
Return True when no download entries survive normalization.
Note: files are always cleared during normalization (new format doesn't use them).
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
LegacyGenericRecord
Bases: BaseModel
Base legacy record representation with shared validation rules.
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
config
class-attribute
instance-attribute
features_not_supported
class-attribute
instance-attribute
_validate_common_rules
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
LegacyStableDiffusionRecord
Bases: LegacyGenericRecord
Stable Diffusion legacy record with category-specific validation.
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | |
requirements
class-attribute
instance-attribute
requirements: (
dict[
str,
int
| float
| str
| list[int]
| list[float]
| list[str]
| bool,
]
| None
) = None
config
class-attribute
instance-attribute
features_not_supported
class-attribute
instance-attribute
_validate_stable_diffusion_rules
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
sort_model_fields
Sort fields for consistent JSON output.
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
_validate_common_rules
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
LegacyTextGenerationRecord
Bases: LegacyGenericRecord
Text generation legacy record with category-specific validation.
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
settings
class-attribute
instance-attribute
settings: (
dict[
str,
int
| float
| str
| list[int]
| list[float]
| list[str]
| bool,
]
| None
) = None
config
class-attribute
instance-attribute
features_not_supported
class-attribute
instance-attribute
_validate_text_generation_rules
Validate text generation specific rules.
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
_validate_common_rules
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
LegacyBlipRecord
Bases: LegacyGenericRecord
BLIP legacy record with category-specific normalization.
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
config
class-attribute
instance-attribute
features_not_supported
class-attribute
instance-attribute
_validate_common_rules
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
LegacyClipRecord
Bases: LegacyGenericRecord
CLIP legacy record with category-specific normalization.
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
config
class-attribute
instance-attribute
features_not_supported
class-attribute
instance-attribute
_validate_common_rules
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
LegacyCodeformerRecord
Bases: LegacyGenericRecord
Codeformers legacy record with category-specific normalization.
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
config
class-attribute
instance-attribute
features_not_supported
class-attribute
instance-attribute
_validate_common_rules
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
LegacyEsrganRecord
Bases: LegacyGenericRecord
ESRGAN legacy record with category-specific normalization.
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
config
class-attribute
instance-attribute
features_not_supported
class-attribute
instance-attribute
_validate_common_rules
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
LegacyGfpganRecord
Bases: LegacyGenericRecord
GFPGAN legacy record with category-specific normalization.
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
config
class-attribute
instance-attribute
features_not_supported
class-attribute
instance-attribute
_validate_common_rules
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
LegacySafetyCheckerRecord
Bases: LegacyGenericRecord
Safety Checker legacy record with category-specific normalization.
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
config
class-attribute
instance-attribute
features_not_supported
class-attribute
instance-attribute
_validate_common_rules
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
LegacyMiscellaneousRecord
Bases: LegacyGenericRecord
Miscellaneous legacy record with category-specific normalization.
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
config
class-attribute
instance-attribute
features_not_supported
class-attribute
instance-attribute
_validate_common_rules
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
LegacyControlnetRecord
Bases: LegacyGenericRecord
ControlNet legacy record with category-specific normalization.
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
type
instance-attribute
type: Literal[
"control_canny",
"control_depth",
"control_hed",
"control_mlsd",
"control_normal",
"control_openpose",
"control_fakescribbles",
"control_scribble",
"control_seg",
"control_qr",
"control_qr_xl",
]
config
class-attribute
instance-attribute
features_not_supported
class-attribute
instance-attribute
_validate_common_rules
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
_record_issue
Append a validation issue message to the shared conversion context.
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
_increment_host_counter
Source code in src/horde_model_reference/legacy/classes/legacy_models.py
get_legacy_model_type
Get the appropriate Pydantic model class for a given category.