← All notes

Reducing diffusers memory: offloading, device_map, VAE slicing

Answer: Large diffusion models often exceed GPU memory; use more than one GPU, offload pipeline components to the CPU, or load in 4-bit.

Multiple GPUs

Offloading on one GPU

VAE

VAE slicing decodes one image at a time instead of all images in a batch at once. VAE tiling divides an image into smaller overlapping tiles.

Quantization

Load in 4-bit with bitsandbytes to use less memory.

Artifacts

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Hugging Face docs (huggingface/transformers, huggingface/huggingface_hub, huggingface/diffusers on GitHub), Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0). Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Hugging Face docs, Reduce memory usage, Apache-2.0 (huggingface docs repos); Hugging Face docs, Quickstart, Apache-2.0 (huggingface docs repos).

Cite this

Permanent ID: iil:note:0370mxxc

iinventedlight. 2026. "Reducing diffusers memory: offloading, device_map, VAE slicing." iinventedlight Library, iil:note:0370mxxc, version of 2026-11-09. https://iinventedlight.com/library/notes/hf-diffusers-memory/. License: CC-BY-4.0.

@misc{iil_note_0370mxxc,
  author = {{iinventedlight}},
  title = {{Reducing diffusers memory: offloading, device\_map, VAE slicing}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-09},
  url = {https://iinventedlight.com/library/notes/hf-diffusers-memory/},
  note = {Permanent ID iil:note:0370mxxc. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/hf-diffusers-memory.md.