Skip to main content

Python class

PixelGenerationContext

PixelGenerationContext

class max.interfaces.PixelGenerationContext(*args, **kwargs)

source

Bases: BaseContext, Protocol

Protocol defining the interface for pixel generation contexts.

A PixelGenerationContext represents model inputs for pixel generation pipelines, managing the state and parameters needed for generating images or videos.

guidance_scale

property guidance_scale: float

source

Classifier-free guidance scale (1.0 to disable CFG).

height

property height: int

source

Height of generated output in pixels.

latents

property latents: ndarray[tuple[Any, ...], dtype[float32]]

source

The latents for the context.

num_images_per_prompt

property num_images_per_prompt: int

source

Number of images to generate.

num_inference_steps

property num_inference_steps: int

source

Number of denoising steps.

tokens

property tokens: TokenBuffer

source

The token buffer for the context.

width

property width: int

source

Width of generated output in pixels.