stable-diffusion.cpp/docs/models/chroma.md

4 KiB

Chroma

Chroma generates images from text using T5-XXL and the FLUX.1 VAE.

You can run Chroma using stable-diffusion.cpp with a GPU that has 6GB or even 4GB of VRAM, without needing to offload to RAM.

Model files

Component Weights and downloads CLI option Requirement
Chroma If you don't want to do the conversion yourself, download the preconverted gguf model from silveroxides/Chroma-GGUF
Otherwise, download chroma's safetensors from lodestones/Chroma
--diffusion-model Required
vae vae from Download --vae Use matching VAE
t5xxl t5xxl from Download --t5xxl Required

Optional conversion

Run executable conversion examples from the build directory using the shared path and shell conventions.

Convert Chroma weights

You can download the preconverted gguf weights from silveroxides/Chroma-GGUF, this way you don't have to do the conversion yourself.

Windows (PowerShell)

.\bin\Release\sd-cli.exe `
  -M convert `
  -m ..\models\unet\chroma-unlocked-v40.safetensors `
  --type q8_0 `
  -o ..\models\diffusion_models\chroma-unlocked-v40-q8_0.gguf `
  -v

Linux/macOS

./bin/sd-cli \
  -M convert \
  -m ../models/unet/chroma-unlocked-v40.safetensors \
  --type q8_0 \
  -o ../models/diffusion_models/chroma-unlocked-v40-q8_0.gguf \
  -v

Usage

Web UI

Follow the Web UI guide to start the server, then select the recipe matching your weights. Fill the component slots below and click Load models. Use the files and compatibility requirements in Model files.

Recipe Component slots
Chroma (chroma) diffusion_model, t5xxl, vae, tae

Slot IDs correspond to CLI component options: diffusion_model uses --diffusion-model, llm uses --llm, and model uses -m / --model. Select optional components when required by your checkpoint or task.

DGL

Example Description
Text to image Chroma Unlocked v40.

Run a script

Edit paths, prompts and settings in the script's var block, then run from the build directory. Paths inside the script resolve from the working directory.

Windows (PowerShell)

.\bin\Release\sd-cli.exe -M dgl --script ..\docs\dgl\chroma\chroma-unlocked-v40-txt2img.dgl

Linux/macOS

./bin/sd-cli -M dgl --script ../docs/dgl/chroma/chroma-unlocked-v40-txt2img.dgl

Choose another script from the table to run a different task. Add --check to validate syntax and types without loading weights. See the shared run instructions for build paths and the server's file-access rules.

Legacy CLI

CLI examples use the shared path and shell conventions.

Example

For example:

Windows (PowerShell)

.\bin\Release\sd-cli.exe `
  --diffusion-model ..\models\diffusion_models\chroma-unlocked-v40-q8_0.gguf `
  --vae ..\models\vae\ae.sft `
  --t5xxl ..\models\text_encoders\t5xxl_fp16.safetensors `
  --model-args chroma_use_dit_mask=false `
  -p "a lovely cat holding a sign says 'chroma.cpp'" `
  --cfg-scale 4.0 `
  --sampling-method euler `
  --clip-on-cpu `
  -v

Linux/macOS

./bin/sd-cli \
  --diffusion-model ../models/diffusion_models/chroma-unlocked-v40-q8_0.gguf \
  --vae ../models/vae/ae.sft \
  --t5xxl ../models/text_encoders/t5xxl_fp16.safetensors \
  --model-args chroma_use_dit_mask=false \
  -p "a lovely cat holding a sign says 'chroma.cpp'" \
  --cfg-scale 4.0 \
  --sampling-method euler \
  --clip-on-cpu \
  -v