Install Pruna

Prerequisites

pruna is officially supported on Linux. While it can be used on macOS and Windows, compatibility depends on the specific algorithms you plan to use, as some may have platform-specific dependencies. If you don’t have access to a Linux environment, you can still easily experiment with pruna using cloud platforms like Google Colab.

Installing Pruna

If all prerequisites are met, you can simply install pruna with the following commands:

We support pip installation in both CPU and GPU environments. When using pip, we recommend using uv instead of the native pip command to avoid the performance penalty of rebuilding package environments. When you have uv installed, you can install pruna with the following command:

pip install pruna==0.3.4

Additionally, there are a few algorithms that require additional dependencies.

Extra Name

Description

stable-fast

StableFast compiler for diffusion models

llamacpp

Llama.cpp conversion and inference

gptq

GPTQ quantization support

awq

AWQ quantization support

ctranslate

CTranslate2 backend for speech models

upscale

Real-ESRGAN upscaling support

kvpress

KV cache compression for LLMs

Tip

Install only the extras your algorithms need. For example:

pip install "pruna[stable-fast]"

You can find out if your desired algorithm requires additional dependencies by checking the Algorithms Overview page.