This is a
losslessly compressed
version of
black-forest-labs/FLUX.1-schnell
using our custom
DFloat11
format. The outputs of this compressed model are
bit-for-bit identical
to the original BFloat16 model, while reducing GPU memory consumption by approximately
30%
.
🔍 How It Works
DFloat11 compresses model weights using
Huffman coding
of BFloat16 exponent bits, combined with
hardware-aware algorithmic designs
that enable efficient on-the-fly decompression directly on the GPU. During inference, the weights remain compressed in GPU memory and are
decompressed just before matrix multiplications
, then
immediately discarded after use
to minimize memory footprint.
Key benefits:
No CPU decompression or host-device data transfer
--- all operations are handled entirely on the GPU.
DFloat11 is
much faster than CPU-offloading approaches
, enabling practical deployment in memory-constrained environments.
The compression is
fully lossless
, guaranteeing that the model’s outputs are
bit-for-bit identical
to those of the original model.
🔧 How to Use
Install the DFloat11 pip package
(installs the CUDA kernel automatically; requires a CUDA-compatible GPU and PyTorch installed)
:
pip install dfloat11[cuda12]
# or if you have CUDA version 11:# pip install dfloat11[cuda11]
To use the DFloat11 model, run the following example code in Python:
import torch
from diffusers import FluxPipeline
from dfloat11 import DFloat11Model
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16)
pipe.enable_model_cpu_offload()
DFloat11Model.from_pretrained('DFloat11/FLUX.1-schnell-DF11', device='cpu', bfloat16_model=pipe.transformer)
prompt = "A futuristic cityscape at sunset, with flying cars, neon lights, and reflective water canals"
image = pipe(
prompt,
guidance_scale=0.0,
num_inference_steps=4,
max_sequence_length=256,
generator=torch.Generator("cpu").manual_seed(0)
).images[0]
image.save("flux-schnell.png")
Runs of DFloat11 FLUX.1-schnell-DF11 on huggingface.co
1.5K
Total runs
185
24-hour runs
210
3-day runs
596
7-day runs
59
30-day runs
More Information About FLUX.1-schnell-DF11 huggingface.co Model
FLUX.1-schnell-DF11 huggingface.co
FLUX.1-schnell-DF11 huggingface.co is an AI model on huggingface.co that provides FLUX.1-schnell-DF11's model effect (), which can be used instantly with this DFloat11 FLUX.1-schnell-DF11 model. huggingface.co supports a free trial of the FLUX.1-schnell-DF11 model, and also provides paid use of the FLUX.1-schnell-DF11. Support call FLUX.1-schnell-DF11 model through api, including Node.js, Python, http.
FLUX.1-schnell-DF11 huggingface.co is an online trial and call api platform, which integrates FLUX.1-schnell-DF11's modeling effects, including api services, and provides a free online trial of FLUX.1-schnell-DF11, you can try FLUX.1-schnell-DF11 online for free by clicking the link below.
DFloat11 FLUX.1-schnell-DF11 online free url in huggingface.co:
FLUX.1-schnell-DF11 is an open source model from GitHub that offers a free installation service, and any user can find FLUX.1-schnell-DF11 on GitHub to install. At the same time, huggingface.co provides the effect of FLUX.1-schnell-DF11 install, users can directly use FLUX.1-schnell-DF11 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
FLUX.1-schnell-DF11 install url in huggingface.co: