How to use from the
Use from the
Diffusers library
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]

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

  1. Download the checkpoint (single file, no sharding):
    hf download black-forest-labs/FLUX.1-Krea-dev flux1-krea-dev.safetensors
    
  2. 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
    
  3. 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_metadata in 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
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for rockerBOO/flux.1-krea-dev-convrot-int8

Quantized
(11)
this model