Stop rewriting RL glue for every new diffusion model
Flow-Factory decouples reinforcement-learning algorithms from diffusion and flow-matching models so you can fine-tune images, video, and audio-video generation with a config change instead of a rewrite.

What it does Flow-Factory is a training framework that wraps popular diffusion and flow-matching generators—FLUX, Stable Diffusion 3.5, Qwen-Image, Wan video models, and even LTX-2 audio-video—under one reinforcement-learning interface. You pick a model, pick an algorithm like GRPO or DPO, and the framework claims every combination works out of the box. It handles the dataset formatting, reward plumbing, and experiment tracking so you can focus on the actual policy optimization.
The interesting bit
The real win is the decoupling: models and algorithms are fully independent, meaning you don’t need a custom training script for each new architecture or RL method. The framework also abstracts away attention-backend swaps and bundles unreleased diffusers patches for bleeding-edge models like LTX-2, which suggests the maintainers are eating their own dogfood on the frontier.
Key highlights
- Supports eight RL algorithms including GRPO, DPO, DiffusionNFT, AWM, DGPO, and CRD, with model–algorithm pairs verified in example configs.
- Covers text-to-image, image-to-image, text-to-video, image-to-video, and synchronized audio-video generation across more than a dozen model families.
- Ships with a bundled
diffuserssubmodule for models whose pipeline code hasn’t landed in the official release yet. - Logs training samples and metrics to Weights & Biases, SwanLab, or TensorBoard without extra instrumentation.
- Provides guidance docs for adding new models and custom reward functions, plus a Docker image for CUDA training environments.
Caveats
- The attention-backend switching is marked experimental and leans on
diffusersinternals that may shift. - Some models require the bundled
diffuserssubmodule because upstream support is still pending.
Verdict Researchers and engineers who regularly fine-tune generative models with RL feedback should keep this on hand; if you only run occasional LoRA jobs with static datasets, it is probably overkill.
Frequently asked
- What is X-GenGroup/Flow-Factory?
- Flow-Factory decouples reinforcement-learning algorithms from diffusion and flow-matching models so you can fine-tune images, video, and audio-video generation with a config change instead of a rewrite.
- Is Flow-Factory open source?
- Yes — X-GenGroup/Flow-Factory is open source, released under the Apache-2.0 license.
- What language is Flow-Factory written in?
- X-GenGroup/Flow-Factory is primarily written in Python.
- How popular is Flow-Factory?
- X-GenGroup/Flow-Factory has 635 stars on GitHub.
- Where can I find Flow-Factory?
- X-GenGroup/Flow-Factory is on GitHub at https://github.com/X-GenGroup/Flow-Factory.