~/talk

torch.compile and Diffusers: A Hands-On Guide to Peak Performance

links:none on file
slides:none on file

Shows how to use torch.compile with Diffusers to speed up diffusion models like Flux‑1‑Dev, including concrete configs: compile the Diffusion Transformer for ~1.5x inference speed on H100, use fullgraph=True to detect graph breaks, apply regional compilation to cut cold compile time ~7x (67s → 9.6s), mark tensors dynamic=True to avoid recompiles, and pair NF4 quantization plus CPU offload to drop memory from ~33GB to ~12.2GB; also explains LoRA hot‑swap patterns that avoid recompilation and reports a ~2.05x speed gain on Flux adapters.

AI-written summary · about

  1. 0:00Introduction to diffusers
  2. 3:58Understanding torch.compile
  3. 8:45Optimizing graph performance
  4. 13:44Regional compilation
  5. 15:29Feature integration
  6. 20:04Advanced features and testing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.