Skip to content

Installation

Tinify supports Python 3.8+ and PyTorch 1.7+.

From PyPI

The simplest way to install Tinify is via pip:

pip install tinify

Note

Pre-built wheels are available for Linux and macOS.

From Source

For development or to get the latest features, install from source.

Prerequisites

  • A C++17 compiler (GCC 7+, Clang 5+, or MSVC 2019+)
  • pip 19.0+
  • Python 3.8+

Installation Steps

  1. Clone the repository:

    git clone https://github.com/InterDigitalInc/Tinify tinify
    cd tinify
    
  2. Install in development mode:

    pip install -U pip && pip install -e .
    

Optional Dependencies

Install additional packages for specific use cases:

pip install -e '.[dev]'

Includes: testing, linting, and documentation tools.

pip install -e '.[tutorials]'

Includes: Jupyter notebooks and widgets.

pip install -e '.[pointcloud]'

Includes: Point cloud compression dependencies.

pip install -e '.[mkdocs]'

Includes: MkDocs and related plugins.

Using uv

For faster dependency resolution with uv:

uv pip install tinify

Or from source:

uv pip install -e .

Verifying Installation

After installation, verify that Tinify is working:

import tinify
print(tinify.__version__)

# List available entropy coders
print(tinify.available_entropy_coders())

# List available models
from tinify.zoo import models
print(models.keys())

Docker

Docker images are planned for future releases.

Warning

Conda environments are not officially supported.

Troubleshooting

Build Errors

If you encounter build errors related to C++ extensions:

  1. Ensure you have a C++17 compatible compiler installed
  2. Update pip: pip install -U pip
  3. Try installing with --no-build-isolation:

    pip install -e . --no-build-isolation
    

CUDA Issues

For GPU support, ensure you have:

  • CUDA toolkit installed (compatible with your PyTorch version)
  • cuDNN installed
# Check CUDA availability
python -c "import torch; print(torch.cuda.is_available())"