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 module

max.pipelines.weights

Weight loading utilities for MAX pipelines.

HuggingFace integration

HuggingFaceRepoHandle for interacting with a Hugging Face repository (remote or local).
download_weight_filesDownloads weight files for a Hugging Face model and returns local paths.
generate_local_model_pathGenerates the local filesystem path where a Hugging Face model repo is cached.
is_diffusion_pipelineCheck if a Hugging Face repository is a diffusion pipeline.
try_to_load_from_cacheWrapper around huggingface_hub.try_to_load_from_cache; validates repo exists.
validate_hf_repo_accessValidates repository access and raises clear, user-friendly errors.

Weight loading

WeightPathParserParses and validates weight paths for model configuration.
auto_cast_weights_from_envReturns the pipeline default for Module auto-cast, read from env.
parse_quant_configParses scaled quantization config from HuggingFace config and state dict.
AUTO_CAST_ENV_VARstr(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str