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_CN.md with huggingface_hub
Browse files- README_CN.md +25 -24
README_CN.md
CHANGED
|
@@ -13,50 +13,51 @@ base_model_relation: quantized
|
|
| 13 |
license: apache-2.0
|
| 14 |
---
|
| 15 |
|
| 16 |
-
#
|
| 17 |
|
| 18 |
-
> **
|
| 19 |
|
| 20 |

|
| 21 |
|
| 22 |
|
| 23 |
-
##
|
| 24 |
|
| 25 |
-
- **
|
| 26 |
-
- **Base
|
| 27 |
-
- **
|
| 28 |
|
| 29 |
-
##
|
| 30 |
|
| 31 |
-
- **
|
| 32 |
|
| 33 |
-
Nunchaku
|
| 34 |
|
| 35 |
-
|
| 36 |
|
|
|
|
| 37 |
|
| 38 |
-
|
| 39 |
|
| 40 |
-
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
- **前置条件**:安装 `PyTorch >= 2.5`(实际以对应 wheel 的要求为准)
|
| 45 |
-
- **安装 nunchaku wheel**:从 GitHub Releases / HuggingFace / ModelScope 选择与你环境匹配的 wheel(注意 `cp311` 表示 Python 3.11):
|
| 46 |
- `https://github.com/nunchaku-ai/nunchaku/releases`
|
| 47 |
|
| 48 |
```bash
|
| 49 |
-
#
|
| 50 |
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
|
| 51 |
```
|
| 52 |
|
| 53 |
-
- **
|
| 54 |
-
|
| 55 |
-
## 使用示例(Diffusers + Nunchaku Transformer)
|
| 56 |
-
- 注意:我正在推动Nunchaku官方合并此PR:https://github.com/nunchaku-ai/nunchaku/pull/916
|
| 57 |
-
在此之前,如果您想体验,可将仓库中transformer_chroma.py
|
| 58 |
-
拷贝到nunchaku/models/transformers/transformer_chroma.py中。这是一个相对低性能版本,高性能版本仍然要等PR通过。
|
| 59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
```python
|
| 62 |
import torch
|
|
@@ -65,7 +66,7 @@ from diffusers import ChromaPipeline
|
|
| 65 |
from nunchaku import NunchakuChromaTransformer2dModel
|
| 66 |
from nunchaku.utils import get_precision
|
| 67 |
|
| 68 |
-
MODEL = "Chroma1-HD-SVDQ"
|
| 69 |
REPO_ID = f"tonera/{MODEL}"
|
| 70 |
|
| 71 |
if __name__ == "__main__":
|
|
|
|
| 13 |
license: apache-2.0
|
| 14 |
---
|
| 15 |
|
| 16 |
+
# Model Card (SVDQuant)
|
| 17 |
|
| 18 |
+
> **Language**: English | [中文](README_CN.md)
|
| 19 |
|
| 20 |

|
| 21 |
|
| 22 |
|
| 23 |
+
## Model name
|
| 24 |
|
| 25 |
+
- **Model repo**: `tonera/Chroma1-HD-SVDQ`
|
| 26 |
+
- **Base (Diffusers weights path)**: `tonera/Chroma1-HD-SVDQ` (repo root)
|
| 27 |
+
- **Quantized Transformer weights**: `tonera/Chroma1-HD-SVDQ/svdq-<precision>_r32-Chroma1-HD.safetensors`
|
| 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
|
|
|
|
| 66 |
from nunchaku import NunchakuChromaTransformer2dModel
|
| 67 |
from nunchaku.utils import get_precision
|
| 68 |
|
| 69 |
+
MODEL = "Chroma1-HD-SVDQ"
|
| 70 |
REPO_ID = f"tonera/{MODEL}"
|
| 71 |
|
| 72 |
if __name__ == "__main__":
|