IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Python class

PixelGenerationPipeline

PixelGenerationPipeline​

class max.pipelines.diffusion.PixelGenerationPipeline(pipeline_config, pipeline_model, cache_config=None)

source

Bases: Pipeline[PixelGenerationInputs[PixelGenerationContextType], GenerationOutput], Generic[PixelGenerationContextType]

Pixel generation pipeline for diffusion models.

Parameters:

execute()​

execute(inputs)

source

Runs the pixel generation pipeline for the given inputs.

Parameters:

inputs (PixelGenerationInputs[PixelGenerationContextType])

Return type:

dict[RequestID, GenerationOutput]

pipeline_config​

property pipeline_config: PipelineConfig

source

Return the pipeline configuration.

prepare_batch()​

prepare_batch(batch)

source

Prepare model inputs for pixel generation execution.

Delegates to the pipeline model for model-specific input preparation.

Parameters:

batch (dict[RequestID, PixelGenerationContextType]) – Dictionary mapping request IDs to their PixelContext objects.

Returns:

  • Model inputs ready for execution, or None if batch is empty.
  • list: Flattened batch as (request_id, context) tuples for response mapping.

Return type:

A tuple of

Raises:

ValueError – If batch size is larger than 1 (not yet supported).

release()​

release(request_id)

source

Release resources associated with a request.

Parameters:

request_id (RequestID) – The request ID to release resources for.

Return type:

None