AI tools, scored for your job
Get paid to train AI
🤝 You're in the Free & Open Source library — community-built tools you can use without paying. A different concept from our scored AI directory.
Home › Free & Open Source › Video › NaViT
✦ Free & open sourceVideo

NaViT

PyTorch implementation of NaViT for processing images of arbitrary aspect ratios and resolutions.

Native variable resolution Vision Transformers in PyTorch

Process images and video frames of any aspect ratio without cropping or distorting original inputs.

Free forever · open source · MIT
✓ Needs IT✓ Browser-based✓ Real-time collaboration
6.1
ZEKAI
Essential PyTorch ViT module.
Free & open source · Video
Ease of setup4
Usefulness6
Maintenance9.5
Community5
★ 276
GITHUB
Oct 2026
UPDATED
MIT
LICENSE
🛠 Don't want to self-host? We can set it up →
⚡ Quick answer

NaViT is a PyTorch library implementing Google's Patch n' Pack Vision Transformer architecture. It allows computer vision engineers and video AI developers to feed images of varying resolutions and aspect ratios into a single Vision Transformer model. You should use it if you want to train or evaluate multi-resolution vision backbones without forced cropping or padding.

Runs on
Cross-platform
Hosting
Self-host
Languages
Python
License
MIT

What it is

This repository provides the core PyTorch class for NaViT, enabling variable-resolution image sequence packing. You can pass batches containing images of completely different dimensions directly into the forward pass. The underlying attention mechanism handles varying token counts across packed sequences.

Who it's for

It suits computer vision research engineers and machine learning developers building multimodal or video processing pipelines. It is not suitable for video editors looking for a desktop software application or pre-packaged editing tool.

Key features

Patch n' Pack sequence packing

Packs patches from images with different resolutions and aspect ratios into single token sequences.

Variable resolution handling

Processes arbitrary image dimensions natively without forcing uniform padding or aspect ratio warping.

Configurable model parameterization

Allows customization of embedding dimension, head counts, MLP width, and token dropout probabilities.

How to start

Up and running in 3 steps

1
Install the package via pip using: pip install navit-torch
2
Import NaViT and initialize the model with your custom dimensions and patch parameters
3
Pass variable-dimension image tensors into the model forward pass inside your PyTorch loop
Real talk

Our honest verdict

What's great

  • Packs variable-sized inputs into uniform sequence lengths for batch processing
  • Eliminates the need to crop or resize input images to fixed square dimensions
  • Includes configurable token dropout and embedding dropout parameters
  • Exposes simple PyTorch initialization syntax via standard PyPI package

Where it falls short

  • Does not include pre-trained model weights out of the box
  • Lacks training scripts or dataset pipeline examples in the repository
  • Requires machine learning expertise and substantial GPU compute resources to train
Cost

Pricing & license

NaViT is free under the MIT licence. Your only cost is the GPU compute infrastructure required to train and run your PyTorch models.

Paid work

Open remote AI-training roles

880 open remote AI-training roles, updated November 16, 2026; most pay $20–$175 an hour. Zekai lists them free; the application goes to the employer’s platform.

See all open roles →
Compare

Alternatives

Get more

Use it, or have us set it up

📄 Free PDF: NaViT for Video
A plain-language guide to getting your first result. Sent to your inbox.
🔔 64 people want a full video tutorial — add your vote
🛠 Don't want to set it up yourself?
We'll install, host & configure NaViT for you — and train your team.
Get it done for you ↗
Questions

FAQ

Does this repository include pre-trained weights for NaViT?

No, this is a code implementation of the model architecture. You must train the model on your own compute infrastructure.

Can I feed images with different aspect ratios in the same batch?

Yes, NaViT packs patches from images of varying resolutions into sequence batches for efficient model training.

Radar

Latest AI news

✉️ The weekly free toolkit
The best new free & open-source tools for Video — one short email a week, in your language.
Free · 1 email/week · unsubscribe anytime
Get paid to train AI →

See Zekai first in Google