feature_flags
RESULT_RETURN_METHOD
Bases: StrEnum
The method of returning results from a worker.
Source code in horde_sdk/worker/feature_flags.py
base64_post_back
class-attribute
instance-attribute
Base64 post back in the 'job completed' message.
base64_post_back_with_url
class-attribute
instance-attribute
Base64 post back to a given URL without results in the 'job completed' message.
byte_stream
class-attribute
instance-attribute
Byte stream to a given URL without results in the 'job completed' message.
WorkerFeatureFlags
Bases: ABC, BaseModel
Feature flags for a worker.
Source code in horde_sdk/worker/feature_flags.py
model_config
class-attribute
instance-attribute
supported_result_return_methods
class-attribute
instance-attribute
The methods of returning results supported by the worker.
supports_threads
class-attribute
instance-attribute
Whether the worker supports threading.
is_capable_of_features
Check if the worker is capable of handling the requested features.
Parameters:
-
features(GenerationFeatureFlags) –The features to check.
Returns:
-
bool(bool) –True if the worker is capable of handling the requested features, False otherwise.
Source code in horde_sdk/worker/feature_flags.py
get_not_capable_reason_type
abstractmethod
Return the type of the reason for not being capable of handling the requested features.
Returns:
-
type[ReasonTypeVar]–type[ReasonTypeVar]: The (python) type of the reason for not being capable of handling the requested
-
type[ReasonTypeVar]–features.
Source code in horde_sdk/worker/feature_flags.py
reasons_not_capable_of_features
abstractmethod
Return a list of reasons why the worker is not capable of handling the requested features.
Parameters:
-
features(GenerationFeatureFlags) –The features to check.
Returns:
-
list[ReasonTypeVar] | None–list[str] | None: A list of reasons why the worker is not capable of handling the requested features,
-
list[ReasonTypeVar] | None–or None if the worker is capable.
Source code in horde_sdk/worker/feature_flags.py
PerBaselineFeatureFlags
Bases: BaseModel
Feature flags for a worker per baseline.
Source code in horde_sdk/worker/feature_flags.py
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 193 | |
model_config
class-attribute
instance-attribute
schedulers_map
class-attribute
instance-attribute
schedulers_map: (
dict[
KNOWN_IMAGE_GENERATION_BASELINE | str,
list[KNOWN_IMAGE_SCHEDULERS | str],
]
| None
) = Field(
default=None,
examples=[
{
stable_diffusion_1: [
simple,
normal,
exponential,
],
stable_diffusion_xl: [simple],
}
],
)
If set, the supported schedulers for each baseline. If unset, it is assumed that all baselines support all schedulers.
samplers_map
class-attribute
instance-attribute
samplers_map: (
dict[
KNOWN_IMAGE_GENERATION_BASELINE | str,
list[KNOWN_IMAGE_SAMPLERS | str],
]
| None
) = Field(
default=None,
examples=[
{
stable_diffusion_1: [k_lms, k_dpm_2, k_euler],
stable_diffusion_xl: [k_lms],
}
],
)
If set, the supported samplers for each baseline. If unset, it is assumed that all baselines support all samplers.
tiling_map
class-attribute
instance-attribute
tiling_map: (
dict[KNOWN_IMAGE_GENERATION_BASELINE | str, bool] | None
) = Field(
default=None,
examples=[
{
stable_diffusion_1: True,
stable_diffusion_xl: False,
}
],
)
If set, the supported tiling for each baseline. If unset, it is assumed that all baselines support tiling.
hires_fix_map
class-attribute
instance-attribute
hires_fix_map: (
dict[KNOWN_IMAGE_GENERATION_BASELINE | str, bool] | None
) = Field(
default=None,
examples=[
{
stable_diffusion_1: True,
stable_diffusion_xl: True,
flux_1: False,
}
],
)
If set, the supported hires fix for each baseline. If unset, it is assumed that all baselines support hires fix.
controlnet_map
class-attribute
instance-attribute
controlnet_map: (
dict[KNOWN_IMAGE_GENERATION_BASELINE | str, bool] | None
) = Field(
default=None,
examples=[
{
stable_diffusion_1: True,
stable_diffusion_xl: False,
}
],
)
If set, support for controlnet for each baseline. If unset, it is assumed that all baselines support controlnets.
tis_map
class-attribute
instance-attribute
tis_map: (
dict[KNOWN_IMAGE_GENERATION_BASELINE | str, bool] | None
) = Field(
default=None,
examples=[
{
stable_diffusion_1: True,
stable_diffusion_xl: False,
}
],
)
If set, support for TIs for each baseline. If unset, it is assumed that all baselines support TIs.
loras_map
class-attribute
instance-attribute
loras_map: (
dict[KNOWN_IMAGE_GENERATION_BASELINE | str, bool] | None
) = Field(
default=None,
examples=[
{
stable_diffusion_1: True,
stable_diffusion_xl: False,
}
],
)
If set, support for Loras for each baseline. If unset, it is assumed that all baselines support Loras.
IMAGE_WORKER_NOT_CAPABLE_REASON
Bases: StrEnum
Reasons why a worker is not capable of handling a request.
Source code in horde_sdk/worker/feature_flags.py
clip_skip
class-attribute
instance-attribute
The worker does not support clip skip.
samplers
class-attribute
instance-attribute
The worker does not support the requested samplers.
schedulers
class-attribute
instance-attribute
The worker does not support the requested schedulers.
hires_fix
class-attribute
instance-attribute
The worker does not support hires fix.
controlnets
class-attribute
instance-attribute
The worker does not support controlnets.
extra_texts
class-attribute
instance-attribute
The worker does not support extra texts.
extra_source_images
class-attribute
instance-attribute
The worker does not support extra source images.
ImageWorkerFeatureFlags
Bases: WorkerFeatureFlags[IMAGE_WORKER_NOT_CAPABLE_REASON]
Feature flags for an image worker.
Source code in horde_sdk/worker/feature_flags.py
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 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 | |
image_generation_feature_flags
instance-attribute
The image generation feature flags for the worker.
per_baseline_feature_flags
class-attribute
instance-attribute
The per baseline feature flags for the worker. This includes the supported schedulers and samplers for each baseline.
backend_clip_skip_representation
class-attribute
instance-attribute
The clip skip representation supported.
model_config
class-attribute
instance-attribute
supported_result_return_methods
class-attribute
instance-attribute
The methods of returning results supported by the worker.
supports_threads
class-attribute
instance-attribute
Whether the worker supports threading.
get_not_capable_reason_type
reasons_not_capable_of_features
reasons_not_capable_of_features(
request: GenerationFeatureFlags,
) -> list[IMAGE_WORKER_NOT_CAPABLE_REASON] | None
Return a list of reasons why a worker is not capable of handling a request.
Source code in horde_sdk/worker/feature_flags.py
worker_supports_requested_samplers
Return True if the worker supports the samplers requested.
Source code in horde_sdk/worker/feature_flags.py
worker_supports_requested_schedulers
Return True if the worker supports the schedulers requested.
Source code in horde_sdk/worker/feature_flags.py
worker_supports_requested_tiling
Return True if the worker supports tiling.
Source code in horde_sdk/worker/feature_flags.py
worker_supports_requested_hires_fix
Return True if the worker supports hires fix.
Source code in horde_sdk/worker/feature_flags.py
worker_supports_requested_controlnets
Return True if the worker supports controlnets.
Source code in horde_sdk/worker/feature_flags.py
worker_supports_requested_tis
Return True if the worker supports TIs.
Source code in horde_sdk/worker/feature_flags.py
worker_supports_requested_loras
Return True if the worker supports Loras.
Source code in horde_sdk/worker/feature_flags.py
is_capable_of_features
Check if the worker is capable of handling the requested features.
Parameters:
-
features(GenerationFeatureFlags) –The features to check.
Returns:
-
bool(bool) –True if the worker is capable of handling the requested features, False otherwise.
Source code in horde_sdk/worker/feature_flags.py
ALCHEMY_WORKER_NOT_CAPABLE_REASON
Bases: StrEnum
Reasons why a worker is not capable of handling an alchemy request.
Source code in horde_sdk/worker/feature_flags.py
unsupported_upscaler
class-attribute
instance-attribute
The worker does not support a requested upscaler.
unsupported_facefixer
class-attribute
instance-attribute
The worker does not support a requested facefixer.
unsupported_interrogator
class-attribute
instance-attribute
The worker does not support a requested interrogator.
unsupported_caption_model
class-attribute
instance-attribute
The worker does not support a requested caption model.
unsupported_nsfw_detector
class-attribute
instance-attribute
The worker does not support a requested NSFW detector.
AlchemyWorkerFeatureFlags
Bases: WorkerFeatureFlags[ALCHEMY_WORKER_NOT_CAPABLE_REASON]
Feature flags for an alchemy worker.
Source code in horde_sdk/worker/feature_flags.py
model_config
class-attribute
instance-attribute
supported_result_return_methods
class-attribute
instance-attribute
The methods of returning results supported by the worker.
supports_threads
class-attribute
instance-attribute
Whether the worker supports threading.
get_not_capable_reason_type
reasons_not_capable_of_features
reasons_not_capable_of_features(
request: GenerationFeatureFlags,
) -> list[ALCHEMY_WORKER_NOT_CAPABLE_REASON] | None
Return a list of reasons why a worker is not capable of handling an alchemy request.
Source code in horde_sdk/worker/feature_flags.py
is_capable_of_features
Check if the worker is capable of handling the requested features.
Parameters:
-
features(GenerationFeatureFlags) –The features to check.
Returns:
-
bool(bool) –True if the worker is capable of handling the requested features, False otherwise.