huggingface / huggingface/diffusers
Flux Inference memory optimisation by pre-computing modulation parameters ahead of time
Aperta
stale
- Lingua principale
- Python
- Stelle
- 34.5k
- Fork
- 7.3k
- Merge medio
- 3g 3h
- PR unite (30g)
- 91
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.