Skip to content

Installation

imagehub requires Python 3.11 or newer. PyTorch is the only required dependency.

pip install imagehub
Extra Adds Needed for
image Pillow Image.to_pil() and passing PIL images as input
reference diffusers, transformers, torchvision, sentencepiece, protobuf running the optional parity tests against the reference
dev pytest, ruff, mypy, build working on imagehub itself
docs MkDocs Material, static i18n building this site
pip install "imagehub[image]"
pip install "imagehub[docs]"

PNG saving and reading is built in, so Image.save("out.png") works without Pillow.

Install PyTorch first for your hardware

If you want CUDA or a CPU-only build, install PyTorch from the official selector before pip install imagehub.

Check the install

import imagehub
print(imagehub.__version__)
print(len(imagehub.available_models()["t2i"]), "models in the catalog")