diffusers / FLUX.1-dev-bnb-4bit

huggingface.co
Total runs: 828
24-hour runs: 0
7-day runs: 0
30-day runs: 366
Model's Last Updated: May 20 2025
text-to-image

Introduction of FLUX.1-dev-bnb-4bit

Model Details of FLUX.1-dev-bnb-4bit

Visual comparison of Flux-dev model outputs using BF16 and BnB 8-bit quantization

BF16
Flux-dev output with BF16: Baroque, Futurist, Noir styles BnB 4-bit
Flux-dev output with BnB 4-bit: Baroque, Futurist, Noir styles

Usage with Diffusers

To use this quantized FLUX.1 [dev] checkpoint, you need to install the 🧨 diffusers and bitsandbytes library:

pip install -U diffusers
pip install -U bitsandbytes

After installing the required library, you can run the following script:

from diffusers import FluxPipeline

pipe = FluxPipeline.from_pretrained(
    "diffusers/FLUX.1-dev-bnb-4bit",
    torch_dtype=torch.bfloat16
)
pipe.to("cuda")

prompt = "Baroque style, a lavish palace interior with ornate gilded ceilings, intricate tapestries, and dramatic lighting over a grand staircase."

pipe_kwargs = {
    "prompt": prompt,
    "height": 1024,
    "width": 1024,
    "guidance_scale": 3.5,
    "num_inference_steps": 50,
    "max_sequence_length": 512,
}

image = pipe(
    **pipe_kwargs, generator=torch.manual_seed(0),
).images[0]

image.save("flux.png")

How to generate this quantized checkpoint ?

This checkpoint was created with the following script using "black-forest-labs/FLUX.1-dev" checkpoint:


import torch
from diffusers import FluxPipeline
from diffusers import BitsAndBytesConfig as DiffusersBitsAndBytesConfig
from diffusers.quantizers import PipelineQuantizationConfig
from transformers import BitsAndBytesConfig as TransformersBitsAndBytesConfig

pipeline_quant_config = PipelineQuantizationConfig(
    quant_mapping={
        "transformer": DiffusersBitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4", bnb_4bit_compute_dtype=torch.bfloat16),
        "text_encoder_2": TransformersBitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4", bnb_4bit_compute_dtype=torch.bfloat16),
    }
)

pipe = FluxPipeline.from_pretrained(
    "black-forest-labs/FLUX.1-dev",
    quantization_config=pipeline_quant_config,
    torch_dtype=torch.bfloat16
)

pipe.save_pretrained("FLUX.1-dev-bnb-4bit")

Runs of diffusers FLUX.1-dev-bnb-4bit on huggingface.co

828
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
366
30-day runs

More Information About FLUX.1-dev-bnb-4bit huggingface.co Model

FLUX.1-dev-bnb-4bit huggingface.co

FLUX.1-dev-bnb-4bit huggingface.co is an AI model on huggingface.co that provides FLUX.1-dev-bnb-4bit's model effect (), which can be used instantly with this diffusers FLUX.1-dev-bnb-4bit model. huggingface.co supports a free trial of the FLUX.1-dev-bnb-4bit model, and also provides paid use of the FLUX.1-dev-bnb-4bit. Support call FLUX.1-dev-bnb-4bit model through api, including Node.js, Python, http.

FLUX.1-dev-bnb-4bit huggingface.co Url

https://huggingface.co/diffusers/FLUX.1-dev-bnb-4bit

diffusers FLUX.1-dev-bnb-4bit online free

FLUX.1-dev-bnb-4bit huggingface.co is an online trial and call api platform, which integrates FLUX.1-dev-bnb-4bit's modeling effects, including api services, and provides a free online trial of FLUX.1-dev-bnb-4bit, you can try FLUX.1-dev-bnb-4bit online for free by clicking the link below.

diffusers FLUX.1-dev-bnb-4bit online free url in huggingface.co:

https://huggingface.co/diffusers/FLUX.1-dev-bnb-4bit

FLUX.1-dev-bnb-4bit install

FLUX.1-dev-bnb-4bit is an open source model from GitHub that offers a free installation service, and any user can find FLUX.1-dev-bnb-4bit on GitHub to install. At the same time, huggingface.co provides the effect of FLUX.1-dev-bnb-4bit install, users can directly use FLUX.1-dev-bnb-4bit installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

FLUX.1-dev-bnb-4bit install url in huggingface.co:

https://huggingface.co/diffusers/FLUX.1-dev-bnb-4bit

Url of FLUX.1-dev-bnb-4bit

FLUX.1-dev-bnb-4bit huggingface.co Url

Provider of FLUX.1-dev-bnb-4bit huggingface.co

diffusers
ORGANIZATIONS

Other API from diffusers

huggingface.co

Total runs: 46.7K
Run Growth: 0
Growth Rate: 0.00%
Updated:October 22 2024
huggingface.co

Total runs: 2.8K
Run Growth: -140
Growth Rate: -5.01%
Updated:February 08 2023
huggingface.co

Total runs: 645
Run Growth: 125
Growth Rate: 19.38%
Updated:February 24 2025
huggingface.co

Total runs: 33
Run Growth: 31
Growth Rate: 93.94%
Updated:January 27 2023
huggingface.co

Total runs: 11
Run Growth: 1
Growth Rate: 9.09%
Updated:February 07 2024