Skip to content

Commit d6c87dc

Browse files
committed
docs: add chroma doc
1 parent a28d04d commit d6c87dc

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Inference of Stable Diffusion and Flux in pure C/C++
1414
- !!!The VAE in SDXL encounters NaN issues under FP16, but unfortunately, the ggml_conv_2d only operates under FP16. Hence, a parameter is needed to specify the VAE that has fixed the FP16 NaN issue. You can find it here: [SDXL VAE FP16 Fix](https://huggingface.co/madebyollin/sdxl-vae-fp16-fix/blob/main/sdxl_vae.safetensors).
1515
- [Flux-dev/Flux-schnell Support](./docs/flux.md)
1616
- [FLUX.1-Kontext-dev](./docs/kontext.md)
17+
- [Chroma](./docs/chroma.md)
1718
- [SD-Turbo](https://huggingface.co/stabilityai/sd-turbo) and [SDXL-Turbo](https://huggingface.co/stabilityai/sdxl-turbo) support
1819
- [PhotoMaker](https://github.com/TencentARC/PhotoMaker) support.
1920
- 16-bit, 32-bit float support
@@ -274,6 +275,9 @@ arguments:
274275
--control-net-cpu keep controlnet in cpu (for low vram)
275276
--canny apply canny preprocessor (edge detection)
276277
--color colors the logging tags according to level
278+
--chroma-disable-dit-mask disable dit mask for chroma
279+
--chroma-enable-t5-mask enable t5 mask for chroma
280+
--chroma-t5-mask-pad PAD_SIZE t5 mask pad size of chroma
277281
-v, --verbose print extra info
278282
```
279283

assets/flux/chroma_v40.png

539 KB
Loading

docs/chroma.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# How to Use
2+
3+
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.
4+
5+
## Download weights
6+
7+
- Download Chroma
8+
- If you don't want to do the conversion yourself, download the preconverted gguf model from [silveroxides/Chroma-GGUF](https://huggingface.co/silveroxides/Chroma-GGUF)
9+
- Otherwise, download chroma's safetensors from [lodestones/Chroma](https://huggingface.co/lodestones/Chroma)
10+
- Download vae from https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/ae.safetensors
11+
- Download t5xxl from https://huggingface.co/comfyanonymous/flux_text_encoders/blob/main/t5xxl_fp16.safetensors
12+
13+
## Convert Chroma weights
14+
15+
You can download the preconverted gguf weights from [silveroxides/Chroma-GGUF](https://huggingface.co/silveroxides/Chroma-GGUF), this way you don't have to do the conversion yourself.
16+
17+
```
18+
.\bin\Release\sd.exe -M convert -m ..\..\ComfyUI\models\unet\chroma-unlocked-v40.safetensors -o ..\models\chroma-unlocked-v40-q8_0.gguf -v --type q8_0
19+
```
20+
21+
## Run
22+
23+
### Example
24+
For example:
25+
26+
```
27+
.\bin\Release\sd.exe -diffusion-model ..\models\chroma-unlocked-v40-q8_0.gguf --vae ..\models\ae.sft --t5xxl ..\models\t5xxl_fp16.safetensors -p "a lovely cat holding a sign says 'chroma.cpp'" --cfg-scale 4.0 --sampling-method euler -v --chroma-disable-dit-mask
28+
```
29+
30+
![](../assets/flux/chroma_v40.png)
31+
32+
33+

0 commit comments

Comments
 (0)