# Annotated review companion for justinchuby/onnx-genai-stable-diffusion-bk-sdm-small. # Model form: Stable Diffusion image generation. # Canonical authority: inference_metadata.yaml at revision 2d30ae2ebfacf5c071693836d70ebd14d8fd84d3. # Comments explain authored semantics, derived structure, and fail-closed omissions. # After YAML parsing this file is mechanically equal to the canonical metadata; comments do not create a second contract. # Backend implementation, recorded execution, and performance evidence remain separate from this portable metadata. # Schema spelling `v1` normalizes under the current reader; versioning gates unknown fields before typed parsing. No component authors batch_capacity, so independent requests must execute per item at every component. schema_version: v1 # The pipeline contains executable package semantics. Deployment/QoS policy and backend-derived execution plans live outside this portable contract. pipeline: # This typed SSA workflow is the authoritative execution contract for the package. workflow: # Manifest vocabulary declares interpreter/adapter ABI requirements. It is not ORT/native readiness or performance evidence. manifest: # Current v1 capability strings mirror typed workflow structure; the structure remains the semantic source of truth. capabilities: - workflow_ssa - linear_effects - nested_control_flow - loop_induction_values - typed_emit # Workflow inputs are the complete typed boundary. Roles and sources are authored; absent required values must fail before execution. inputs: # Input `request.max_iterations` is optional; omission uses semantic default 10, provided by the request through a typed runtime role, and carries runtime role max_iterations@1.0. Unsupported required roles must fail closed. request.max_iterations: # Authored tensor ABI: dtype int64, rank 1, shape [1]. No grouping permission is implied by this shape. contract: dtype: int64 rank: 1 shape: - 1 # Role identifies runtime semantics without relying on a model-family name. role: kind: runtime version: '1.0' role: max_iterations # Source states who must provide this value; the runtime must not invent application data. source: kind: request # Required values fail closed when absent; optional values may use only their authored default/presence rule. required: false # This is a semantic tensor default used only when the optional input is omitted. default: 10 # Input `package.false` is optional; omission uses semantic default False, a package-authored literal/default, and carries opaque. Unsupported required roles must fail closed. package.false: # Authored tensor ABI: dtype bool, rank 1, shape [component.unet.batch]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. contract: dtype: bool rank: 1 shape: - component.unet.batch # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Role identifies runtime semantics without relying on a model-family name. role: kind: opaque # Source states who must provide this value; the runtime must not invent application data. source: kind: literal # Required values fail closed when absent; optional values may use only their authored default/presence rule. required: false # This is a semantic tensor default used only when the optional input is omitted. default: false # Input `request.seed` is optional; omission uses semantic default 0, provided by the request through a typed runtime role, and carries runtime role seed@1.0. Unsupported required roles must fail closed. request.seed: # Authored tensor ABI: dtype int64, rank 1, shape [component.unet.batch]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. contract: dtype: int64 rank: 1 shape: - component.unet.batch # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Role identifies runtime semantics without relying on a model-family name. role: kind: runtime version: '1.0' role: seed # Source states who must provide this value; the runtime must not invent application data. source: kind: request # Required values fail closed when absent; optional values may use only their authored default/presence rule. required: false # This is a semantic tensor default used only when the optional input is omitted. default: 0 # The caller may supply this exact tensor instead of asking the workflow to derive it. externally_suppliable: true # Input `package.rng_offset` is optional; omission uses semantic default 0, a package-authored literal/default, and carries opaque. Unsupported required roles must fail closed. package.rng_offset: # Authored tensor ABI: dtype int64, rank 1, shape [component.unet.batch]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. contract: dtype: int64 rank: 1 shape: - component.unet.batch # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Role identifies runtime semantics without relying on a model-family name. role: kind: opaque # Source states who must provide this value; the runtime must not invent application data. source: kind: literal # Required values fail closed when absent; optional values may use only their authored default/presence rule. required: false # This is a semantic tensor default used only when the optional input is omitted. default: 0 # Input `request.input_ids` is required, provided by the request through a typed runtime role, and carries runtime role prompt_tokens@1.0. Unsupported required roles must fail closed. request.input_ids: # Authored tensor ABI: dtype int64, rank 2, shape [component.text_encoder.batch, component.text_encoder.sequence_len]. No grouping permission is implied by this shape. contract: dtype: int64 rank: 2 shape: - component.text_encoder.batch - component.text_encoder.sequence_len # Role identifies runtime semantics without relying on a model-family name. role: kind: runtime version: '1.0' role: prompt_tokens # Source states who must provide this value; the runtime must not invent application data. source: kind: request # Required values fail closed when absent; optional values may use only their authored default/presence rule. required: true # The caller may supply this exact tensor instead of asking the workflow to derive it. externally_suppliable: true # Input `request.negative_input_ids` is required, provided by the request through a typed runtime role, and carries runtime role negative_prompt_tokens@1.0. Unsupported required roles must fail closed. request.negative_input_ids: # Authored tensor ABI: dtype int64, rank 2, shape [component.text_encoder.batch, component.text_encoder.sequence_len]. No grouping permission is implied by this shape. contract: dtype: int64 rank: 2 shape: - component.text_encoder.batch - component.text_encoder.sequence_len # Role identifies runtime semantics without relying on a model-family name. role: kind: runtime version: '1.0' role: negative_prompt_tokens # Source states who must provide this value; the runtime must not invent application data. source: kind: request # Required values fail closed when absent; optional values may use only their authored default/presence rule. required: true # The caller may supply this exact tensor instead of asking the workflow to derive it. externally_suppliable: true # Input `request.guidance_scale` is optional; omission uses semantic default 7.5, provided by the request through a typed runtime role, and carries runtime role guidance_scale@1.0. Unsupported required roles must fail closed. request.guidance_scale: # Authored tensor ABI: dtype float32, rank 1, shape [component.unet.batch]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. contract: dtype: float32 rank: 1 shape: - component.unet.batch # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Role identifies runtime semantics without relying on a model-family name. role: kind: runtime version: '1.0' role: guidance_scale # Source states who must provide this value; the runtime must not invent application data. source: kind: request # Required values fail closed when absent; optional values may use only their authored default/presence rule. required: false # This is a semantic tensor default used only when the optional input is omitted. default: 7.5 # Input `package.loop_0_active` is optional; omission uses semantic default True, a package-authored literal/default, and carries opaque. Unsupported required roles must fail closed. package.loop_0_active: # Authored tensor ABI: dtype bool, rank 1, shape [1]. No grouping permission is implied by this shape. contract: dtype: bool rank: 1 shape: - 1 # Role identifies runtime semantics without relying on a model-family name. role: kind: opaque # Source states who must provide this value; the runtime must not invent application data. source: kind: literal # Required values fail closed when absent; optional values may use only their authored default/presence rule. required: false # This is a semantic tensor default used only when the optional input is omitted. default: true # Workflow outputs are the complete public result boundary and retain explicit tensor contracts. outputs: # Output `image` publishes the authored image result at the pre_adapter stage; it is not backend-readiness evidence. image: # Authored tensor ABI: dtype float32, rank 4, shape [component.vae_decoder.batch, 3, component.vae_decoder.image_height, component.vae_decoder.image_width]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. contract: dtype: float32 rank: 4 shape: - component.vae_decoder.batch - 3 - component.vae_decoder.image_height - component.vae_decoder.image_width # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 role: image # The numeric range is part of the output interpretation contract. value_range: negative_one_to_one # Stage records whether adapters/postprocessing have run before this value is exposed. stage: pre_adapter # Output `latent` publishes the authored tensor result at the pre_adapter stage; it is not backend-readiness evidence. latent: # Authored tensor ABI: dtype float32, rank 4, shape [component.unet.batch, 4, component.unet.height, component.unet.width]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. contract: dtype: float32 rank: 4 shape: - component.unet.batch - 4 - component.unet.height - component.unet.width # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 role: tensor # Stage records whether adapters/postprocessing have run before this value is exposed. stage: pre_adapter # Output `noise_estimate` publishes the authored tensor result at the pre_adapter stage; it is not backend-readiness evidence. noise_estimate: # Authored tensor ABI: dtype float32, rank 4, shape [component.unet.batch, 4, component.unet.height, noise_estimate_width]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. contract: dtype: float32 rank: 4 shape: - component.unet.batch - 4 - component.unet.height - noise_estimate_width # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 role: tensor # Stage records whether adapters/postprocessing have run before this value is exposed. stage: pre_adapter # Output `latent_trajectory` publishes the authored tensor result at the pre_adapter stage; it is not backend-readiness evidence. latent_trajectory: # Authored tensor ABI: dtype float32, rank 4, shape [component.unet.batch, 4, component.unet.height, trajectory_width]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. contract: dtype: float32 rank: 4 shape: - component.unet.batch - 4 - component.unet.height - trajectory_width # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 role: tensor # Stage records whether adapters/postprocessing have run before this value is exposed. stage: pre_adapter # Output `rng_offset` publishes the authored tensor result at the pre_adapter stage; it is not backend-readiness evidence. rng_offset: # Authored tensor ABI: dtype int64, rank 1, shape [component.unet.batch]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. contract: dtype: int64 rank: 1 shape: - component.unet.batch # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 role: tensor # Stage records whether adapters/postprocessing have run before this value is exposed. stage: pre_adapter # Components are the executable artifacts and semantic policy programs. Their presence does not prove ORT/native readiness or performance. components: # Component `text_encoder` is an encoder compute graph using onnx from `text_encoder/model.onnx`. No batch_capacity is authored, so the runtime must not group independent requests at this component. text_encoder: # Selects a packaged implementation/artifact only; provider/backend readiness requires separate recorded evidence. implementation: kind: onnx artifact: text_encoder/model.onnx # Ports bind workflow names to the artifact's exact graph ABI; model-family inference is forbidden. ports: # Semantic port roles identify tokens, logits, positions, masks, caches, or media without architecture-name conditionals. roles: input_ids: token_ids last_hidden_state: hidden_states # Component `unet` is a denoising compute graph using onnx from `unet/model.onnx`. No batch_capacity is authored, so the runtime must not group independent requests at this component. unet: # Selects a packaged implementation/artifact only; provider/backend readiness requires separate recorded evidence. implementation: kind: onnx artifact: unet/model.onnx # Ports bind workflow names to the artifact's exact graph ABI; model-family inference is forbidden. ports: # Semantic port roles identify tokens, logits, positions, masks, caches, or media without architecture-name conditionals. roles: encoder_hidden_states: encoder_hidden_states # Component `vae_decoder` is a primary model compute graph using onnx from `vae_decoder/model.onnx`. No batch_capacity is authored, so the runtime must not group independent requests at this component. vae_decoder: # Selects a packaged implementation/artifact only; provider/backend readiness requires separate recorded evidence. implementation: kind: onnx artifact: vae_decoder/model.onnx # Component `solver_step` is an executable semantic policy component implementing `onnx-genai.solver-step` using onnx from `policies/solver_step.onnx`. Policy graphs compute tensors and semantics; they are not deployment/QoS knobs or backend readiness claims. No batch_capacity is authored, so the runtime must not group independent requests at this component. solver_step: # Selects a packaged implementation/artifact only; provider/backend readiness requires separate recorded evidence. implementation: kind: onnx artifact: policies/solver_step.onnx # Ports bind workflow names to the artifact's exact graph ABI; model-family inference is forbidden. ports: # Exact graph inputs; each tensor shape/dtype is authored. inputs: # Port `sample`: Authored tensor ABI: dtype float32, rank 4, shape [batch, channels, height, width]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. sample: dtype: float32 rank: 4 shape: - batch - channels - height - width # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Port `derivative`: Authored tensor ABI: dtype float32, rank 4, shape [batch, channels, height, width]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. derivative: dtype: float32 rank: 4 shape: - batch - channels - height - width # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Port `step`: Authored tensor ABI: dtype int64, rank 1, shape [batch]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. step: dtype: int64 rank: 1 shape: - batch # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Port `schedule`: Authored tensor ABI: dtype float32, rank 1, shape [schedule_length]. No grouping permission is implied by this shape. schedule: dtype: float32 rank: 1 shape: - schedule_length # Exact graph outputs; each tensor shape/dtype is authored. outputs: # Port `next_state`: Authored tensor ABI: dtype float32, rank 4, shape [batch, channels, height, width]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. next_state: dtype: float32 rank: 4 shape: - batch - channels - height - width # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Semantic component ABI `onnx-genai.solver-step`; its bindings/parameters affect output correctness. contract: id: onnx-genai.solver-step version: '1' bindings: state: sample estimate: derivative step: step schedule: schedule next_state: next_state # Component `continue_predicate` is an authored workflow compute component using onnx from `policies/continue_predicate.onnx`. No batch_capacity is authored, so the runtime must not group independent requests at this component. continue_predicate: # Selects a packaged implementation/artifact only; provider/backend readiness requires separate recorded evidence. implementation: kind: onnx artifact: policies/continue_predicate.onnx # Ports bind workflow names to the artifact's exact graph ABI; model-family inference is forbidden. ports: # Exact graph inputs; each tensor shape/dtype is authored. inputs: # Port `done`: Authored tensor ABI: dtype bool, rank 1, shape [batch]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. done: dtype: bool rank: 1 shape: - batch # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Exact graph outputs; each tensor shape/dtype is authored. outputs: # Port `continue`: Authored tensor ABI: dtype bool, rank 1, shape [1]. No grouping permission is implied by this shape. continue: dtype: bool rank: 1 shape: - 1 # Component `diffusion_schedule` is a diffusion/flow solver policy graph using onnx from `policies/diffusion_schedule.onnx`. Policy graphs compute tensors and semantics; they are not deployment/QoS knobs or backend readiness claims. No batch_capacity is authored, so the runtime must not group independent requests at this component. diffusion_schedule: # Selects a packaged implementation/artifact only; provider/backend readiness requires separate recorded evidence. implementation: kind: onnx artifact: policies/diffusion_schedule.onnx # Ports bind workflow names to the artifact's exact graph ABI; model-family inference is forbidden. ports: # Exact graph inputs; each tensor shape/dtype is authored. inputs: {} # Exact graph outputs; each tensor shape/dtype is authored. outputs: # Port `schedule`: Authored tensor ABI: dtype float32, rank 1, shape [11]. No grouping permission is implied by this shape. schedule: dtype: float32 rank: 1 shape: - 11 # Component `diffusion_timesteps` is an authored workflow compute component using onnx from `policies/diffusion_timesteps.onnx`. No batch_capacity is authored, so the runtime must not group independent requests at this component. diffusion_timesteps: # Selects a packaged implementation/artifact only; provider/backend readiness requires separate recorded evidence. implementation: kind: onnx artifact: policies/diffusion_timesteps.onnx # Ports bind workflow names to the artifact's exact graph ABI; model-family inference is forbidden. ports: # Exact graph inputs; each tensor shape/dtype is authored. inputs: {} # Exact graph outputs; each tensor shape/dtype is authored. outputs: # Port `schedule`: Authored tensor ABI: dtype float32, rank 1, shape [10]. No grouping permission is implied by this shape. schedule: dtype: float32 rank: 1 shape: - 10 # Component `schedule_lookup` is a diffusion/flow solver policy graph using onnx from `policies/schedule_lookup.onnx`. Policy graphs compute tensors and semantics; they are not deployment/QoS knobs or backend readiness claims. No batch_capacity is authored, so the runtime must not group independent requests at this component. schedule_lookup: # Selects a packaged implementation/artifact only; provider/backend readiness requires separate recorded evidence. implementation: kind: onnx artifact: policies/schedule_lookup.onnx # Ports bind workflow names to the artifact's exact graph ABI; model-family inference is forbidden. ports: # Exact graph inputs; each tensor shape/dtype is authored. inputs: # Port `schedule`: Authored tensor ABI: dtype float32, rank 1, shape [schedule_length]. No grouping permission is implied by this shape. schedule: dtype: float32 rank: 1 shape: - schedule_length # Port `step`: Authored tensor ABI: dtype int64, rank 1, shape [batch]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. step: dtype: int64 rank: 1 shape: - batch # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Exact graph outputs; each tensor shape/dtype is authored. outputs: # Port `timestep`: Authored tensor ABI: dtype float32, rank 1, shape [batch]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. timestep: dtype: float32 rank: 1 shape: - batch # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Component `tensor_scale` is an authored workflow compute component using onnx from `policies/tensor_scale.onnx`. No batch_capacity is authored, so the runtime must not group independent requests at this component. tensor_scale: # Selects a packaged implementation/artifact only; provider/backend readiness requires separate recorded evidence. implementation: kind: onnx artifact: policies/tensor_scale.onnx # Ports bind workflow names to the artifact's exact graph ABI; model-family inference is forbidden. ports: # Exact graph inputs; each tensor shape/dtype is authored. inputs: # Port `tensor`: Authored tensor ABI: dtype float32, rank 4, shape [batch, channels, height, width]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. tensor: dtype: float32 rank: 4 shape: - batch - channels - height - width # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Port `scale`: Authored tensor ABI: dtype float32, rank 1, shape [1]. No grouping permission is implied by this shape. scale: dtype: float32 rank: 1 shape: - 1 # Exact graph outputs; each tensor shape/dtype is authored. outputs: # Port `scaled`: Authored tensor ABI: dtype float32, rank 4, shape [batch, channels, height, width]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. scaled: dtype: float32 rank: 4 shape: - batch - channels - height - width # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Component `decoder_input_scale` is a primary model compute graph using onnx from `policies/decoder_input_scale.onnx`. No batch_capacity is authored, so the runtime must not group independent requests at this component. decoder_input_scale: # Selects a packaged implementation/artifact only; provider/backend readiness requires separate recorded evidence. implementation: kind: onnx artifact: policies/decoder_input_scale.onnx # Ports bind workflow names to the artifact's exact graph ABI; model-family inference is forbidden. ports: # Exact graph inputs; each tensor shape/dtype is authored. inputs: {} # Exact graph outputs; each tensor shape/dtype is authored. outputs: # Port `value`: Authored tensor ABI: dtype float32, rank 1, shape [1]. No grouping permission is implied by this shape. value: dtype: float32 rank: 1 shape: - 1 # Component `guidance_combine` is an executable semantic policy component implementing `onnx-genai.guidance-combine` using onnx from `policies/guidance_combine.onnx`. Policy graphs compute tensors and semantics; they are not deployment/QoS knobs or backend readiness claims. No batch_capacity is authored, so the runtime must not group independent requests at this component. guidance_combine: # Selects a packaged implementation/artifact only; provider/backend readiness requires separate recorded evidence. implementation: kind: onnx artifact: policies/guidance_combine.onnx # Ports bind workflow names to the artifact's exact graph ABI; model-family inference is forbidden. ports: # Exact graph inputs; each tensor shape/dtype is authored. inputs: # Port `unconditional`: Authored tensor ABI: dtype float32, rank 4, shape [batch, channels, height, width]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. unconditional: dtype: float32 rank: 4 shape: - batch - channels - height - width # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Port `conditional`: Authored tensor ABI: dtype float32, rank 4, shape [batch, channels, height, width]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. conditional: dtype: float32 rank: 4 shape: - batch - channels - height - width # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Port `scale`: Authored tensor ABI: dtype float32, rank 1, shape [batch]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. scale: dtype: float32 rank: 1 shape: - batch # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Exact graph outputs; each tensor shape/dtype is authored. outputs: # Port `estimate`: Authored tensor ABI: dtype float32, rank 4, shape [batch, channels, height, width]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. estimate: dtype: float32 rank: 4 shape: - batch - channels - height - width # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Semantic component ABI `onnx-genai.guidance-combine`; its bindings/parameters affect output correctness. contract: id: onnx-genai.guidance-combine version: '1' bindings: unconditional: unconditional conditional: conditional scale: scale estimate: estimate # Component `image_output_clamp` is an authored workflow compute component using onnx from `policies/image_output_clamp.onnx`. No batch_capacity is authored, so the runtime must not group independent requests at this component. image_output_clamp: # Selects a packaged implementation/artifact only; provider/backend readiness requires separate recorded evidence. implementation: kind: onnx artifact: policies/image_output_clamp.onnx # Ports bind workflow names to the artifact's exact graph ABI; model-family inference is forbidden. ports: # Exact graph inputs; each tensor shape/dtype is authored. inputs: # Port `tensor`: Authored tensor ABI: dtype float32, rank 4, shape [batch, axis_1, axis_2, axis_3]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. tensor: dtype: float32 rank: 4 shape: - batch - axis_1 - axis_2 - axis_3 # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Exact graph outputs; each tensor shape/dtype is authored. outputs: # Port `clamped`: Authored tensor ABI: dtype float32, rank 4, shape [batch, axis_1, axis_2, axis_3]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. clamped: dtype: float32 rank: 4 shape: - batch - axis_1 - axis_2 - axis_3 # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Component `conditioning_cast` is an authored workflow compute component using onnx from `policies/conditioning_cast.onnx`. No batch_capacity is authored, so the runtime must not group independent requests at this component. conditioning_cast: # Selects a packaged implementation/artifact only; provider/backend readiness requires separate recorded evidence. implementation: kind: onnx artifact: policies/conditioning_cast.onnx # Ports bind workflow names to the artifact's exact graph ABI; model-family inference is forbidden. ports: # Exact graph inputs; each tensor shape/dtype is authored. inputs: # Port `tensor`: Authored tensor ABI: dtype float16, rank 3, shape [batch, axis_1, axis_2]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. tensor: dtype: float16 rank: 3 shape: - batch - axis_1 - axis_2 # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Exact graph outputs; each tensor shape/dtype is authored. outputs: # Port `cast`: Authored tensor ABI: dtype float32, rank 3, shape [batch, axis_1, axis_2]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. # This explicit cast aligns dtype at an authored boundary; the runtime must not guess a different precision. cast: dtype: float32 rank: 3 shape: - batch - axis_1 - axis_2 # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Component `latent_row_shape` is an authored workflow compute component using onnx from `policies/latent_row_shape.onnx`. No batch_capacity is authored, so the runtime must not group independent requests at this component. latent_row_shape: # Selects a packaged implementation/artifact only; provider/backend readiness requires separate recorded evidence. implementation: kind: onnx artifact: policies/latent_row_shape.onnx # Ports bind workflow names to the artifact's exact graph ABI; model-family inference is forbidden. ports: # Exact graph inputs; each tensor shape/dtype is authored. inputs: {} # Exact graph outputs; each tensor shape/dtype is authored. outputs: # Port `shape`: Authored tensor ABI: dtype int64, rank 1, shape [3]. No grouping permission is implied by this shape. shape: dtype: int64 rank: 1 shape: - 3 # Component `latent_noise` is an executable semantic policy component implementing `onnx-genai.counter-rng` using onnx from `policies/latent_noise.onnx`. Policy graphs compute tensors and semantics; they are not deployment/QoS knobs or backend readiness claims. No batch_capacity is authored, so the runtime must not group independent requests at this component. latent_noise: # Selects a packaged implementation/artifact only; provider/backend readiness requires separate recorded evidence. implementation: kind: onnx artifact: policies/latent_noise.onnx # Ports bind workflow names to the artifact's exact graph ABI; model-family inference is forbidden. ports: # Exact graph inputs; each tensor shape/dtype is authored. inputs: # Port `seed`: Authored tensor ABI: dtype int64, rank 1, shape [batch]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. seed: dtype: int64 rank: 1 shape: - batch # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Port `offset`: Authored tensor ABI: dtype int64, rank 1, shape [batch]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. offset: dtype: int64 rank: 1 shape: - batch # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Port `row_shape`: Authored tensor ABI: dtype int64, rank 1, shape [row_rank]. No grouping permission is implied by this shape. row_shape: dtype: int64 rank: 1 shape: - row_rank # Exact graph outputs; each tensor shape/dtype is authored. outputs: # Port `noise`: Authored tensor ABI: dtype float32, rank 4, shape [batch, channels, height, width]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. noise: dtype: float32 rank: 4 shape: - batch - channels - height - width # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Port `next_offset`: Authored tensor ABI: dtype int64, rank 1, shape [batch]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. next_offset: dtype: int64 rank: 1 shape: - batch # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Semantic component ABI `onnx-genai.counter-rng`; its bindings/parameters affect output correctness. contract: id: onnx-genai.counter-rng version: '1' bindings: seed: seed offset: offset row_shape: row_shape noise: noise next_offset: next_offset # State cells make recurrence, cache mutation, lifetime, and ownership explicit. Physical paging/tiering/placement are not encoded by tensor names. state: # State `latent_state` is semantic tensor carry between workflow steps. Scope=invocation, recurrence=invariant. The authored recurrence determines how it evolves. latent_state: # Authored tensor ABI: dtype float32, rank 4, shape [component.unet.batch, 4, component.unet.height, component.unet.width]. Request rows stay aligned on axis 0; this preserves identity but does not by itself authorize grouping independent requests. contract: dtype: float32 rank: 4 shape: - component.unet.batch - 4 - component.unet.height - component.unet.width # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # `invocation` defines the semantic lifetime boundary; it is not a worker-placement policy. scope: invocation # Initializer names the exact first SSA value for this state cell. initializer: diffusion.noise # Recurrence defines the next-value rule: {kind=invariant}. recurrence: kind: invariant # State `loop_0_active` is loop/scheduler control state. Scope=invocation, recurrence=invariant. The values affect correctness, not merely performance. loop_0_active: # Authored tensor ABI: dtype bool, rank 1, shape [1]. No grouping permission is implied by this shape. contract: dtype: bool rank: 1 shape: - 1 # `invocation` defines the semantic lifetime boundary; it is not a worker-placement policy. scope: invocation # Initializer names the exact first SSA value for this state cell. initializer: package.loop_0_active # Recurrence defines the next-value rule: {kind=invariant}. recurrence: kind: invariant # The ordered SSA program defines actual execution and dataflow; capability strings are not a substitute for these steps. steps: # Run a bounded semantic loop (request.max_iterations); carried state and termination values make progress explicit and fail closed if unsupported. - kind: loop setup: # Invoke component `diffusion_schedule` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: diffusion_schedule # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: {} # SSA output names become the only values subsequent steps may consume. outputs: schedule: diffusion.schedule # Invoke component `diffusion_timesteps` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: diffusion_timesteps # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: {} # SSA output names become the only values subsequent steps may consume. outputs: schedule: diffusion.timesteps # Invoke component `decoder_input_scale` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: decoder_input_scale # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: {} # SSA output names become the only values subsequent steps may consume. outputs: value: diffusion.decoder_scale # Invoke component `latent_row_shape` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: latent_row_shape # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: {} # SSA output names become the only values subsequent steps may consume. outputs: shape: diffusion.latent_row_shape # Invoke component `latent_noise` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: latent_noise # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: seed: request.seed offset: package.rng_offset row_shape: diffusion.latent_row_shape # SSA output names become the only values subsequent steps may consume. outputs: noise: diffusion.noise next_offset: diffusion.rng_offset # Invoke component `text_encoder` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: text_encoder # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: input_ids: request.input_ids # SSA output names become the only values subsequent steps may consume. outputs: last_hidden_state: conditioning.hidden_states_raw # Invoke component `conditioning_cast` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: conditioning_cast # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: tensor: conditioning.hidden_states_raw # SSA output names become the only values subsequent steps may consume. outputs: # This explicit cast aligns dtype at an authored boundary; the runtime must not guess a different precision. cast: conditioning.hidden_states # Invoke component `text_encoder` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: text_encoder # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: input_ids: request.negative_input_ids # SSA output names become the only values subsequent steps may consume. outputs: last_hidden_state: conditioning.unconditional_raw # Invoke component `conditioning_cast` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: conditioning_cast # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: tensor: conditioning.unconditional_raw # SSA output names become the only values subsequent steps may consume. outputs: # This explicit cast aligns dtype at an authored boundary; the runtime must not guess a different precision. cast: conditioning.unconditional # Invoke component `continue_predicate` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: continue_predicate # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: done: package.false # SSA output names become the only values subsequent steps may consume. outputs: continue: setup.continue # Nested steps remain part of the typed executable workflow. steps: # Invoke component `schedule_lookup` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: schedule_lookup # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: schedule: diffusion.timesteps step: loop.iteration # SSA output names become the only values subsequent steps may consume. outputs: timestep: diffusion.timestep # Invoke component `unet` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: unet # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: sample: latent_state timestep: diffusion.timestep encoder_hidden_states: conditioning.unconditional # SSA output names become the only values subsequent steps may consume. outputs: noise_pred: denoiser.unconditional # Invoke component `unet` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: unet # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: sample: latent_state timestep: diffusion.timestep encoder_hidden_states: conditioning.hidden_states # SSA output names become the only values subsequent steps may consume. outputs: noise_pred: denoiser.conditional # Invoke component `guidance_combine` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: guidance_combine # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: unconditional: denoiser.unconditional conditional: denoiser.conditional scale: request.guidance_scale # SSA output names become the only values subsequent steps may consume. outputs: estimate: denoiser.estimate # Invoke component `solver_step` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: solver_step # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: sample: latent_state step: loop.iteration schedule: diffusion.schedule derivative: denoiser.estimate # SSA output names become the only values subsequent steps may consume. outputs: next_state: latent.body # Publish `denoiser.estimate` as output `noise_estimate` using append semantics. - kind: emit value: denoiser.estimate output: noise_estimate # Emit/update mode is semantic replacement/append behavior, not a buffering optimization. mode: append # Publish `latent.body` as output `latent_trajectory` using append semantics. - kind: emit value: latent.body output: latent_trajectory # Emit/update mode is semantic replacement/append behavior, not a buffering optimization. mode: append # Invoke component `continue_predicate` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: continue_predicate # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: done: package.false # SSA output names become the only values subsequent steps may consume. outputs: continue: loop.continue continue_when: loop_0_active max_iterations: request.max_iterations carried: - cell: latent_state next: latent.body - cell: loop_0_active next: loop.continue iteration: value: loop.iteration contract: dtype: int64 rank: 1 shape: - component.unet.batch # Tensor row layout is structural. Only component batch_capacity can authorize grouping independent requests. batch_layout: kind: request_aligned axis: 0 # Invoke component `tensor_scale` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: tensor_scale # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: tensor: latent_state scale: diffusion.decoder_scale # SSA output names become the only values subsequent steps may consume. outputs: scaled: diffusion.decoder_input # Invoke component `vae_decoder` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: vae_decoder # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: latent_sample: diffusion.decoder_input # SSA output names become the only values subsequent steps may consume. outputs: sample: vae.raw_image # Invoke component `image_output_clamp` with explicit SSA input/output bindings; this is executable tensor computation, not a host-side capability flag. - kind: invoke component: image_output_clamp # SSA bindings supply exact values to this step; no implicit tensor discovery occurs. inputs: tensor: vae.raw_image # SSA output names become the only values subsequent steps may consume. outputs: clamped: vae.image # Publish `latent_state` as output `latent` using replace semantics. - kind: emit value: latent_state output: latent # Emit/update mode is semantic replacement/append behavior, not a buffering optimization. mode: replace # Publish `vae.image` as output `image` using replace semantics. - kind: emit value: vae.image output: image # Emit/update mode is semantic replacement/append behavior, not a buffering optimization. mode: replace # Publish `diffusion.rng_offset` as output `rng_offset` using replace semantics. - kind: emit value: diffusion.rng_offset output: rng_offset # Emit/update mode is semantic replacement/append behavior, not a buffering optimization. mode: replace