MGFlow / README.md
shy0423's picture
Show full example prompts and link joint checkpoint
61dc360 verified
|
Raw History Blame Contribute Delete
2.76 kB

A newer version of the Gradio SDK is available: 6.31.0

Upgrade
metadata
title: MGFlow
emoji: ⚡
colorFrom: gray
colorTo: blue
sdk: gradio
sdk_version: 6.29.0
app_file: app.py
short_description: SOTA one-step 512×512 generation with FLUX.2 [klein] 4B
python_version: '3.12'
startup_duration_timeout: 1h

MGFlow — 512×512 Text-to-Image in One Step

Demo of MGFlow (Unifying Distributional Training for One-Step Visual Generation), which post-trains FLUX.2 [klein] 4B into a 512×512 one-step generator (1 NFE, no classifier-free guidance) using Gaussian-mixture feature matching in frozen representation spaces.

This Space runs the released joint image–text checkpoint (Checkpoints/T2I/FLUX2-klein-4B_COCO-joint.pth), which achieves state-of-the-art GenEval (0.900) and PickScore (21.98) among one-step generators post-trained from FLUX.2 [klein] 4B, surpassing the original four-step model. Scores follow the paper's 512×512 evaluation protocol; PickScore uses 499 Pick-a-Pic prompts.

Paper · Code · Checkpoints · Project page

How it works

  • The generator is the FLUX.2 [klein] 4B transformer with MGFlow post-trained weights (1,000 steps, K=1+4 Gaussian-mixture branches, KL matching against SigLIP / MAE / Inception features).
  • Text conditioning uses the stock Qwen3 text encoder from black-forest-labs/FLUX.2-klein-4B (hidden states of layers 9, 18, 27 concatenated, 512-token context).
  • Sampling is one Euler step from pure noise (σ: 1 → 0), guidance off — matching the paper's evaluation protocol (NFE/CFG = 1/1).

Example prompts

  1. A fluffy orange cat sitting on a blue cushion, soft window light, simple background, realistic photography.
  2. A red ceramic mug on a light wooden table, soft morning light, clean background, product photography.
  3. A ripe peach on a white ceramic plate, pale pink background, soft studio lighting, still-life photography.
  4. A close-up portrait of a red panda, blurred green foliage, soft daylight, wildlife photography.
  5. A white lighthouse on a grassy coastal hill, calm blue sea, clear sky, watercolor illustration.
  6. A single oak tree on a gentle grassy hill, clear blue sky, warm afternoon light, simple watercolor illustration.

Licenses