skillfed

timm

PyTorch Image Models

timm v1.0.28 15.4M downloads/30d#1,189 on PyPI37,066
Permissive license Apache-2.0 Active released

What it is and what it does

Timm is a model zoo and training framework for PyTorch image models. It bundles hundreds of pretrained architectures—vision transformers (ViT, EVA, DINOv3), efficient CNNs (EfficientNet, ConvNeXt), and hybrid designs—with their weights hosted on Hugging Face Hub. You use it to load a pretrained model in one line, fine-tune it on your data, or extract features for downstream tasks.

The package depends on torch, torchvision, pyyaml, huggingface_hub, and safetensors. It supports Python 3.8–3.12 and is actively maintained; recent releases add new model families (DINOv3, MobileCLIP-2, SigLIP-2), optimizer variants (Muon, NAdaMuon), and infrastructure improvements (meta-device initialization, pickle security hardening). Training and inference scripts are included.

Use it for:

  • Load a pretrained ViT or ConvNeXt model and fine-tune it on your image classification dataset.
  • Extract intermediate feature maps from a pretrained model for use in a downstream vision task.
  • Benchmark inference speed and accuracy across multiple model architectures on your hardware.
  • Train a custom image model from scratch using timm's training scripts and optimizer support.
  • Integrate a pretrained encoder (e.g., DINOv3 ViT) into a multimodal or self-supervised pipeline.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Timm provides a large collection of pretrained PyTorch image models—vision transformers, CNNs, and hybrid architectures—with utilities for loading weights, training, and inference.

Yes. Timm is a mature, actively maintained library with no known vulnerabilities, permissive licensing, and low install friction. It is the de facto standard for accessing a diverse set of pretrained image models in PyTorch. Install it if you need pretrained models, model zoo access, or a training framework for vision tasks.

Install

timm on PyPI

pip

pip install timm

uv

uv add timm

poetry

poetry add timm

Installing timm

Before you install

Low friction: pure Python wheel with five runtime dependencies (torch, torchvision, pyyaml, huggingface_hub, safetensors). Active maintenance—last commit 2026-08-11, release 34 days ago—with a large repository (37066 stars) and consistent updates.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes.

Quickstart

pip install timm
import timm
model = timm.create_model('vit_base_patch16', pretrained=True)
output = model(torch.randn(1, 3, 256, 256))

Requires torch and torchvision; model inference requires compatible GPU or CPU with sufficient memory depending on model size.

Verify before relying

  • Specific input image dimensions and memory requirements for different model families.
  • Compatibility guarantees across PyTorch versions beyond the tested range (1.13 to 2.9.1).
  • Whether all model variants and pretrained weights remain available on Hugging Face Hub.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 5 — torch, torchvision, pyyaml, huggingface_hub, safetensors
Maintenance actively maintained — 34 days since the last release
Last repo commit
First released
Downloads 15,367,053/month — #1,189 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: timm-1.0.28-py3-none-any.whl

Keywords: pytorch, image-classification

Development Status :: 5 - Production/StableIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Tags

pytorch image models pretrainedvision transformer weightstimm model zooimage classification pytorchpretrained cnn modelsvit dino convnextmodel hub integration
vision-modelspretrained-weightsmodel-zoo

More Software Development packages