4 bit (UINT4 with SVD rank 32) quantization of black-forest-labs/FLUX.1-Krea-dev using SDNQ.

Usage:

pip install git+https://github.com/Disty0/sdnq
import torch
import diffusers
from sdnq import SDNQConfig # import sdnq to register it into diffusers and transformers

pipe = diffusers.FluxPipeline.from_pretrained("Disty0/FLUX.1-Krea-dev-SDNQ-uint4-svd-r32", torch_dtype=torch.bfloat16)
pipe.enable_model_cpu_offload()

prompt = "A frog holding a sign that says hello world"
image = pipe(
    prompt,
    height=1024,
    width=1024,
    guidance_scale=4.5,
    generator=torch.manual_seed(0),
).images[0]
image.save("flux-krea-dev-sdnq-uint4-svd-r32.png.png")

Original BF16 vs SDNQ quantization comparison:

Quantization Model Size Visualization
Original BF16 23.8 GB Original BF16
SDNQ UINT4 6.8 GB SDNQ UINT4
Downloads last month
27
Safetensors
Model size
6B params
Tensor type
BF16
·
U8
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Disty0/FLUX.1-Krea-dev-SDNQ-uint4-svd-r32

Quantized
(11)
this model

Collection including Disty0/FLUX.1-Krea-dev-SDNQ-uint4-svd-r32