How to use from the
Use from the
DiffusionKit library
# Pipeline for Flux
from diffusionkit.mlx import FluxPipeline

pipeline = FluxPipeline(
  shift=1.0,
  model_version=argmaxinc/mlx-FLUX.1-schnell-4bit-quantized,
  low_memory_mode=True,
  a16=True,
  w16=True,
)
# Image Generation
HEIGHT = 512
WIDTH = 512
NUM_STEPS = 4
CFG_WEIGHT = 0

image, _ = pipeline.generate_image(
  "a photo of a cat",
  cfg_weight=CFG_WEIGHT,
  num_steps=NUM_STEPS,
  latent_size=(HEIGHT // 8, WIDTH // 8),
)

FLUX.1-schnell on DiffusionKit MLX!

Check out the original model!

Check out the DiffusionKit github repository!

FLUX.1 [schnell] Grid Note: This checkpoint features 4-bit quantization of the mmdit module using MLX's nn.quantize function with default settings (group_size=64).

Usage

  • Create conda environment

conda create -n diffusionkit python=3.11 -y
conda activate diffusionkit
pip install diffusionkit
  • Run the cli command

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
Downloads last month
10,646
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 1 Ask for provider support

Collection including argmaxinc/mlx-FLUX.1-schnell-4bit-quantized