horde_sdk.worker.chaining.common_flows¶
Canonical chain flows for the standard worker workloads.
These builders are the single construction point for the flows a worker routes internally. Stage boundaries are
expressed as generation-progress states, so a ChainExecutionContext over one of these flows can be driven
entirely by advance_for_progress.
image_generation_flow ¶
image_generation_flow(
*,
post_processing: bool,
safety_check: bool,
submit: bool = True
) -> ChainFlow
Build the flow for an image generation unit of work.
Parameters:
-
post_processing(bool) –Whether the work includes a post-processing stage.
-
safety_check(bool) –Whether the work includes a safety-check stage.
-
submit(bool, default:True) –Whether the work includes a submit stage. Defaults to True.
Returns:
-
ChainFlow(ChainFlow) –generate -> (post_process) -> (safety_check) -> (submit).
Source code in horde_sdk/worker/chaining/common_flows.py
alchemy_flow ¶
Build the flow for a standalone alchemy (post-processing) unit of work.
Parameters:
-
safety_check(bool, default:False) –Whether the work includes a safety-check stage. Defaults to False.
-
submit(bool, default:True) –Whether the work includes a submit stage. Defaults to True.
Returns:
-
ChainFlow(ChainFlow) –post_process -> (safety_check) -> (submit).
Source code in horde_sdk/worker/chaining/common_flows.py
text_generation_flow ¶
Build the flow for a text generation unit of work.
Parameters:
-
safety_check(bool, default:False) –Whether the work includes a safety-check stage. Defaults to False.
-
submit(bool, default:True) –Whether the work includes a submit stage. Defaults to True.
Returns:
-
ChainFlow(ChainFlow) –generate -> (safety_check) -> (submit).