base
The base classes for all AI Horde API requests/responses.
BaseAIHordeRequest
Bases: HordeRequest
Base class for all AI Horde API requests.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
JobRequestMixin
Bases: HordeAPIData
Mix-in class for data relating to any generation jobs.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
id_
class-attribute
instance-attribute
The UUID for this job. Use this to post the results in the future.
validate_id
Ensure that the job ID is not empty.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
__eq__
JobResponseMixin
Bases: HordeAPIData
Mix-in class for data relating to any generation jobs.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
validate_id
Ensure that the job ID is not empty.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
WorkerRequestMixin
Bases: HordeAPIData
Mix-in class for data relating to worker requests.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
WorkerRequestNameMixin
Bases: HordeAPIData
Mix-in class for data relating to worker requests.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
LorasPayloadEntry
Bases: HordeAPIObjectBaseModel
Represents a single lora parameter.
v2 API Model: ModelPayloadLorasStable
Source code in horde_sdk/ai_horde_api/apimodels/base.py
name
class-attribute
instance-attribute
The name of the LoRa model to use.
model
class-attribute
instance-attribute
The strength of the LoRa against the stable diffusion model.
clip
class-attribute
instance-attribute
The strength of the LoRa against the clip model.
inject_trigger
class-attribute
instance-attribute
Any trigger required to activate the LoRa model.
is_version
class-attribute
instance-attribute
If true, will treat the lora name as a version ID.
TIPayloadEntry
Bases: HordeAPIObjectBaseModel
Represents a single textual inversion (embedding) parameter.
v2 API Model: ModelPayloadTextualInversionsStable
Source code in horde_sdk/ai_horde_api/apimodels/base.py
name
class-attribute
instance-attribute
The name or ID of the textual inversion model to use.
inject_ti
class-attribute
instance-attribute
Whether to automatically insert the TI into the prompt or negprompt.
strength
class-attribute
instance-attribute
The strength to apply the textual inversion model.
validate_inject_ti
Ensure that the inject_ti is either 'prompt' or 'negprompt'.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
validate_strength
Ensure that the strength is non-zero.
strength_only_if_inject_ti
Ensure that the strength is only set if the inject_ti is set.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
ExtraSourceImageEntry
Bases: HordeAPIObjectBaseModel
Represents a single extra source image.
v2 API Model: ExtraSourceImage
Source code in horde_sdk/ai_horde_api/apimodels/base.py
original_url
class-attribute
instance-attribute
The URL of the original image after it was downloaded.
image
class-attribute
instance-attribute
The URL of the image to download, or the base64 string once downloaded.
strength
class-attribute
instance-attribute
The strength to apply to this image on various operations.
ExtraTextEntry
Bases: HordeAPIObjectBaseModel
Represents a single extra text.
v2 API Model: ExtraText
Source code in horde_sdk/ai_horde_api/apimodels/base.py
text
class-attribute
instance-attribute
Extra text required for this generation.
reference
class-attribute
instance-attribute
Reference pointing to how this text is to be used.
SingleWarningEntry
Bases: HordeAPIObjectBaseModel
Represents a single warning.
v2 API Model: RequestSingleWarning
Source code in horde_sdk/ai_horde_api/apimodels/base.py
code
class-attribute
instance-attribute
The code uniquely identifying this warning.
message
class-attribute
instance-attribute
The human-readable description of this warning
code_must_be_known
Ensure that the warning code is in this list of supported warning codes.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
ImageGenerateParamMixin
Bases: HordeAPIObjectBaseModel
Mix-in class of some of the data included in a request to the /v2/generate/async endpoint.
Also is the corresponding information returned on a job pop to the /v2/generate/pop endpoint.
v2 API Model: ModelPayloadRootStable
Source code in horde_sdk/ai_horde_api/apimodels/base.py
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 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 | |
model_config
class-attribute
instance-attribute
model_config = ConfigDict(frozen=True, extra='allow') if not getenv('TESTS_ONGOING') else ConfigDict(frozen=True, extra='forbid')
sampler_name
class-attribute
instance-attribute
The sampler to use for this generation. Defaults to KNOWN_SAMPLERS.k_lms.
cfg_scale
class-attribute
instance-attribute
The cfg_scale to use for this generation. Defaults to 7.5.
denoising_strength
class-attribute
instance-attribute
The denoising strength to use for this generation. Defaults to 1.
seed
class-attribute
instance-attribute
The seed to use for this generation. If not provided, a random seed will be used.
height
class-attribute
instance-attribute
The desired output image height.
width
class-attribute
instance-attribute
The desired output image width.
seed_variation
class-attribute
instance-attribute
Deprecated.
post_processing
class-attribute
instance-attribute
post_processing: list[str | KNOWN_UPSCALERS | KNOWN_FACEFIXERS | KNOWN_MISC_POST_PROCESSORS] = Field(default_factory=list)
A list of post-processing models to use.
post_processing_order
class-attribute
instance-attribute
The order in which to apply post-processing models. Applying upscalers or removing backgrounds before facefixers costs less kudos.
karras
class-attribute
instance-attribute
Set to True if you want to use the Karras scheduling.
tiling
class-attribute
instance-attribute
Set to True if you want to use seamless tiling.
hires_fix
class-attribute
instance-attribute
Set to True if you want to use the hires fix.
hires_fix_denoising_strength
class-attribute
instance-attribute
The strength of the denoising for the hires fix second pass.
clip_skip
class-attribute
instance-attribute
The number of clip layers to skip.
control_type
class-attribute
instance-attribute
The type of control net type to use.
image_is_control
class-attribute
instance-attribute
Set to True if the image is a control image.
return_control_map
class-attribute
instance-attribute
Set to True if you want the ControlNet map returned instead of a generated image.
facefixer_strength
class-attribute
instance-attribute
The strength of the facefixer model.
loras
class-attribute
instance-attribute
A list of lora parameters to use.
tis
class-attribute
instance-attribute
A list of textual inversion (embedding) parameters to use.
extra_texts
class-attribute
instance-attribute
A list of extra texts and prompts to use in the comfyUI workflow.
workflow
class-attribute
instance-attribute
The specific comfyUI workflow to use.
transparent
class-attribute
instance-attribute
When true, will generate an image with a transparent background
special
class-attribute
instance-attribute
Reserved for future use.
use_nsfw_censor
class-attribute
instance-attribute
If the request is SFW, and the worker accidentally generates NSFW, it will send back a censored image.
width_divisible_by_64
Ensure that the width is divisible by 64.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
sampler_name_must_be_known
Ensure that the sampler name is in this list of supported samplers.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
random_seed_if_none
If the seed is None, generate a random seed.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
post_processors_must_be_known
post_processors_must_be_known(v: list[str | KNOWN_UPSCALERS | KNOWN_FACEFIXERS | KNOWN_MISC_POST_PROCESSORS]) -> list[str | KNOWN_UPSCALERS | KNOWN_FACEFIXERS | KNOWN_MISC_POST_PROCESSORS]
Ensure that the post processors are in this list of supported post processors.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
control_type_must_be_known
Ensure that the control type is in this list of supported control types.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
JobSubmitResponse
Bases: HordeResponseBaseModel
The response to a job submission request, indicating the number of kudos gained.
v2 API Model: GenerationSubmitted
Source code in horde_sdk/ai_horde_api/apimodels/base.py
GenMetadataEntry
Bases: HordeAPIObjectBaseModel
Represents a single generation metadata entry.
v2 API Model: GenerationMetadataStable
Source code in horde_sdk/ai_horde_api/apimodels/base.py
type_
class-attribute
instance-attribute
The relevance of the metadata field.
value
class-attribute
instance-attribute
The value of the metadata field.
ref
class-attribute
instance-attribute
Optionally a reference for the metadata (e.g. a lora ID)
validate_type
Ensure that the type is in this list of supported types.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
validate_value
Ensure that the value is in this list of supported values.