mlx F L U X.1 schnell 4bit quantized

argmaxinc

Introduction

The MLX-FLUX.1-SCHNELL-4BIT-QUANTIZED model is a text-to-image diffusion model designed for detailed image generation. This model leverages the capabilities of the DiffusionKit library and supports 4-bit quantization, optimizing performance and resource efficiency.

Architecture

The MLX-FLUX.1-SCHNELL-4BIT-QUANTIZED model uses the DiffusionKit library for generating images based on text prompts. It incorporates a 4-bit quantization of the mmdit module, implemented using MLX's nn.quantize function with a default group size of 64. This approach helps in reducing the computational load while maintaining visual quality.

Training

While specific training details are not provided, the model is likely trained with optimization techniques suitable for diffusion models, ensuring high-quality image generation from text descriptions. The quantization process further refines the model to be more efficient during inference.

Guide: Running Locally

To run this model locally, follow these steps:

  1. Create a Conda Environment:

    conda create -n diffusionkit python=3.11 -y
    conda activate diffusionkit
    
  2. Install DiffusionKit:

    pip install diffusionkit
    
  3. Run the CLI Command: Use the following command to generate an image:

    diffusionkit-cli --prompt "detailed cinematic dof render of a \
    detailed MacBook Pro on a wooden desk in a dim room with items \
    around, messy dirty room. On the screen are the letters 'FLUX on \
    DiffusionKit' glowing softly. High detail hard surface render" \
    --model-version argmaxinc/mlx-FLUX.1-schnell-4bit-quantized \
    --height 768 \
    --width 1360 \
    --seed 1001 \
    --step 4 \
    --output ~/Desktop/flux_on_mac.png
    

For users who require additional computational power, utilizing cloud-based GPUs such as those offered by AWS, Google Cloud, or Azure is recommended.

License

The MLX-FLUX.1-SCHNELL-4BIT-QUANTIZED model is released under the Apache-2.0 License, allowing for broad use and distribution with standard attribution and liability conditions.

More Related APIs in Text To Image