--- pipeline_tag: text-to-image library_name: diffusers tags: - Chroma - quantization - svdquant - nunchaku - fp4 - int4 base_model: tonera/Chroma1-HD-SVDQ base_model_relation: quantized license: apache-2.0 --- # Model Card (SVDQuant) > **Language**: English | [中文](README_CN.md) ![Chroma1-HD](chroma1-hd.png) ## Model name - **Model repo**: `tonera/Chroma1-HD-SVDQ` - **Base (Diffusers weights path)**: `tonera/Chroma1-HD-SVDQ` (repo root) - **Quantized Transformer weights**: `tonera/Chroma1-HD-SVDQ/svdq-_r32-Chroma1-HD.safetensors` ## Quantization / inference tech - **Inference engine**: [vitoom-nunchaku](https://huggingface.co/tonera/vitoom-nunchaku) — community-maintained Nunchaku build with **Chroma** support 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. 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.** ## Install vitoom-nunchaku (Option 1: manual Python environment) Install the prebuilt wheel from **[tonera/vitoom-nunchaku](https://huggingface.co/tonera/vitoom-nunchaku)** that matches your platform, Python, and CUDA: ```bash pip install torch==2.11.* torchvision==0.26.* torchaudio==2.11.* \ --index-url https://download.pytorch.org/whl/cu130 hf download tonera/vitoom-nunchaku \ nunchaku-1.3.0.dev20260622+cu13.0torch2.11-cp311-cp311-linux_x86_64.whl \ --local-dir ./wheels pip install ./wheels/nunchaku-1.3.0.dev20260622+cu13.0torch2.11-cp311-cp311-linux_x86_64.whl ``` For cu128, cp310, or ARM64 aarch64 wheels, see the [vitoom-nunchaku README](https://huggingface.co/tonera/vitoom-nunchaku). Verify: ```bash python -c "import nunchaku; from nunchaku import NunchakuChromaTransformer2dModel; print(nunchaku.__version__)" ``` ## Usage example (Diffusers + Nunchaku Transformer) Assumes **vitoom-nunchaku** is installed: ```python import torch from diffusers import ChromaPipeline from nunchaku import NunchakuChromaTransformer2dModel from nunchaku.utils import get_precision MODEL = "Chroma1-HD-SVDQ" REPO_ID = f"tonera/{MODEL}" if __name__ == "__main__": transformer = NunchakuChromaTransformer2dModel.from_pretrained( f"{REPO_ID}/svdq-{get_precision()}_r32-{MODEL}.safetensors" ) pipe = ChromaPipeline.from_pretrained( f"{REPO_ID}", transformer=transformer, torch_dtype=torch.bfloat16, use_safetensors=True, ).to("cuda") prompt = "Make Pikachu hold a sign that says 'Nunchaku is awesome', yarn art style, detailed, vibrant colors" image = pipe(prompt=prompt, guidance_scale=2.5, num_inference_steps=40).images[0] image.save("Chroma1.png") ``` ## Option 2 (recommended: vitoom) 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). ```bash git clone https://github.com/tonera/vitoom.git cd vitoom python scripts/setup_vitoom.py python scripts/load_vitoom_images.py --components backend,visual docker compose up -d backend docker compose -f docker-compose.inference.release.yml --profile visual up -d ``` In the Web UI: **Models** → download and activate **`tonera/Chroma1-HD-SVDQ`** → run in **Image** workspace.