starling.inference.model_loading.ModelManager

class ModelManager[source]

Bases: object

Methods

__init__

compile

Compile the models using PyTorch's compile function.

get_models

Lazy-load models if not already loaded.

load_models

Load the models from local files or URLs.

__init__()[source]
load_models(encoder_path, ddpm_path, device)[source]

Load the models from local files or URLs.

get_models(encoder_path='https://github.com/idptools/starling/releases/download/v2.0.0/STARLING_v2.0.0_ViT_VAE_2025_10_14.ckpt', ddpm_path='https://github.com/idptools/starling/releases/download/v2.0.0/STARLING_v2.0.0_ViT_DDPM_2025_10_14.ckpt', device='cpu')[source]

Lazy-load models if not already loaded.

Parameters:
  • encoder_path (str) – The path to the encoder model. Default is

  • ddpm_path (str) – The path to the DDPM model.

  • device (str) – The device on which to load the models. Default is CPU, but this changes depending on whatever we want to use in ensemble_generation.py. Just made CPU default because all platforms have CPU.

Returns:

The loaded encoder and diffusion models.

Return type:

encoder_model, diffusion_model

compile()[source]

Compile the models using PyTorch’s compile function. This is a placeholder for the actual compilation logic.