tonera commited on
Commit
b90181a
·
verified ·
1 Parent(s): 130bf0f

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +36 -19
README.md CHANGED
@@ -28,37 +28,39 @@ license: apache-2.0
28
 
29
  ## Quantization / inference tech
30
 
31
- - **Inference engine**: Nunchaku (`https://github.com/nunchaku-ai/nunchaku`)
32
 
33
- Nunchaku is a high-performance inference engine for **4-bit (FP4/INT4) low-bit neural networks**. Its goal is to significantly reduce VRAM usage and improve inference speed while preserving generation quality as much as possible. It implements and productionizes post-training quantization methods such as **SVDQuant**, and uses operator/kernel fusion and other optimizations to reduce the extra overhead introduced by low-rank branches.
34
 
35
- The Chroma1-HD quantized weights in this repository (e.g. `svdq-*_r32-*.safetensors`) are meant to be used with Nunchaku for efficient inference on supported GPUs.
36
 
37
- ## You must install Nunchaku before use
38
 
39
- - **Official installation docs** (recommended source of truth): `https://nunchaku.tech/docs/nunchaku/installation/installation.html`
40
 
41
- ### (Recommended) Install the official prebuilt wheel
 
 
42
 
43
- - **Prerequisite**: `PyTorch >= 2.5` (follow the wheel requirements as the source of truth)
44
- - **Install the nunchaku wheel**: pick the wheel matching your environment from GitHub Releases / HuggingFace / ModelScope (note `cp311` means Python 3.11):
45
- - `https://github.com/nunchaku-ai/nunchaku/releases`
46
 
47
- ```bash
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
- - **Tip (RTX 50 series GPUs)**: usually `CUDA >= 12.8` is recommended, and FP4 models are preferred for better compatibility and performance (follow the official docs).
53
 
54
- ## Usage example (Diffusers + Nunchaku Transformer)
55
- Note: I am pushing for the official Nunchaku PR to be merged: https://github.com/nunchaku-ai/nunchaku/pull/928
56
- Until then, if you want to try it out, you can copy `transformer_chroma.py` from the repository to `nunchaku/models/transformers/transformer_chroma.py`.
57
- Usage like this:
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
+