huggingface / huggingface/diffusers

Flux Inference memory optimisation by pre-computing modulation parameters ahead of time

Offen
#9,197 3 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
stale
Vorherrschende Sprache
Python
Sterne
34.5k
Forks
7.3k
Ø Merge
3 T. 3 Std.
Gemergte PRs (30 T.)
91

Beschreibung

DiffusionKit has an excellent memory optimisation for Flux where it calculates modulation parameters ahead of time
then offloads the adaLN_modulation parameters which for fp16 saves ~ 6.5 GB peak memory usage during inference.

https://github.com/argmaxinc/DiffusionKit/pull/15/

It would be nice if a similar change could be made to Diffusers.

It's especially useful for MPS users who are getting left behind with the current trend using quantisation to reduce memory usage rather than optimisation and for whom CPU offloading is not a thing.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

No Diffusers files or tests are named. Start by reading the linked DiffusionKit pull request, then locate the Flux inference and modulation-parameter handling in Diffusers. Done means achieving the analogous precomputation and offloading memory reduction while preserving inference behavior, including for MPS users.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python, pytorch
Bereich
machine-learning, performance
Issue-Typ
Refactoring
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
38/100

Neue Issues direkt in Ihr Postfach

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