Skip to main content

Python module

max.pipelines.modeling.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.
AUTO_CAST_ENV_VARstr(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str