Instructions to use rockerBOO/flux.1-krea-dev-convrot-int8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use rockerBOO/flux.1-krea-dev-convrot-int8 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("rockerBOO/flux.1-krea-dev-convrot-int8", 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
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("rockerBOO/flux.1-krea-dev-convrot-int8", dtype=torch.bfloat16, device_map="cuda")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]FLUX.1 Krea [dev] (INT8 ConvRot)
INT8 (row-wise, ConvRot) quantized version of black-forest-labs/FLUX.1-Krea-dev, a text-to-image model co-developed by Black Forest Labs and Krea, built on the FLUX.1 [dev] architecture.
Files
| File | Size | Source |
|---|---|---|
flux1-krea-dev-int8convrot.safetensors |
13.2 GiB (14.1 GB) | flux1-krea-dev.safetensors (22.2 GiB / 23.8 GB) |
Only the transformer/DiT checkpoint is quantized here β text encoders (CLIP-L, T5-XXL) and VAE are not included in this repo and should be loaded from the upstream repo as usual.
Requirements
Unlike NVFP4/MXFP8, INT8 row-wise quantization runs on any CUDA GPU β no Blackwell required. ConvRot (Hadamard rotation) improves quantization quality at row-wise granularity and needs Triton for its inference kernels.
Load with ComfyUI (or any loader supporting .comfy_quant metadata for INT8 row-wise + ConvRot
weights) as a diffusion model checkpoint.
Quantization method
Quantized with the convert-to-quant (ctq) CLI tool using INT8 row-wise quantization with
ConvRot (group-wise Hadamard rotation, group size 256) and Comfy-quant format. The --flux2
exclusion filter was reused here since its layer-name patterns (guidance_in, time_in, img_in,
txt_in, final_layer) happen to match FLUX.1's naming too, keeping those layers high-precision.
--exclude-layers was added on top to also keep the per-block modulation linears
(img_mod/txt_mod in the double blocks) high-precision, since FLUX.2's stream_modulation
key pattern doesn't match FLUX.1's img_mod.lin/txt_mod.lin naming.
Steps
- Download the checkpoint (single file, no sharding):
hf download black-forest-labs/FLUX.1-Krea-dev flux1-krea-dev.safetensors - Quantize directly:
uv run --with convert-to-quant --with triton --with safetensors --with tqdm --with numpy ctq \ -i flux1-krea-dev.safetensors \ -o flux1-krea-dev-int8convrot.safetensors \ --int8 --scaling_mode row --convrot --flux2 --exclude-layers 'img_mod|txt_mod' \ --comfy_quant --save-quant-metadata --simple --low-memory - Delete the raw bf16 file, keeping only the quantized output.
flux1-krea-dev-int8convrot.safetensors: 1316 tensors, 268 layers quantized to INT8 row-wise +
ConvRot (verified via the _quantization_metadata header) across all 19 double blocks and 38
single blocks. High-precision (unquantized) layers: img_mod/txt_mod (double blocks),
guidance_in, time_in, img_in, txt_in, final_layer.
Flags used:
--int8β INT8 quantization instead of FP8--scaling_mode rowβ per-row scale factors (required for ConvRot)--convrotβ group-wise Hadamard rotation (group size 256, default) to reduce INT8 quantization error--flux2β exclusion filter; its key patterns (guidance_in,time_in,img_in,txt_in,final_layer) happen to match this FLUX.1-based checkpoint's layer names--exclude-layers 'img_mod|txt_mod'β additionally keep per-block modulation linears high-precision--comfy_quantβ Comfy quantization tensor/metadata format--simpleβ skip SVD optimization, use simple quantization--save-quant-metadataβ embed_quantization_metadatain the safetensors header--low-memoryβ stream tensors during quantization to reduce RAM usage
License
FLUX.1 [dev] Non-Commercial License (included in this repo), inherited from black-forest-labs/FLUX.1-Krea-dev / black-forest-labs/FLUX.1-dev.
Non-commercial use only β see the license for full terms, including restrictions on commercial use, Distribution requirements, and the required Attribution Notice.
- Downloads last month
- 11
Model tree for rockerBOO/flux.1-krea-dev-convrot-int8
Base model
black-forest-labs/FLUX.1-dev