Nunchaku Chroma
Adds Chroma model support to Nunchaku for fast 4-bit quantized inference.
Installation
Requirements
- Python 3.10+
- PyTorch 2.0+
- CUDA-capable GPU
Install from PyPI
pip install nunchaku nunchaku-chroma
Install from source
pip install nunchaku
git clone https://github.com/spooknik/nunchaku-chroma.git
cd nunchaku-chroma
pip install -e .
Usage
Diffusers API
from diffusers import ChromaPipeline
from nunchaku_chroma import NunchakuChromaTransformer2DModel
import torch
# Load quantized transformer
transformer = NunchakuChromaTransformer2DModel.from_pretrained(
"path/to/quantized-chroma.safetensors",
device="cuda",
torch_dtype=torch.bfloat16,
)
# Create pipeline
pipe = ChromaPipeline.from_pretrained(
"lodestones/Chroma",
transformer=transformer,
torch_dtype=torch.bfloat16,
).to("cuda")
# Generate
image = pipe(
"A beautiful sunset over mountains",
num_inference_steps=20,
guidance_scale=4.0,
).images[0]
image.save("output.png")
LoRA Support
from nunchaku_chroma import NunchakuChromaTransformer2DModel
# Load quantized model
transformer = NunchakuChromaTransformer2DModel.from_pretrained(
"path/to/quantized-chroma.safetensors",
device="cuda",
torch_dtype=torch.bfloat16,
)
# Apply single LoRA with strength
transformer.update_lora_params("path/to/lora.safetensors", strength=0.8)
# Adjust strength dynamically (without reloading)
transformer.set_lora_strength(0.5)
# Reset to base model
transformer.reset_lora()
# Apply multiple LoRAs with different strengths
transformer.update_lora_params_multi([
("lora1.safetensors", 0.8),
("lora2.safetensors", 0.5),
])
ComfyUI
For ComfyUI integration, use the comfyui-nunchaku-chroma custom node:
# Install dependencies
pip install nunchaku nunchaku-chroma
# Install the ComfyUI node
cd ComfyUI/custom_nodes
git clone https://github.com/spooknik/comfyui-nunchaku-chroma.git
# Restart ComfyUI
The following nodes will be available:
- Nunchaku Chroma DiT Loader - Load quantized Chroma models
- Nunchaku Chroma LoRA Loader - Apply a single LoRA
- Nunchaku Chroma LoRA Stack - Apply multiple LoRAs at once
Supported LoRA Formats
- ComfyUI/Kohya format:
lora_unet_double_blocks_*,lora_unet_single_blocks_* - Diffusers format:
transformer_blocks.*.lora_A.weight, etc.
License
Apache-2.0
Metadata
Release files for nunchaku-chroma 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nunchaku_chroma-0.1.3.tar.gz | 32.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nunchaku_chroma-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 67.9 kB
Release files / nunchaku_chroma-0.1.3.tar.gz
| Download URL | nunchaku_chroma-0.1.3.tar.gz |
|---|---|
| Size | 32.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53b7a415a1bff6326014ccc80de5e0ceef2cebbd2a0e4cfa76e9f58a6133b55f
|
|
BLAKE2b-256 checksum How to use checksums |
d62659a82ed180ebab905aeb3cbdb7391bf78ec17e427e9aad4780c9d3fbe81d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 8, 2025.
Transparency logRelease files / nunchaku_chroma-0.1.3-py3-none-any.whl
| Download URL | nunchaku_chroma-0.1.3-py3-none-any.whl |
|---|---|
| Size | 35.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d6648e540a8fb811a2e7074baa2ecb09d5a866814318597d07870c64cc6f80b1
|
|
BLAKE2b-256 checksum How to use checksums |
08429d2cf3f280cc423d1fd0d1c94d63616a83754d415971435566c69f5b0407
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 8, 2025.
Transparency log