diffusers / FLUX.1-dev-torchao-int8

huggingface.co
Total runs: 152
24-hour runs: 0
7-day runs: 2
30-day runs: 50
Model's Last Updated: May 21 2025
text-to-image

Introduction of FLUX.1-dev-torchao-int8

Model Details of FLUX.1-dev-torchao-int8

Visual comparison of Flux-dev model outputs using BF16 and torchao int8_weight_only quantization

BF16
Flux-dev output with BF16: Baroque, Futurist, Noir styles torchao int8_weight_only
torchao int8_weight_only Output

Usage with Diffusers

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

pip install -U diffusers
pip install -U torchao

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

from diffusers import FluxPipeline

pipe = FluxPipeline.from_pretrained(
    "diffusers/FLUX.1-dev-torchao-int8",
    torch_dtype=torch.bfloat16,
    use_safetensors=False,
    device_map="balanced"
)

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.quantizers import PipelineQuantizationConfig
from diffusers import TorchAoConfig as DiffusersTorchAoConfig
from transformers import TorchAoConfig as TransformersTorchAoConfig

pipeline_quant_config = PipelineQuantizationConfig(
    quant_mapping={
        "transformer": DiffusersTorchAoConfig("int8_weight_only"),
        "text_encoder_2": TransformersTorchAoConfig("int8_weight_only"),
    }
)

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

# safe_serialization set to `False` as we can't save torchao quantized model to safetensors format
pipe.save_pretrained("FLUX.1-dev-torchao-int8", safe_serialization=False)

Runs of diffusers FLUX.1-dev-torchao-int8 on huggingface.co

152
Total runs
0
24-hour runs
0
3-day runs
2
7-day runs
50
30-day runs

More Information About FLUX.1-dev-torchao-int8 huggingface.co Model

FLUX.1-dev-torchao-int8 huggingface.co

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

FLUX.1-dev-torchao-int8 huggingface.co Url

https://huggingface.co/diffusers/FLUX.1-dev-torchao-int8

diffusers FLUX.1-dev-torchao-int8 online free

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

diffusers FLUX.1-dev-torchao-int8 online free url in huggingface.co:

https://huggingface.co/diffusers/FLUX.1-dev-torchao-int8

FLUX.1-dev-torchao-int8 install

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

FLUX.1-dev-torchao-int8 install url in huggingface.co:

https://huggingface.co/diffusers/FLUX.1-dev-torchao-int8

Url of FLUX.1-dev-torchao-int8

FLUX.1-dev-torchao-int8 huggingface.co Url

Provider of FLUX.1-dev-torchao-int8 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.6K
Run Growth: 145
Growth Rate: 5.59%
Updated:February 08 2023
huggingface.co

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

Total runs: 25
Run Growth: 8
Growth Rate: 32.00%
Updated:January 27 2023
huggingface.co

Total runs: 10
Run Growth: 2
Growth Rate: 20.00%
Updated:February 07 2024