Quickstart¶
From nothing to an image in four steps. You need Python 3.11 or newer; PyTorch is the only required package.
1. Install¶
2. Download a model¶
Downloads happen only when you run this command. It fetches the pinned, validated revision and verifies every file.
Gated and large models
Some repositories (for example krea2-turbo) are gated: accept the terms on Hugging Face and
set HF_TOKEN. Weight licenses differ per model; check the
catalog before you use one commercially.
3. Generate¶
from imagehub import pipeline
with pipeline("t2i", backend="sd-v1-5", model="checkpoints/sd-v1-5") as pipe:
result = pipe("a photograph of an astronaut riding a horse", seed=42)
result.images[0].save("astronaut.png")
print(result.metadata) # seed, steps, guidance, size, revision, device, dtype
The with block loads the weights on entry and releases them on exit. Calling pipe(...)
outside a block also works; the model loads on first use.
4. Change one thing¶
Settings differ a little between architectures (a distilled model has no guidance, for example). Each model page lists its own, and unknown settings raise an error instead of being ignored.
Where next¶
Guides¶
Models¶
123 checkpoints with their settings, licenses and notes.
Parity¶
What was measured, and the gallery to look at.