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.graph_specs

Compiles a pipeline’s graphs by role.

A pipeline describes each graph it runs as a GraphSpec under a role key, such as "decoder" or "sampler". The keys are whatever the pipeline’s task defines; GraphRole holds MAX’s built-in ones. compile_and_init_graphs() compiles and initializes the graphs, returning one CompiledCallable per role.

Graph roles and specs​

GraphRoleThe roles of the graphs MAX's pipelines run.
GraphSpecA graph a pipeline compiles, as the module that traces it.

Compilation​

compile_and_init_graphsCompiles and initializes each role's graph.