---
title: FLUX.1-schnell-mflux-4bit
canonical_url: "https://www.modelscope.cn/models/Jiangdi/FLUX.1-schnell-mflux-4bit"
md_url: "https://www.modelscope.cn/models/Jiangdi/FLUX.1-schnell-mflux-4bit.md"
repository: Jiangdi/FLUX.1-schnell-mflux-4bit
last_updated: 2025-12-09
license: apache-2.0
model_type:
  - flux-rectified-flow
parameters: 2.7B
tensor_type:
  - U32
  - BF16
library_name:
  - lora
  - safetensors
language:
  - en
downloads: 560
stars: 0
tags:
  - text-to-image
  - diffusion
  - mflux
---

# FLUX.1-schnell-mflux-4bit

> FLUX.1-schnell-mflux-4bit - Jiangdi 在 ModelScope 开源的模型。FLUX.1-schnell-mflux-v0.6.2-4bit

Jiangdi/FLUX.1-schnell-mflux-4bit 是 ModelScope 魔搭社区上的 2.7B 参数机器学习模型，采用 apache-2.0 许可。

- **Repository**: Jiangdi/FLUX.1-schnell-mflux-4bit
- **License**: apache-2.0
- **Parameters**: 2.7B
- **Tags**: text-to-image, diffusion, mflux
- **Downloads**: 560
- **Stars**: 0
- **Last updated**: 2025-12-09

Source: https://www.modelscope.cn/models/Jiangdi/FLUX.1-schnell-mflux-4bit

---

# FLUX.1-schnell-mflux-v0.6.2-4bit

[![Hugging Face](https://img.shields.io/badge/🤗%20Hugging%20Face-FLUX.1--schnell--mflux--v0.6.2--4bit-blue)](https://huggingface.co/black-forest-labs/FLUX.1-schnell)

![comparison_output](comparison.png)

A 4-bit quantized version of the [FLUX.1-schnell](https://huggingface.co/black-forest-labs/FLUX.1-schnell) text-to-image model from Black Forest Labs, implemented using the [mflux](https://github.com/filipstrand/mflux) (version 0.6.2) quantization approach.

## Overview

This repository contains a 4-bit quantized version of the FLUX.1-schnell model, which significantly reduces the memory footprint while maintaining most of the generation quality. The quantization was performed using the mflux methodology (v0.6.2).

### Original Model

FLUX.1-schnell is a lightweight text-to-image diffusion model developed by Black Forest Labs. It's designed to be faster and more efficient than many larger models while still producing high-quality images.

### Benefits of 4-bit Quantization

- **Reduced Memory Usage**: ~85% reduction in memory requirements compared to the original model
- **Faster Loading Times**: Smaller model size means quicker initialization
- **Lower Storage Requirements**: Significantly smaller disk footprint
- **Accessibility**: Can run on consumer hardware with limited VRAM

## Model Structure

This repository contains the following components:

- `text_encoder/`: CLIP text encoder (4-bit quantized)
- `text_encoder_2/`: Secondary text encoder (4-bit quantized)
- `tokenizer/`: CLIP tokenizer configuration and vocabulary
- `tokenizer_2/`: Secondary tokenizer configuration
- `transformer/`: Main diffusion model components (4-bit quantized)
- `vae/`: Variational autoencoder for image encoding/decoding (4-bit quantized)

## Usage

### Requirements

- Python 
- PyTorch 
- Transformers 
- Diffusers 
- [mflux](https://github.com/filipstrand/mflux) library (for 4-bit model support)

### Installation

```bash
pip install torch diffusers transformers accelerate
uv tool install mflux # check mflux README for more details
```

### Example Usage

```bash
# export path for mflux
% mflux-generate \        
    --path "dhairyashil/FLUX.1-schnell-mflux-v0.6.2-4bit" \        
    --model schnell \                                                                           
    --steps 2 \                                                                                 
    --seed 2 \       
    --height 1920 \
    --width 1024 \
    --prompt "hot chocolate dish"
```

### Comparison Output
The images generated from above prompt for different models are shown at the top.

fp16 and 8-bit results are visibly look almost the same but 4-bit result looks a little deviated.

[8-bit model](https://huggingface.co/dhairyashil/FLUX.1-schnell-mflux-v0.6.2-8bit) is available for comparison.

## Performance Comparison

| Model Version | Memory Usage | Inference Speed | Quality |
|---------------|--------------|-----------------|--------|
| Original FP16 | ~57 GB      | Base            | Base   |
| 4-bit Quantized | ~9 GB    | Slightly slower | Slightly reduced |

## Limitations

- Minor quality degradation compared to the original model
- Slightly slower inference speed
- May exhibit occasional artifacts not present in the original model

## Acknowledgements

- [Black Forest Labs](https://huggingface.co/black-forest-labs) for creating the original FLUX.1-schnell model
- [Filip Strand](https://github.com/filipstrand) for developing the mflux quantization methodology
- The Hugging Face team for their Diffusers and Transformers libraries

## License

This model inherits the license of the original FLUX.1-schnell model. Please refer to the [original model repository](https://huggingface.co/black-forest-labs/FLUX.1-schnell) for licensing information.
