horde_sdk.generation_parameters.image.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=KNOWN_IMAGE_SAMPLERS.k_lms,
scheduler=KNOWN_IMAGE_SCHEDULERS.normal,
clip_skip=1,
denoising_strength=0.75,
)
)
ControlnetFeatureFlags ¶
Bases: GenerationParameterBaseModel
Represents required or supported ControlNet render features.
Source code in horde_sdk/generation_parameters/image/object_models.py
model_config
class-attribute
instance-attribute
¶
controlnets
class-attribute
instance-attribute
¶
controlnets: list[KNOWN_IMAGE_CONTROLNETS | str] = Field(
examples=[
[KNOWN_IMAGE_CONTROLNETS.canny],
[
KNOWN_IMAGE_CONTROLNETS.canny,
KNOWN_IMAGE_CONTROLNETS.depth,
],
]
)
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.
ImageGenerationFeatureFlags ¶
Bases: GenerationFeatureFlags
Represents portable image render features that are required or supported.
A generation uses this model to describe requirements. A worker advertises the same fields as
supported values inside ImageWorkerFeatureFlags. Compatibility is directional: every requested
value must appear in the worker's advertised set, while a false, empty, or absent request field
adds no requirement.
Source code in horde_sdk/generation_parameters/image/object_models.py
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 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | |
baselines
class-attribute
instance-attribute
¶
baselines: list[KNOWN_IMAGE_GENERATION_BASELINE | str] = (
Field(
examples=[
[KNOWN_IMAGE_GENERATION_BASELINE.infer],
[
KNOWN_IMAGE_GENERATION_BASELINE.infer,
KNOWN_IMAGE_GENERATION_BASELINE.stable_diffusion_1,
],
]
)
)
The baselines required by a generation or supported by a worker.
If infer, the worker will attempt to infer the model type from the model name.
clip_skip
class-attribute
instance-attribute
¶
Whether clip skipping is required or supported.
hires_fix
class-attribute
instance-attribute
¶
Whether hires fix is required or supported.
tiling
class-attribute
instance-attribute
¶
Whether seamless tiling is required or supported.
schedulers
class-attribute
instance-attribute
¶
schedulers: list[KNOWN_IMAGE_SCHEDULERS | str] = Field(
examples=[
[KNOWN_IMAGE_SCHEDULERS.normal],
[
KNOWN_IMAGE_SCHEDULERS.normal,
KNOWN_IMAGE_SCHEDULERS.simple,
],
]
)
The schedulers required or supported.
samplers
class-attribute
instance-attribute
¶
samplers: list[KNOWN_IMAGE_SAMPLERS | str] = Field(
examples=[
[KNOWN_IMAGE_SAMPLERS.k_euler],
[
KNOWN_IMAGE_SAMPLERS.k_lms,
KNOWN_IMAGE_SAMPLERS.k_euler,
],
]
)
The samplers required or supported.
sampler_solver_knobs
class-attribute
instance-attribute
¶
The per-request sampler solver knobs required or supported.
flow_shift
class-attribute
instance-attribute
¶
Whether a model-specific flow shift is required or supported.
transparent
class-attribute
instance-attribute
¶
Whether transparent image generation is required or supported.
controlnets_feature_flags
class-attribute
instance-attribute
¶
controlnets_feature_flags: ControlnetFeatureFlags | None = (
Field(
default=None,
examples=[
ControlnetFeatureFlags(
controlnets=[KNOWN_IMAGE_CONTROLNETS.canny],
image_is_control=False,
return_control_map=False,
),
ControlnetFeatureFlags(
controlnets=[
KNOWN_IMAGE_CONTROLNETS.canny,
KNOWN_IMAGE_CONTROLNETS.depth,
],
image_is_control=True,
return_control_map=True,
),
],
)
)
The ControlNet features required or supported.
post_processing
class-attribute
instance-attribute
¶
post_processing: list[KNOWN_ALCHEMY_TYPES | str] | None = (
Field(
default=None,
examples=[
[KNOWN_ALCHEMY_TYPES.RealESRGAN_x4plus],
[
KNOWN_ALCHEMY_TYPES.RealESRGAN_x4plus,
KNOWN_ALCHEMY_TYPES.GFPGAN,
],
],
)
)
The exact post-processing operations required or supported.
source_processing
class-attribute
instance-attribute
¶
source_processing: list[
KNOWN_IMAGE_SOURCE_PROCESSING | str
] = Field(
examples=[
[KNOWN_IMAGE_SOURCE_PROCESSING.txt2img],
[
KNOWN_IMAGE_SOURCE_PROCESSING.txt2img,
KNOWN_IMAGE_SOURCE_PROCESSING.img2img,
],
[
KNOWN_IMAGE_SOURCE_PROCESSING.txt2img,
KNOWN_IMAGE_SOURCE_PROCESSING.img2img,
KNOWN_IMAGE_SOURCE_PROCESSING.inpainting,
],
]
)
The source-processing methods required or supported.
workflows
class-attribute
instance-attribute
¶
workflows: list[KNOWN_IMAGE_WORKFLOWS | str] | None = Field(
default=None, examples=[[KNOWN_IMAGE_WORKFLOWS.qr_code]]
)
The workflows required or supported.
tis
class-attribute
instance-attribute
¶
tis: list[KNOWN_AUX_MODEL_SOURCE | str] | None = Field(
default=None,
examples=[
[KNOWN_AUX_MODEL_SOURCE.HORDELING],
[KNOWN_AUX_MODEL_SOURCE.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=[
[KNOWN_AUX_MODEL_SOURCE.CIVITAI],
[KNOWN_AUX_MODEL_SOURCE.LOCAL],
],
)
If loras are supported, the sources of the loras supported.
ensure_baseline_non_empty
classmethod
¶
ensure_baseline_non_empty(
v: list[KNOWN_IMAGE_GENERATION_BASELINE | str],
) -> list[KNOWN_IMAGE_GENERATION_BASELINE | str]
Ensure that the baselines are not empty.
Source code in horde_sdk/generation_parameters/image/object_models.py
BasicImageGenerationParametersTemplate ¶
Bases: GenerationWithModelParameters
Represents the common parameters for an image generation.
Source code in horde_sdk/generation_parameters/image/object_models.py
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 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 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 | |
prompt
class-attribute
instance-attribute
¶
The prompt to use for the generation.
negative_prompt
class-attribute
instance-attribute
¶
The negative prompt to use for the generation, if any.
Dispatch converters are responsible for splitting any combined prompt encoding
(such as AI-Horde's ### separator) before constructing these parameters.
seed
class-attribute
instance-attribute
¶
The seed 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
¶
sampler_name: KNOWN_IMAGE_SAMPLERS | str | None = Field(
default=None, examples=[KNOWN_IMAGE_SAMPLERS.k_lms]
)
The sampler to use for the generation.
scheduler
class-attribute
instance-attribute
¶
scheduler: KNOWN_IMAGE_SCHEDULERS | str | None = Field(
default=None, examples=[KNOWN_IMAGE_SCHEDULERS.normal]
)
The scheduler to use for the generation.
sampler_eta
class-attribute
instance-attribute
¶
The stochastic strength of the solver. Unset leaves the solver's own default in place.
Which solvers accept this, and over what range, is stated in
SAMPLER_CONSTRAINTS.
sampler_s_noise
class-attribute
instance-attribute
¶
The multiplier on the noise the solver adds per step. Unset leaves the solver's own default.
sampler_s_churn
class-attribute
instance-attribute
¶
The extra noise injected across the run, spread over the steps inside the churn window.
sampler_s_tmin
class-attribute
instance-attribute
¶
The lower sigma bound of the churn window. Only meaningful alongside sampler_s_churn.
sampler_s_tmax
class-attribute
instance-attribute
¶
The upper sigma bound of the churn window. Only meaningful alongside sampler_s_churn.
sampler_solver_type
class-attribute
instance-attribute
¶
sampler_solver_type: (
KNOWN_SAMPLER_SOLVER_TYPES | str | None
) = Field(
default=None,
examples=[KNOWN_SAMPLER_SOLVER_TYPES.midpoint],
)
Which correction the solver applies. The accepted vocabulary differs per sampler.
sampler_order
class-attribute
instance-attribute
¶
The order of the solver. The accepted range is per-sampler and narrower than this bound.
flow_shift
class-attribute
instance-attribute
¶
The timestep shift applied to a flow-matching model. Unset leaves the model's own default.
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.
transparent
class-attribute
instance-attribute
¶
If true, the generation will be generated with a transparent background (layer diffusion).
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
¶
clip_skip_representation: (
CLIP_SKIP_REPRESENTATION | None
) = Field(default=CLIP_SKIP_REPRESENTATION.NEGATIVE_OFFSET)
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.
Image2ImageGenerationParameters ¶
Bases: GenerationParameterBaseModel
Represents the parameters for an image-to-image generation.
Source code in horde_sdk/generation_parameters/image/object_models.py
RemixImageEntry ¶
Bases: GenerationParameterBaseModel
Represents a special image entry for a generation.
Source code in horde_sdk/generation_parameters/image/object_models.py
RemixGenerationParameters ¶
Bases: GenerationParameterBaseModel
Represents the parameters for a stable cascade remix generation.
Source code in horde_sdk/generation_parameters/image/object_models.py
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.
control_strength
class-attribute
instance-attribute
¶
The strength of the controlnet guidance. Unset leaves the backend's own default of 1.0.
HiresFixGenerationParameters ¶
Bases: GenerationParameterBaseModel
Represents the parameters for a high-resolution fix generation.
Source code in horde_sdk/generation_parameters/image/object_models.py
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.
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
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.
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.
ExtraTextEntry ¶
Bases: GenerationParameterBaseModel
Represents a single extra text input consumed by a custom workflow.
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.
extra_texts
class-attribute
instance-attribute
¶
Extra text inputs consumed by the workflow (for example, the text encoded by a QR code workflow).
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
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 561 562 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 | |
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.
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
ImageGenerationParametersTemplate ¶
Bases: CompositeParametersBase
Represents the parameters for an image generation.
Source code in horde_sdk/generation_parameters/image/object_models.py
663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 | |
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.
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
ImageGenerationParameters ¶
Bases: ImageGenerationParametersTemplate
Represents the common bare-minimum parameters for an image generation.
Source code in horde_sdk/generation_parameters/image/object_models.py
result_ids
instance-attribute
¶
The IDs to assign to the resulting images.
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
verify_id_count ¶
Ensure that at least one generation ID is provided.
Source code in horde_sdk/generation_parameters/image/object_models.py
sampler_solver_knobs_from_values ¶
sampler_solver_knobs_from_values(
*,
sampler_eta: float | None,
sampler_s_noise: float | None,
sampler_s_churn: float | None,
sampler_s_tmin: float | None,
sampler_s_tmax: float | None,
sampler_solver_type: (
KNOWN_SAMPLER_SOLVER_TYPES | str | None
),
sampler_order: int | None
) -> list[SAMPLER_SOLVER_KNOB]
Return the solver-knob capabilities required by concrete parameter values.
Parameters:
-
sampler_eta(float | None) –Requested stochastic strength.
-
sampler_s_noise(float | None) –Requested noise multiplier.
-
sampler_s_churn(float | None) –Requested churn strength.
-
sampler_s_tmin(float | None) –Requested lower churn bound.
-
sampler_s_tmax(float | None) –Requested upper churn bound.
-
sampler_solver_type(KNOWN_SAMPLER_SOLVER_TYPES | str | None) –Requested second-order correction.
-
sampler_order(int | None) –Requested solver order.
Returns:
-
list[SAMPLER_SOLVER_KNOB]–The canonical knob identifiers for every explicitly supplied value.
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 the canonical feature requirements used by image parameters.
Parameters:
-
parameters(ImageGenerationParametersTemplate) –Backend-agnostic image parameters to inspect.
Returns:
-
ImageGenerationFeatureFlags–The exact portable render features required to execute the parameters.
Source code in horde_sdk/generation_parameters/image/object_models.py
860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 | |
union_image_generation_feature_flags ¶
union_image_generation_feature_flags(
feature_sets: Sequence[ImageGenerationFeatureFlags],
) -> ImageGenerationFeatureFlags
Return the axis-wise union of canonical image feature sets.
This operation combines each field independently. It does not preserve correlations between fields; callers must not treat a heterogeneous union as proof that one worker can execute every combination. Resource limits, model residency, queue state, and operator policy also remain separate constraints.
Parameters:
-
feature_sets(Sequence[ImageGenerationFeatureFlags]) –Canonical feature sets to combine.
Returns:
-
ImageGenerationFeatureFlags–One canonical feature set containing every advertised feature.
Raises:
-
ValueError–If no feature sets are supplied.
Source code in horde_sdk/generation_parameters/image/object_models.py
intersect_image_generation_feature_flags ¶
intersect_image_generation_feature_flags(
feature_sets: Sequence[ImageGenerationFeatureFlags],
) -> ImageGenerationFeatureFlags
Return the intersection of canonical image feature sets.
Parameters:
-
feature_sets(Sequence[ImageGenerationFeatureFlags]) –Canonical feature sets to intersect.
Returns:
-
ImageGenerationFeatureFlags–One canonical feature set containing only features every input advertises.
Raises:
-
ValueError–If no feature sets are supplied or they share no generation baseline.