object_models
DEFAULT_BASELINE_RESOLUTION
module-attribute
The default assumed (single side) trained resolution for image generation models if unspecified.
HIRES_FIX_DENOISE_STRENGTH_DEFAULT
module-attribute
The default second-pass denoise strength for hires-fix generations.
default_basic_image_generation_parameters
module-attribute
default_basic_image_generation_parameters = (
BasicImageGenerationParameters(
prompt="EXAMPLE_PROMPT",
model="EXAMPLE_MODEL",
model_baseline="infer",
seed="1",
height=DEFAULT_BASELINE_RESOLUTION,
width=DEFAULT_BASELINE_RESOLUTION,
steps=20,
cfg_scale=7.0,
sampler_name=k_lms,
scheduler=normal,
clip_skip=1,
denoising_strength=0.75,
)
)
ControlnetFeatureFlags
Bases: GenerationParameterBaseModel
Feature flags for controlnet.
Source code in horde_sdk/generation_parameters/image/object_models.py
model_config
class-attribute
instance-attribute
controlnets
class-attribute
instance-attribute
The controlnets supported by the worker.
image_is_control
class-attribute
instance-attribute
Whether there is support for passing a pre-parsed control image.
return_control_map
class-attribute
instance-attribute
Whether there is support returning the control map.
SCHEMA_VERSION
class-attribute
Most recent schema version for this payload.
LEGACY_SCHEMA_VERSION
class-attribute
Oldest schema version supported for deserialization when unspecified.
schema_version
class-attribute
instance-attribute
schema_version: str = Field(
default="",
description="Schema version recorded when the payload was serialized.",
)
underlying_generation_scheme
class-attribute
instance-attribute
The underlying method the generation uses to produce results.
- If associated with a auxiliary process that is model based, such as a LoRa, this should be set to
MODEL. - If instead a service is used to produce results, this should be set to
MODEL_FROM_SERVICE. - If there is no generative model involved, and instead a "traditional" algorithm is used, this should be set to
NON_MODEL_ALGORITHM.
Otherwise, if this component is simply a set of parameters that, in itself, does not produce results, this
should be set to None.
current_schema_version
classmethod
legacy_schema_version
classmethod
Return the version assumed for pre-metadata payloads.
ImageGenerationFeatureFlags
Bases: GenerationFeatureFlags
Feature flags for an image worker.
Source code in horde_sdk/generation_parameters/image/object_models.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 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 | |
baselines
class-attribute
instance-attribute
baselines: list[KNOWN_IMAGE_GENERATION_BASELINE | str] = (
Field(examples=[[infer], [infer, stable_diffusion_1]])
)
The baselines supported for standard image generation.
If infer, the worker will attempt to infer the model type from the model name.
clip_skip
class-attribute
instance-attribute
Whether there is support for clip skipping.
hires_fix
class-attribute
instance-attribute
Whether there is support for hires fix.
tiling
class-attribute
instance-attribute
Whether there is support for seamless tiling.
schedulers
class-attribute
instance-attribute
The schedulers supported.
samplers
class-attribute
instance-attribute
The samplers supported.
controlnets_feature_flags
class-attribute
instance-attribute
controlnets_feature_flags: ControlnetFeatureFlags | None = (
Field(
default=None,
examples=[
ControlnetFeatureFlags(
controlnets=[canny],
image_is_control=False,
return_control_map=False,
),
ControlnetFeatureFlags(
controlnets=[canny, depth],
image_is_control=True,
return_control_map=True,
),
],
)
)
The controlnet feature flags for the worker.
post_processing
class-attribute
instance-attribute
post_processing: list[KNOWN_ALCHEMY_TYPES | str] | None = (
Field(
default=None,
examples=[
[RealESRGAN_x4plus],
[RealESRGAN_x4plus, GFPGAN],
],
)
)
The post processing methods.
source_processing
class-attribute
instance-attribute
source_processing: list[
KNOWN_IMAGE_SOURCE_PROCESSING | str
] = Field(
examples=[
[txt2img],
[txt2img, img2img],
[txt2img, img2img, inpainting],
]
)
The source processing methods.
workflows
class-attribute
instance-attribute
The workflows supported.
tis
class-attribute
instance-attribute
tis: list[KNOWN_AUX_MODEL_SOURCE | str] | None = Field(
default=None, examples=[[HORDELING], [LOCAL]]
)
If textual inversions are supported, the sources of the textual inversions supported.
loras
class-attribute
instance-attribute
loras: list[KNOWN_AUX_MODEL_SOURCE | str] | None = Field(
default=None, examples=[[CIVITAI], [LOCAL]]
)
If loras are supported, the sources of the loras supported.
model_config
class-attribute
instance-attribute
extra_texts
class-attribute
instance-attribute
Whether there is support for extra texts.
extra_source_images
class-attribute
instance-attribute
Whether there is support for extra source images.
BasicImageGenerationParametersTemplate
Bases: GenerationWithModelParameters
Represents the common parameters for an image generation.
Source code in horde_sdk/generation_parameters/image/object_models.py
prompt
class-attribute
instance-attribute
The prompt to use for the generation.
height
class-attribute
instance-attribute
The height to use for the generation.
width
class-attribute
instance-attribute
The width to use for the generation.
steps
class-attribute
instance-attribute
The number of steps to use for the generation.
cfg_scale
class-attribute
instance-attribute
The scale to use for the generation.
sampler_name
class-attribute
instance-attribute
The sampler to use for the generation.
scheduler
class-attribute
instance-attribute
The scheduler to use for the generation.
clip_skip
class-attribute
instance-attribute
The offset of layer numbers to skip. Be sure to check clip_skip_representation for the representation.
clip_skip_representation
class-attribute
instance-attribute
The representation of the clip skip. See CLIP_SKIP_REPRESENTATION for more information.
Typically front-ends use positive values, while comfyui used the same value but negative.
denoising_strength
class-attribute
instance-attribute
The denoising strength to use for the generation.
tiling
class-attribute
instance-attribute
If true, the generation will be generated with seamless tiling.
SCHEMA_VERSION
class-attribute
Most recent schema version for this payload.
LEGACY_SCHEMA_VERSION
class-attribute
Oldest schema version supported for deserialization when unspecified.
schema_version
class-attribute
instance-attribute
schema_version: str = Field(
default="",
description="Schema version recorded when the payload was serialized.",
)
model_config
class-attribute
instance-attribute
underlying_generation_scheme
class-attribute
instance-attribute
See :attr:ComposedParameterSetBase.underlying_generation_scheme for more information.
current_schema_version
classmethod
legacy_schema_version
classmethod
Return the version assumed for pre-metadata payloads.
BasicImageGenerationParameters
Bases: BasicImageGenerationParametersTemplate
Represents the common bare minimum parameters for an image generation.
Source code in horde_sdk/generation_parameters/image/object_models.py
model_config
class-attribute
instance-attribute
height
class-attribute
instance-attribute
height: int | None = Field(
default=DEFAULT_BASELINE_RESOLUTION,
multiple_of=64,
ge=64,
examples=[512, 768],
)
The height to use for the generation.
width
class-attribute
instance-attribute
width: int | None = Field(
default=DEFAULT_BASELINE_RESOLUTION,
multiple_of=64,
ge=64,
examples=[512, 768],
)
The width to use for the generation.
clip_skip_representation
class-attribute
instance-attribute
The representation of the clip skip. See CLIP_SKIP_REPRESENTATION for more information.
Typically front-ends use positive values, while comfyui used the same value but negative.
SCHEMA_VERSION
class-attribute
Most recent schema version for this payload.
LEGACY_SCHEMA_VERSION
class-attribute
Oldest schema version supported for deserialization when unspecified.
schema_version
class-attribute
instance-attribute
schema_version: str = Field(
default="",
description="Schema version recorded when the payload was serialized.",
)
underlying_generation_scheme
class-attribute
instance-attribute
See :attr:ComposedParameterSetBase.underlying_generation_scheme for more information.
steps
class-attribute
instance-attribute
The number of steps to use for the generation.
cfg_scale
class-attribute
instance-attribute
The scale to use for the generation.
sampler_name
class-attribute
instance-attribute
The sampler to use for the generation.
scheduler
class-attribute
instance-attribute
The scheduler to use for the generation.
clip_skip
class-attribute
instance-attribute
The offset of layer numbers to skip. Be sure to check clip_skip_representation for the representation.
denoising_strength
class-attribute
instance-attribute
The denoising strength to use for the generation.
tiling
class-attribute
instance-attribute
If true, the generation will be generated with seamless tiling.
current_schema_version
classmethod
legacy_schema_version
classmethod
Return the version assumed for pre-metadata payloads.
Image2ImageGenerationParameters
Bases: GenerationParameterBaseModel
Represents the parameters for an image-to-image generation.
Source code in horde_sdk/generation_parameters/image/object_models.py
source_image
instance-attribute
The source image to use for the generation.
source_mask
instance-attribute
The source mask to use for the generation.
SCHEMA_VERSION
class-attribute
Most recent schema version for this payload.
LEGACY_SCHEMA_VERSION
class-attribute
Oldest schema version supported for deserialization when unspecified.
schema_version
class-attribute
instance-attribute
schema_version: str = Field(
default="",
description="Schema version recorded when the payload was serialized.",
)
model_config
class-attribute
instance-attribute
underlying_generation_scheme
class-attribute
instance-attribute
The underlying method the generation uses to produce results.
- If associated with a auxiliary process that is model based, such as a LoRa, this should be set to
MODEL. - If instead a service is used to produce results, this should be set to
MODEL_FROM_SERVICE. - If there is no generative model involved, and instead a "traditional" algorithm is used, this should be set to
NON_MODEL_ALGORITHM.
Otherwise, if this component is simply a set of parameters that, in itself, does not produce results, this
should be set to None.
current_schema_version
classmethod
legacy_schema_version
classmethod
Return the version assumed for pre-metadata payloads.
RemixImageEntry
Bases: GenerationParameterBaseModel
Represents a special image entry for a generation.
Source code in horde_sdk/generation_parameters/image/object_models.py
strength
class-attribute
instance-attribute
The weight to apply this image to the remix generation.
SCHEMA_VERSION
class-attribute
Most recent schema version for this payload.
LEGACY_SCHEMA_VERSION
class-attribute
Oldest schema version supported for deserialization when unspecified.
schema_version
class-attribute
instance-attribute
schema_version: str = Field(
default="",
description="Schema version recorded when the payload was serialized.",
)
model_config
class-attribute
instance-attribute
underlying_generation_scheme
class-attribute
instance-attribute
The underlying method the generation uses to produce results.
- If associated with a auxiliary process that is model based, such as a LoRa, this should be set to
MODEL. - If instead a service is used to produce results, this should be set to
MODEL_FROM_SERVICE. - If there is no generative model involved, and instead a "traditional" algorithm is used, this should be set to
NON_MODEL_ALGORITHM.
Otherwise, if this component is simply a set of parameters that, in itself, does not produce results, this
should be set to None.
current_schema_version
classmethod
legacy_schema_version
classmethod
Return the version assumed for pre-metadata payloads.
RemixGenerationParameters
Bases: GenerationParameterBaseModel
Represents the parameters for a stable cascade remix generation.
Source code in horde_sdk/generation_parameters/image/object_models.py
source_image
instance-attribute
The source image to use for the generation.
remix_images
instance-attribute
The images to remix the source image with.
SCHEMA_VERSION
class-attribute
Most recent schema version for this payload.
LEGACY_SCHEMA_VERSION
class-attribute
Oldest schema version supported for deserialization when unspecified.
schema_version
class-attribute
instance-attribute
schema_version: str = Field(
default="",
description="Schema version recorded when the payload was serialized.",
)
model_config
class-attribute
instance-attribute
underlying_generation_scheme
class-attribute
instance-attribute
The underlying method the generation uses to produce results.
- If associated with a auxiliary process that is model based, such as a LoRa, this should be set to
MODEL. - If instead a service is used to produce results, this should be set to
MODEL_FROM_SERVICE. - If there is no generative model involved, and instead a "traditional" algorithm is used, this should be set to
NON_MODEL_ALGORITHM.
Otherwise, if this component is simply a set of parameters that, in itself, does not produce results, this
should be set to None.
current_schema_version
classmethod
legacy_schema_version
classmethod
Return the version assumed for pre-metadata payloads.
ControlnetGenerationParameters
Bases: GenerationParameterBaseModel
Represents the parameters for a controlnet generation.
Source code in horde_sdk/generation_parameters/image/object_models.py
controlnet_type
instance-attribute
The type of controlnet to use for the generation.
source_image
instance-attribute
The source image to use for the generation, if img2img.
control_map
instance-attribute
The control map to use for the generation, if img2img.
return_control_map
class-attribute
instance-attribute
If true, return the control map created by the controlnet pre-processor.
SCHEMA_VERSION
class-attribute
Most recent schema version for this payload.
LEGACY_SCHEMA_VERSION
class-attribute
Oldest schema version supported for deserialization when unspecified.
schema_version
class-attribute
instance-attribute
schema_version: str = Field(
default="",
description="Schema version recorded when the payload was serialized.",
)
model_config
class-attribute
instance-attribute
underlying_generation_scheme
class-attribute
instance-attribute
The underlying method the generation uses to produce results.
- If associated with a auxiliary process that is model based, such as a LoRa, this should be set to
MODEL. - If instead a service is used to produce results, this should be set to
MODEL_FROM_SERVICE. - If there is no generative model involved, and instead a "traditional" algorithm is used, this should be set to
NON_MODEL_ALGORITHM.
Otherwise, if this component is simply a set of parameters that, in itself, does not produce results, this
should be set to None.
current_schema_version
classmethod
legacy_schema_version
classmethod
Return the version assumed for pre-metadata payloads.
HiresFixGenerationParameters
Bases: GenerationParameterBaseModel
Represents the parameters for a high-resolution fix generation.
Source code in horde_sdk/generation_parameters/image/object_models.py
SCHEMA_VERSION
class-attribute
Most recent schema version for this payload.
LEGACY_SCHEMA_VERSION
class-attribute
Oldest schema version supported for deserialization when unspecified.
schema_version
class-attribute
instance-attribute
schema_version: str = Field(
default="",
description="Schema version recorded when the payload was serialized.",
)
model_config
class-attribute
instance-attribute
underlying_generation_scheme
class-attribute
instance-attribute
The underlying method the generation uses to produce results.
- If associated with a auxiliary process that is model based, such as a LoRa, this should be set to
MODEL. - If instead a service is used to produce results, this should be set to
MODEL_FROM_SERVICE. - If there is no generative model involved, and instead a "traditional" algorithm is used, this should be set to
NON_MODEL_ALGORITHM.
Otherwise, if this component is simply a set of parameters that, in itself, does not produce results, this
should be set to None.
current_schema_version
classmethod
legacy_schema_version
classmethod
Return the version assumed for pre-metadata payloads.
AuxModelEntry
Bases: GenerationParameterBaseModel
Represents a single entry of an aux model, (LoRas, TIs, etc).
Source code in horde_sdk/generation_parameters/image/object_models.py
name
instance-attribute
The name of the aux model. If this is a hosted aux model, the name to search for. See remote_version_id if
targeting a specific version of a hosted aux model.
release_version
class-attribute
instance-attribute
The version of the aux model. This is v1, v2, etc. If this is a hosted aux model, you should instead use
remote_version_id and reference the platform-specific file identifier.
remote_version_id
instance-attribute
If this aux model is sourced from a website/API, the version ID specific to that website/API to identify the specific version of the aux model. This is not v1, v2, but a numeric ID that the service assigns and is typically in the URL of the download link.
source
instance-attribute
The source of the aux model. This can be a known source or a custom source.
remote_url
class-attribute
instance-attribute
The remote URL to download the aux model from.
local_filename
class-attribute
instance-attribute
The local filename to load the aux model from.
file_hash
class-attribute
instance-attribute
The hash of the aux model file.
model_strength
class-attribute
instance-attribute
The strength of the aux model on the generation model. 1 is the default strength.
SCHEMA_VERSION
class-attribute
Most recent schema version for this payload.
LEGACY_SCHEMA_VERSION
class-attribute
Oldest schema version supported for deserialization when unspecified.
schema_version
class-attribute
instance-attribute
schema_version: str = Field(
default="",
description="Schema version recorded when the payload was serialized.",
)
model_config
class-attribute
instance-attribute
underlying_generation_scheme
class-attribute
instance-attribute
The underlying method the generation uses to produce results.
- If associated with a auxiliary process that is model based, such as a LoRa, this should be set to
MODEL. - If instead a service is used to produce results, this should be set to
MODEL_FROM_SERVICE. - If there is no generative model involved, and instead a "traditional" algorithm is used, this should be set to
NON_MODEL_ALGORITHM.
Otherwise, if this component is simply a set of parameters that, in itself, does not produce results, this
should be set to None.
verify_identifier_set
Ensure that at least one of name, version, or remote_version_id is provided.
Source code in horde_sdk/generation_parameters/image/object_models.py
current_schema_version
classmethod
legacy_schema_version
classmethod
Return the version assumed for pre-metadata payloads.
LoRaEntry
Bases: AuxModelEntry
Represents a single entry of a LoRa.
Source code in horde_sdk/generation_parameters/image/object_models.py
clip_strength
class-attribute
instance-attribute
The strength of the LoRa on the clip model. 1 is the default strength.
lora_triggers
class-attribute
instance-attribute
The triggers to use for the LoRa. Specify the behavior with lora_inject_trigger_choice.
lora_inject_trigger_choice
class-attribute
instance-attribute
If true and if supported by the backend, inject a trigger term into the prompt.
SCHEMA_VERSION
class-attribute
Most recent schema version for this payload.
LEGACY_SCHEMA_VERSION
class-attribute
Oldest schema version supported for deserialization when unspecified.
schema_version
class-attribute
instance-attribute
schema_version: str = Field(
default="",
description="Schema version recorded when the payload was serialized.",
)
model_config
class-attribute
instance-attribute
underlying_generation_scheme
class-attribute
instance-attribute
The underlying method the generation uses to produce results.
- If associated with a auxiliary process that is model based, such as a LoRa, this should be set to
MODEL. - If instead a service is used to produce results, this should be set to
MODEL_FROM_SERVICE. - If there is no generative model involved, and instead a "traditional" algorithm is used, this should be set to
NON_MODEL_ALGORITHM.
Otherwise, if this component is simply a set of parameters that, in itself, does not produce results, this
should be set to None.
name
instance-attribute
The name of the aux model. If this is a hosted aux model, the name to search for. See remote_version_id if
targeting a specific version of a hosted aux model.
release_version
class-attribute
instance-attribute
The version of the aux model. This is v1, v2, etc. If this is a hosted aux model, you should instead use
remote_version_id and reference the platform-specific file identifier.
remote_version_id
instance-attribute
If this aux model is sourced from a website/API, the version ID specific to that website/API to identify the specific version of the aux model. This is not v1, v2, but a numeric ID that the service assigns and is typically in the URL of the download link.
source
instance-attribute
The source of the aux model. This can be a known source or a custom source.
remote_url
class-attribute
instance-attribute
The remote URL to download the aux model from.
local_filename
class-attribute
instance-attribute
The local filename to load the aux model from.
file_hash
class-attribute
instance-attribute
The hash of the aux model file.
model_strength
class-attribute
instance-attribute
The strength of the aux model on the generation model. 1 is the default strength.
current_schema_version
classmethod
legacy_schema_version
classmethod
Return the version assumed for pre-metadata payloads.
verify_identifier_set
Ensure that at least one of name, version, or remote_version_id is provided.
Source code in horde_sdk/generation_parameters/image/object_models.py
TIEntry
Bases: AuxModelEntry
Represents a single entry of a Textual Inversion.
Source code in horde_sdk/generation_parameters/image/object_models.py
ti_inject_trigger_choice
class-attribute
instance-attribute
If true and if supported by the backend, inject a trigger term into the prompt.
SCHEMA_VERSION
class-attribute
Most recent schema version for this payload.
LEGACY_SCHEMA_VERSION
class-attribute
Oldest schema version supported for deserialization when unspecified.
schema_version
class-attribute
instance-attribute
schema_version: str = Field(
default="",
description="Schema version recorded when the payload was serialized.",
)
model_config
class-attribute
instance-attribute
underlying_generation_scheme
class-attribute
instance-attribute
The underlying method the generation uses to produce results.
- If associated with a auxiliary process that is model based, such as a LoRa, this should be set to
MODEL. - If instead a service is used to produce results, this should be set to
MODEL_FROM_SERVICE. - If there is no generative model involved, and instead a "traditional" algorithm is used, this should be set to
NON_MODEL_ALGORITHM.
Otherwise, if this component is simply a set of parameters that, in itself, does not produce results, this
should be set to None.
name
instance-attribute
The name of the aux model. If this is a hosted aux model, the name to search for. See remote_version_id if
targeting a specific version of a hosted aux model.
release_version
class-attribute
instance-attribute
The version of the aux model. This is v1, v2, etc. If this is a hosted aux model, you should instead use
remote_version_id and reference the platform-specific file identifier.
remote_version_id
instance-attribute
If this aux model is sourced from a website/API, the version ID specific to that website/API to identify the specific version of the aux model. This is not v1, v2, but a numeric ID that the service assigns and is typically in the URL of the download link.
source
instance-attribute
The source of the aux model. This can be a known source or a custom source.
remote_url
class-attribute
instance-attribute
The remote URL to download the aux model from.
local_filename
class-attribute
instance-attribute
The local filename to load the aux model from.
file_hash
class-attribute
instance-attribute
The hash of the aux model file.
model_strength
class-attribute
instance-attribute
The strength of the aux model on the generation model. 1 is the default strength.
current_schema_version
classmethod
legacy_schema_version
classmethod
Return the version assumed for pre-metadata payloads.
verify_identifier_set
Ensure that at least one of name, version, or remote_version_id is provided.
Source code in horde_sdk/generation_parameters/image/object_models.py
CustomWorkflowGenerationParameters
Bases: GenerationParameterBaseModel
Represents the parameters for a custom workflow generation.
Source code in horde_sdk/generation_parameters/image/object_models.py
custom_workflow_name
instance-attribute
The name of the custom workflow to use for the generation.
custom_workflow_version
class-attribute
instance-attribute
The version of the custom workflow to use for the generation. If None, the latest version will be used. Defaults to None.
custom_parameters
class-attribute
instance-attribute
The custom parameters to use for the generation. Defaults to None.
SCHEMA_VERSION
class-attribute
Most recent schema version for this payload.
LEGACY_SCHEMA_VERSION
class-attribute
Oldest schema version supported for deserialization when unspecified.
schema_version
class-attribute
instance-attribute
schema_version: str = Field(
default="",
description="Schema version recorded when the payload was serialized.",
)
model_config
class-attribute
instance-attribute
underlying_generation_scheme
class-attribute
instance-attribute
The underlying method the generation uses to produce results.
- If associated with a auxiliary process that is model based, such as a LoRa, this should be set to
MODEL. - If instead a service is used to produce results, this should be set to
MODEL_FROM_SERVICE. - If there is no generative model involved, and instead a "traditional" algorithm is used, this should be set to
NON_MODEL_ALGORITHM.
Otherwise, if this component is simply a set of parameters that, in itself, does not produce results, this
should be set to None.
current_schema_version
classmethod
legacy_schema_version
classmethod
Return the version assumed for pre-metadata payloads.
ImageGenerationComponentContainer
Bases: GenerationParameterBaseModel
Container for optional image generation components.
This container holds auxiliary components for image generation such as LoRa entries, Textual Inversion entries, ControlNet parameters, and more. It uses a simple list that naturally supports multiple instances of the same component type.
Source code in horde_sdk/generation_parameters/image/object_models.py
428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 | |
model_config
class-attribute
instance-attribute
components
class-attribute
instance-attribute
components: list[
Image2ImageGenerationParameters
| RemixGenerationParameters
| ControlnetGenerationParameters
| HiresFixGenerationParameters
| LoRaEntry
| TIEntry
| CustomWorkflowGenerationParameters
] = Field(default_factory=list)
The list of generation components.
image2image_params
property
Get the image-to-image parameters if they exist.
remix_params
property
Get the remix parameters if they exist.
controlnet_params
property
Get the controlnet parameters if they exist.
hires_fix_params
property
Get the hires fix parameters if they exist.
custom_workflow_entries
property
Get all custom workflow entries.
lora_params
property
Get all LoRa entries.
Deprecated: Use lora_entries instead. This property returns a plain list instead of LoRaEntries wrapper.
ti_params
property
Get all Textual Inversion entries.
Deprecated: Use ti_entries instead. This property returns a plain list instead of TIEntries wrapper.
custom_workflows_params
property
Get all custom workflow entries.
Deprecated: Use custom_workflow_entries instead. This property returns a plain list instead of CustomWorkflows wrapper.
SCHEMA_VERSION
class-attribute
Most recent schema version for this payload.
LEGACY_SCHEMA_VERSION
class-attribute
Oldest schema version supported for deserialization when unspecified.
schema_version
class-attribute
instance-attribute
schema_version: str = Field(
default="",
description="Schema version recorded when the payload was serialized.",
)
underlying_generation_scheme
class-attribute
instance-attribute
The underlying method the generation uses to produce results.
- If associated with a auxiliary process that is model based, such as a LoRa, this should be set to
MODEL. - If instead a service is used to produce results, this should be set to
MODEL_FROM_SERVICE. - If there is no generative model involved, and instead a "traditional" algorithm is used, this should be set to
NON_MODEL_ALGORITHM.
Otherwise, if this component is simply a set of parameters that, in itself, does not produce results, this
should be set to None.
add
add(
component: (
Image2ImageGenerationParameters
| RemixGenerationParameters
| ControlnetGenerationParameters
| HiresFixGenerationParameters
| LoRaEntry
| TIEntry
| CustomWorkflowGenerationParameters
),
) -> None
Add a component to the container.
Parameters:
-
component(Image2ImageGenerationParameters | RemixGenerationParameters | ControlnetGenerationParameters | HiresFixGenerationParameters | LoRaEntry | TIEntry | CustomWorkflowGenerationParameters) –The component to add.
Source code in horde_sdk/generation_parameters/image/object_models.py
add_all
add_all(
components: list[
Image2ImageGenerationParameters
| RemixGenerationParameters
| ControlnetGenerationParameters
| HiresFixGenerationParameters
| LoRaEntry
| TIEntry
| CustomWorkflowGenerationParameters
],
) -> None
Add multiple components to the container.
Parameters:
-
components(list[Image2ImageGenerationParameters | RemixGenerationParameters | ControlnetGenerationParameters | HiresFixGenerationParameters | LoRaEntry | TIEntry | CustomWorkflowGenerationParameters]) –The list of components to add.
Source code in horde_sdk/generation_parameters/image/object_models.py
current_schema_version
classmethod
legacy_schema_version
classmethod
Return the version assumed for pre-metadata payloads.
ImageGenerationParametersTemplate
Bases: CompositeParametersBase
Represents the parameters for an image generation.
Source code in horde_sdk/generation_parameters/image/object_models.py
563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 | |
batch_size
class-attribute
instance-attribute
The number of images to generated batched (simultaneously). This is the n_iter parameter in ComfyUI
source_processing
class-attribute
instance-attribute
txt2img, img2img, etc. See KNOWN_IMAGE_SOURCE_PROCESSING for more information.
base_params
class-attribute
instance-attribute
The base parameters for the generation.
additional_params
class-attribute
instance-attribute
Additional parameters for the generation. This can include parameters for img2img, remix, controlnet, hires fix, and custom workflows.
alchemy_params
class-attribute
instance-attribute
If alchemy is also requested, the parameters specific to those operations.
SCHEMA_VERSION
class-attribute
Most recent schema version for this payload.
LEGACY_SCHEMA_VERSION
class-attribute
Oldest schema version supported for deserialization when unspecified.
schema_version
class-attribute
instance-attribute
schema_version: str = Field(
default="",
description="Schema version recorded when the payload was serialized.",
)
model_config
class-attribute
instance-attribute
model_config = ConfigDict(
use_attribute_docstrings=True,
from_attributes=True,
arbitrary_types_allowed=True,
)
underlying_generation_scheme
class-attribute
instance-attribute
The underlying method the generation uses to produce results.
Note that this refers only to the top-level generation itself. Component parameters may contain their own
underlying generation schemes. For example, for stable diffusion image generation, this would always be
MODEL even if some of the contained components use another scheme such as MODEL_FROM_SERVICE or
NON_MODEL_ALGORITHM.
- If the top-level generation is model-based, this should be set to
MODEL. - If the top-level generation uses an outside service to produce results, this should be set
to
MODEL_FROM_SERVICE. - If the top-level generation does not use a generative model and instead uses a "traditional" algorithm, this
should be set to
NON_MODEL_ALGORITHM.
verify_source_processing
Ensure that the appropriate parameters are set based on the source processing type.
Source code in horde_sdk/generation_parameters/image/object_models.py
get_number_expected_results
Return the number of expected results for this parameter set.
Returns:
-
int(int) –The number of expected results.
Source code in horde_sdk/generation_parameters/image/object_models.py
to_parameters
to_parameters(
*,
base_param_updates: (
BasicImageGenerationParametersTemplate | None
) = None,
additional_param_updates: (
ImageGenerationComponentContainer | None
) = None,
result_ids: Sequence[ID_TYPES] | None = None,
allocator: ResultIdAllocator | None = None,
seed: str = "image"
) -> ImageGenerationParameters
Convert this template into concrete image generation parameters.
Source code in horde_sdk/generation_parameters/image/object_models.py
current_schema_version
classmethod
legacy_schema_version
classmethod
Return the version assumed for pre-metadata payloads.
ImageGenerationParameters
Bases: ImageGenerationParametersTemplate
Represents the common bare-minimum parameters for an image generation.
Source code in horde_sdk/generation_parameters/image/object_models.py
base_params
instance-attribute
The base parameters for the generation.
additional_params
class-attribute
instance-attribute
additional_params: ImageGenerationComponentContainer = (
Field(default_factory=ImageGenerationComponentContainer)
)
Additional parameters for the generation. This can include parameters for img2img, remix, controlnet, hires fix, and custom workflows.
batch_size
class-attribute
instance-attribute
The number of images to generated batched (simultaneously, not concurrently).
This is the n_iter parameter in ComfyUI
SCHEMA_VERSION
class-attribute
Most recent schema version for this payload.
LEGACY_SCHEMA_VERSION
class-attribute
Oldest schema version supported for deserialization when unspecified.
schema_version
class-attribute
instance-attribute
schema_version: str = Field(
default="",
description="Schema version recorded when the payload was serialized.",
)
model_config
class-attribute
instance-attribute
model_config = ConfigDict(
use_attribute_docstrings=True,
from_attributes=True,
arbitrary_types_allowed=True,
)
underlying_generation_scheme
class-attribute
instance-attribute
The underlying method the generation uses to produce results.
Note that this refers only to the top-level generation itself. Component parameters may contain their own
underlying generation schemes. For example, for stable diffusion image generation, this would always be
MODEL even if some of the contained components use another scheme such as MODEL_FROM_SERVICE or
NON_MODEL_ALGORITHM.
- If the top-level generation is model-based, this should be set to
MODEL. - If the top-level generation uses an outside service to produce results, this should be set
to
MODEL_FROM_SERVICE. - If the top-level generation does not use a generative model and instead uses a "traditional" algorithm, this
should be set to
NON_MODEL_ALGORITHM.
source_processing
class-attribute
instance-attribute
txt2img, img2img, etc. See KNOWN_IMAGE_SOURCE_PROCESSING for more information.
alchemy_params
class-attribute
instance-attribute
If alchemy is also requested, the parameters specific to those operations.
verify_id_count
Ensure that at least one generation ID is provided.
Source code in horde_sdk/generation_parameters/image/object_models.py
current_schema_version
classmethod
legacy_schema_version
classmethod
Return the version assumed for pre-metadata payloads.
get_number_expected_results
Return the number of expected results for this parameter set.
Returns:
-
int(int) –The number of expected results.
Source code in horde_sdk/generation_parameters/image/object_models.py
verify_source_processing
Ensure that the appropriate parameters are set based on the source processing type.
Source code in horde_sdk/generation_parameters/image/object_models.py
to_parameters
to_parameters(
*,
base_param_updates: (
BasicImageGenerationParametersTemplate | None
) = None,
additional_param_updates: (
ImageGenerationComponentContainer | None
) = None,
result_ids: Sequence[ID_TYPES] | None = None,
allocator: ResultIdAllocator | None = None,
seed: str = "image"
) -> ImageGenerationParameters
Convert this template into concrete image generation parameters.
Source code in horde_sdk/generation_parameters/image/object_models.py
image_parameters_to_feature_flags
image_parameters_to_feature_flags(
parameters: ImageGenerationParametersTemplate,
) -> ImageGenerationFeatureFlags
Create a feature flag object representing the features used in the parameters.