starling.inference.model_loading.ModelManager
- class ModelManager[source]
Bases:
objectMethods
Compile the models using PyTorch's compile function.
Lazy-load models if not already loaded.
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