IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /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. /get-started.md).

Python module

max.pipelines.lib.generate_images

Image generation from text prompts and input images, in-process.

Each prompt becomes the same request max serve builds for POST /v1/responses, so the model’s defaults and the request’s validation are the same as in serve. The images come back as PNG, so they match serve’s images for output_format="png". Serve defaults to JPEG. An input image goes to the tokenizer directly, the same place serve’s data URI image ends up. Prompts run one at a time, since an image pipeline takes one request per execute.

Classes​

GenerateImagesResultThe result of generate_images().
ImagePipelineThe pipeline surface generate_images() drives.
ImageTokenizerThe tokenizer surface generate_images() drives.

Functions​

generate_imagesGenerates images for each prompt, one prompt per pipeline run.