huggingface / huggingface/diffusers

[Community] Rectified-CFG++ pipelines for SD3/3.5, Flux, Lumina 2, Qwen-Image, and Wan

Offen
#14,744 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
feature-request pipelines
Vorherrschende Sprache
Python
Sterne
34.5k
Forks
7.3k
Ø Merge
3 T. 3 Std.
Gemergte PRs (30 T.)
91

Beschreibung

### Feature request

Add community pipelines that sample rectified-flow models with Rectified-CFG++ (Saini, Gupta, Bovik; NeurIPS 2025): [paper](https://huggingface.co/papers/2510.07631), [reference implementation](https://github.com/shreshthsaini/Rectified-CFGpp).

Rectified-CFG++ is a training-free replacement for the classifier-free guidance extrapolation in flow samplers. Each ODE step becomes a predictor-corrector update: the predictor steps along the conditional velocity, the corrector evaluates the conditional and unconditional velocities at that predicted point, and the effective velocity is the conditional velocity at the current point plus the scaled corrector difference. High guidance scales keep prompt alignment without the over-saturation and structural artifacts of standard CFG. On SD3.5, Flux-dev, and Lumina-Image-2.0 the paper reports better FID, CLIP score, and ImageReward than CFG at the same number of steps.

### Why a community pipeline

The method needs a second model evaluation at the predicted point inside the step, so it does not fit the `guiders` API, which recombines predictions from a single evaluation. A community pipeline per backbone (generated from the upstream pipeline with only the denoising loop replaced) keeps everything else, LoRA, IP-Adapter, skip-layer guidance, callbacks, working unchanged. Happy to move to modular denoise blocks if maintainers prefer that route.

### Scope

Backbones from the paper: Stable Diffusion 3 / 3.5, Flux, Lumina-Image-2.0. Beyond the paper: Qwen-Image and Wan 2.1 / 2.2 (video), which use the same flow-matching sampling.

I am the first author of the paper. PR #14726 implements this; opening the issue for coordination as the contribution guide asks.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start by reviewing PR #14726 and the upstream pipelines it modifies; the issue identifies the denoising loop and guiders API as the relevant entry points. Compare the proposed community pipelines for SD3/3.5, Flux, Lumina 2, Qwen-Image, and Wan against the stated scope, with completion meaning Rectified-CFG++ sampling works across the listed backbones while existing LoRA, IP-Adapter, skip-layer guidance, and callbacks remain unchanged.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python, pytorch
Bereich
machine-learning
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
20/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.