Instructions to use tonera/Chroma1-HD-SVDQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use tonera/Chroma1-HD-SVDQ with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("tonera/Chroma1-HD-SVDQ", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -28,37 +28,39 @@ license: apache-2.0
|
|
| 28 |
|
| 29 |
## Quantization / inference tech
|
| 30 |
|
| 31 |
-
- **Inference engine**:
|
| 32 |
|
| 33 |
-
Nunchaku is a high-performance inference engine for **4-bit (FP4/INT4) low-bit neural networks**.
|
| 34 |
|
| 35 |
-
|
| 36 |
|
| 37 |
-
##
|
| 38 |
|
| 39 |
-
|
| 40 |
|
| 41 |
-
|
|
|
|
|
|
|
| 42 |
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
-
|
| 46 |
|
| 47 |
-
|
| 48 |
-
# Example (choose the correct wheel URL for your torch/cuda/python versions)
|
| 49 |
-
pip install https://github.com/nunchaku-ai/nunchaku/releases/download/vX.Y.Z/nunchaku-X.Y.Z+torch2.9-cp311-cp311-linux_x86_64.whl
|
| 50 |
```
|
| 51 |
|
| 52 |
-
|
| 53 |
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
```
|
| 59 |
-
from nunchaku.models.transformers.transformer_chroma import NunchakuChromaTransformer2dModel
|
| 60 |
```
|
| 61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
```python
|
| 63 |
import torch
|
| 64 |
from diffusers import ChromaPipeline
|
|
@@ -86,3 +88,18 @@ if __name__ == "__main__":
|
|
| 86 |
image.save("Chroma1.png")
|
| 87 |
```
|
| 88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
## Quantization / inference tech
|
| 30 |
|
| 31 |
+
- **Inference engine**: [vitoom-nunchaku](https://huggingface.co/tonera/vitoom-nunchaku) — community-maintained Nunchaku build with **Chroma** support
|
| 32 |
|
| 33 |
+
Nunchaku is a high-performance inference engine for **4-bit (FP4/INT4) low-bit neural networks**. It implements **SVDQuant** and related optimizations. The Chroma1-HD quantized weights in this repository are meant to be used with **vitoom-nunchaku** on supported GPUs.
|
| 34 |
|
| 35 |
+
Upstream [Nunchaku](https://github.com/nunchaku-ai/nunchaku) has not merged Chroma support for a long time ([PR #928](https://github.com/nunchaku-ai/nunchaku/pull/928) still pending). **Do not copy `transformer_chroma.py` manually.**
|
| 36 |
|
| 37 |
+
## Install vitoom-nunchaku (Option 1: manual Python environment)
|
| 38 |
|
| 39 |
+
Install the prebuilt wheel from **[tonera/vitoom-nunchaku](https://huggingface.co/tonera/vitoom-nunchaku)** that matches your platform, Python, and CUDA:
|
| 40 |
|
| 41 |
+
```bash
|
| 42 |
+
pip install torch==2.11.* torchvision==0.26.* torchaudio==2.11.* \
|
| 43 |
+
--index-url https://download.pytorch.org/whl/cu130
|
| 44 |
|
| 45 |
+
hf download tonera/vitoom-nunchaku \
|
| 46 |
+
nunchaku-1.3.0.dev20260622+cu13.0torch2.11-cp311-cp311-linux_x86_64.whl \
|
| 47 |
+
--local-dir ./wheels
|
| 48 |
|
| 49 |
+
pip install ./wheels/nunchaku-1.3.0.dev20260622+cu13.0torch2.11-cp311-cp311-linux_x86_64.whl
|
|
|
|
|
|
|
| 50 |
```
|
| 51 |
|
| 52 |
+
For cu128, cp310, or ARM64 aarch64 wheels, see the [vitoom-nunchaku README](https://huggingface.co/tonera/vitoom-nunchaku).
|
| 53 |
|
| 54 |
+
Verify:
|
| 55 |
+
|
| 56 |
+
```bash
|
| 57 |
+
python -c "import nunchaku; from nunchaku import NunchakuChromaTransformer2dModel; print(nunchaku.__version__)"
|
|
|
|
|
|
|
| 58 |
```
|
| 59 |
|
| 60 |
+
## Usage example (Diffusers + Nunchaku Transformer)
|
| 61 |
+
|
| 62 |
+
Assumes **vitoom-nunchaku** is installed:
|
| 63 |
+
|
| 64 |
```python
|
| 65 |
import torch
|
| 66 |
from diffusers import ChromaPipeline
|
|
|
|
| 88 |
image.save("Chroma1.png")
|
| 89 |
```
|
| 90 |
|
| 91 |
+
## Option 2 (recommended: vitoom)
|
| 92 |
+
|
| 93 |
+
For a ready-to-use Web UI without manual wheel install, deploy [vitoom](https://github.com/tonera/vitoom). Its **visual** module includes **vitoom-nunchaku** with Chroma support. See [docker-usage-en.md](https://github.com/tonera/vitoom/blob/main/docker-usage-en.md).
|
| 94 |
+
|
| 95 |
+
```bash
|
| 96 |
+
git clone https://github.com/tonera/vitoom.git
|
| 97 |
+
cd vitoom
|
| 98 |
+
python scripts/setup_vitoom.py
|
| 99 |
+
python scripts/load_vitoom_images.py --components backend,visual
|
| 100 |
+
docker compose up -d backend
|
| 101 |
+
docker compose -f docker-compose.inference.release.yml --profile visual up -d
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
In the Web UI: **Models** → download and activate **`tonera/Chroma1-HD-SVDQ`** → run in **Image** workspace.
|
| 105 |
+
|