Model Zoo#
This section provides an overview of models in LazySlide.
Important
Disclaimer: The usage of any model in LazySlide is subject to the terms and conditions of the respective model’s license. Please ensure you comply with the license terms before using any model. If you use a model in your research, please cite the original paper or repository as appropriate. LazySlide does not redistribute any source code that’s not compatible with LazySlide’s MIT license.
Get model names#
In most of the cases, you only need to pass the model name as string to the function, for example, to use
the UNI model in feature extraction, you can do: zs.tl.feature_extraction(wsi, model="uni").
To get all available models, you can use the list_models function:
from lazyslide.models import list_models
models = list_models()
You can also filter models by type:
from lazyslide.models import list_models
vision_models = list_models("vision") # for vision models only
multimodal_models = list_models("multimodal") # for multimodal models only
segmentation_models = list_models("segmentation") # for segmentation models only
tile_prediction_models = list_models("tile_prediction") # for tile_prediction models only
For feature extraction, we also support all timm models with feature extraction head. You can list them with:
from timm import list_models
timm_models = list_models()
To retrive a specific model class:
from lazyslide.models import MODEL_REGISTRY
model_module = MODEL_REGISTRY['instanseg']
model = model_module() # Initiate the model
Get access to gated models#
indicates the model is publicly available. You can use it without a Hugging Face account or requesting access.
indicates the model is gated and requires permission. You must apply for access via the Hugging Face model card or the model’s repository.
To access gated models, follow these steps:
Create a Hugging Face account: https://huggingface.co/
Visit the model card page and request access. You can also use the Hugging Face button provided for each model below.
In your account settings, go to Access Tokens and create a new token with the required permissions (read access is sufficient). This token will grant access to any new models you gain permission for in the future.
Log in using your token to access gated models. Run the following command:
hf auth login --token YOUR_TOKEN
Below is a list of available models categorized by their type:
Models#
List all available models. |
Vision models#
GitHub Paper Params: 27.5M 768 features AGPL-3.0 [Wang et al., 2024] Clinical Histopathology Imaging Evaluation Foundation (CHIEF) |
|
GitHub Paper Params: 27.5M 768 features GPL-3.0 [Wang et al., 2022] Transformer-based unsupervised contrastive learning for histopathological image classification |
|
🤗Hugging Face GitHub Paper Params: 1.13B 1536 features Apache 2.0 with conditions [Xu et al., 2024] A whole-slide foundation model for digital pathology |
|
🤗Hugging Face GitHub Paper Params: 85.7M 1536 features CC-BY-NC-ND-4.0 [Filiot et al., 2025] A distilled version of H-optimus-0 |
|
🤗Hugging Face GitHub Params: 1.13B 1536 features Apache 2.0 [Saillard et al., 2024] Vision foundation model |
|
🤗Hugging Face GitHub Params: 1.13B 1536 features CC-BY-NC-ND-4.0 [Bioptimus, 2025] Vision foundation model |
|
🤗Hugging Face GitHub Paper Params: 85.7M 768 features Apache 2.0 [Nechaev et al., 2024] A family of foundational vision transformers for pathology |
|
🤗Hugging Face GitHub Paper Params: 303.7M 1024 features Apache 2.0 [Nechaev et al., 2024] A family of foundational vision transformers for pathology |
|
🤗Hugging Face GitHub Paper Params: 1.14B 3072 features MIT [Karasikov et al., 2025] Training state-of-the-art pathology foundation models with orders of magnitude less data |
|
🤗Hugging Face GitHub CC-BY-NC-ND-4.0 [Yan et al., 2025] Foundation Model for Computational Pathology |
|
🤗Hugging Face GitHub Paper Params: 85.8M 768 features Owkin non-commercial license [Filiot et al., 2023] Scaling self-Supervised Learning for histopathology with Masked Image Modeling |
|
🤗Hugging Face GitHub Paper Params: 303.4M 1024 features Owkin non-commercial license [Filiot et al., 2024] A large and public feature extractor for biomarker prediction |
|
🤗Hugging Face GitHub Paper Params: 303.4M 1024 features CC-BY-NC-ND-4.0 [Chen et al., 2024] General-purpose self-supervised model for pathology |
|
🤗Hugging Face GitHub Paper Params: 681.4M 1536 features CC-BY-NC-ND-4.0 [Chen et al., 2024] An improved version of UNI |
|
🤗Hugging Face Paper Params: 631.2M 2560 features Apache 2.0 [Vorontsov et al., 2024] A foundation model for clinical-grade computational pathology and rare cancers detection |
|
🤗Hugging Face Paper Params: 631.2M 2560 features CC-BY-NC-ND-4.0 [Zimmermann et al., 2024] Scaling self-supervised mixed magnification models in pathology |
Multimodal models#
🤗Hugging Face GitHub Paper Params: 395.2M 512 features CC-BY-NC-ND-4.0 [Lu et al., 2024] CONtrastive learning from Captions for Histopathology (CONCH) |
|
🤗Hugging Face GitHub Paper Params: 675.2M 1024 features CC-BY-NC-ND-4.0 [Xiang et al., 2025] A Vision-Language Foundation Model for Precision Oncology |
|
🤗Hugging Face GitHub Paper Params: 878M 1152 features health-ai-developer-foundations [Sellergren et al., 2025] MedSigLip is a variant of SigLip from Google for medical image analysis. |
|
🤗Hugging Face GitHub Paper Params: 638.5M BSD-3-Clause [Chen et al., 2025] A visual-omics foundation model to bridge histopathology with spatial transcriptomics |
|
🤗Hugging Face GitHub Paper Params: 87.8M 512 features Non-commercial [Huang et al., 2023] Pathology Language-Image Pretraining (PLIP) |
|
🤗Hugging Face Paper Params: 557.7M CC-BY-NC-ND-4.0 [Shaikovski et al., 2024] A multi-modal generative foundation model for slide-level histopathology, the Prism models encode slide-level embeddings from |
|
🤗Hugging Face GitHub Paper Params: 158.9M 768 features CC-BY-NC-ND-4.0 [Ding et al., 2024] Multimodal whole slide foundation model for pathology |
Segmentation models#
🤗Hugging Face GitHub Paper BSD-3-Clause [Stringer et al., 2021] Cell segmentation model |
|
GitHub Paper Params: 6.3M CC-BY-NC-SA-4.0 [Weng et al., 2024] Artifact segmentation model from GrandQC |
|
GitHub Paper Params: 6.6M CC-BY-NC-SA-4.0 [Weng et al., 2024] Tissue segmentation model from GrandQC |
|
🤗Hugging Face Params: 39.6M CC-BY-NC-SA-4.0 DeepLabV3 model finetuned on HEST-1k and Acrobat for IHC/H&E tissue segmentation. |
|
🤗Hugging Face GitHub Paper Params: 47.9M CC-BY-NC-ND-4.0 [Adjadj et al., 2025] Towards Comprehensive Cellular Characterisation of H&E slides |
|
GitHub Paper Params: 3.8M Apache 2.0 [Goldsborough et al., 2024] An embedding-based instance segmentation algorithm optimized for accurate, efficient and portable cell segmentation. |
|
GitHub Paper Params: 47.9M Apache 2.0; CC-BY-NC-SA-4.0 [Tommasino et al., 2024] Nuclei instance segmentation and classification |
|
GitHub Paper Params: 50.3M GPL-3.0 [Haghighat et al., 2022] Tissue segmentation model from PathProfiler |
|
This is a base class for any models from segmentation models pytorch |
Tile prediction models#
GitHub Paper Params: 299 Prosperity Public License 3.0.0 [Wang et al., 2020] High efficiency Focus Quality Assessment for digital pathology |
|
GitHub Paper Params: 11.2M GPL-3.0 [Haghighat et al., 2022] Quality assessment of histology images |
|
🤗Hugging Face Params: 303.9M CC BY-NC 4.0 Tile classification for breast |
|
🤗Hugging Face Params: 303.9M CC BY-NC 4.0 Tile classification for colorectal |
|
🤗Hugging Face Params: 303.9M CC BY-NC 4.0 Tile classification for skin |
|
🤗Hugging Face Params: 303.9M CC BY-NC 4.0 Tile classification for thorax |
Slide encoder models#
🤗Hugging Face Paper Params: 557.7M CC-BY-NC-ND-4.0 [Shaikovski et al., 2024] A multi-modal generative foundation model for slide-level histopathology, the Prism models encode slide-level embeddings from |
|
🤗Hugging Face GitHub Paper Params: 158.9M 768 features CC-BY-NC-ND-4.0 [Ding et al., 2024] Multimodal whole slide foundation model for pathology |
|
GitHub Paper Params: 1.2M AGPL-3.0 [Wang et al., 2024] Clinical Histopathology Imaging Evaluation Foundation (CHIEF) |
|
🤗Hugging Face GitHub Paper Apache 2.0 with conditions [Xu et al., 2024] A whole-slide foundation model for digital pathology |
|
🤗Hugging Face GitHub Paper Params: 3.2M CC BY-NC-ND 4.0 [Jaume et al., 2024] Multistain Pretraining for Slide Representation Learning in Pathology |
Computer vision features#
Style transfer models#
GitHub Paper Params: 50M CC-BY-NC-4.0 [Wu et al., 2025] AI generation of multiplex immunofluorescence staining from histopathology images |
Base model class#
Use model in offline environment#
For huggingface gated models, to run in an environment without internet access. The model must be download first, for example, run the model initiation code on a HPC login node.
from lazyslide.models import MODEL_REGISTRY
# This will cache the model
model = MODEL_REGISTRY['uni']()
When you submit a job to compute node without internet connection. Please set the environment variable
HF_HUB_OFFLINE=1 so huggingface will not make any HTTP request.
Alternatively, You can set it at the start of your python session
import os
os.environ['HF_HUB_OFFLINE'] = 1
How to use new models#
If you want to use a model that’s not available in LazySlide, you can still use it by wrapping it with LazySlide’s model classes. If you are familiar with class inheritance, the following example should be quite easy for you.
Suppose you have a new vision model and you want to use it for feature extraction, you can simply inherit from
one of our base classes (here is ImageModel) and implement necessary methods.
import torch
from lazyslide.models.base import ImageModel
class MyGreatModel(ImageModel):
def __init__(self):
from huggingface_hub import hf_hub_download
model_file = hf_hub_download("my-repo/my-great-model", "model.pt")
self.model = torch.jit.load(model_file, map_location="cpu")
self.model.eval()
# Define the transformation here, will automatically be applied
def get_transform(self):
return self.model.get_custom_transform()
@torch.inference_mode()
def encode_image(self, image):
"""
Encode the input image using the model.
The model should expect a tensor of shape [B, C, H, W].
"""
output = self.model(image)
return output
Once you finish with implementing your own model, you are welcomed to submit it to LazySlide. Please take a look at Contribution to new models