Flow-Factory  by X-GenGroup

Reinforcement learning framework for generative AI

Created 3 months ago
323 stars

Top 84.2% on SourcePulse

GitHubView on GitHub
Project Summary

A unified framework for applying reinforcement learning (RL) to diffusion and flow-matching generative models, Flow-Factory targets researchers and practitioners in generative AI. It simplifies the integration of advanced RL techniques with state-of-the-art generative architectures, aiming to enhance model performance and control over generated content.

How It Works

The core design decouples generative models from RL algorithms, enabling flexible combinations of supported models (e.g., Stable Diffusion 3.5, FLUX, Qwen-Image) with RL algorithms (GRPO, AWM, etc.). This modularity allows users to easily swap components. The framework also integrates experimental support for multiple attention backends (flash, xformers) via diffusers, aiming to optimize memory usage and inference speed.

Quick Start & Requirements

Installation involves cloning the repository and running pip install -e .. Optional dependencies for distributed training (deepspeed), experiment tracking (wandb, swanlab), and optimized attention kernels (kernels) can be installed via extended package lists (e.g., pip install -e .[deepspeed]). A quick start example demonstrates training with ff-train examples/grpo/lora/flux1.yaml.

Highlighted Details

  • Supports a broad spectrum of models for Text-to-Image, Text-to-Video, Image-to-Image, and Video-to-Video tasks.
  • Implements key RL algorithms including GRPO, GRPO-Guard, DiffusionNFT, and AWM.
  • Features a robust reward model system with built-in options like PickScore and CLIP, alongside support for custom reward implementations.
  • Offers experimental attention backend optimization (flash, xformers) for performance tuning.

Maintenance & Community

Information regarding notable contributors, sponsorships, community channels (e.g., Discord/Slack), or a project roadmap is not provided in the available documentation.

Licensing & Compatibility

The specific license type and any associated compatibility notes for commercial use or closed-source linking are not detailed in the provided documentation.

Limitations & Caveats

The README notes the attention backend support as "experimental," suggesting potential instability or ongoing development in this area. No other explicit limitations or known issues were detailed.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
41
Issues (30d)
19
Star History
97 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.