























Posted September 8, 2025 by
We now cache torch.compile artifacts to reduce boot times for models that use PyTorch.
Models like black-forest-labs/flux-kontext-dev, prunaai/flux-schnell, and prunaai/flux.1-dev-lora now start 2-3x faster.
We’ve published a guide to improving model performance with torch.compile that covers more of the details.
Many models, particularly those in the FLUX family, apply various torch.compile technique/tricks to improve inference speed.
The first call to a compiled function traces and compiles the code, which adds overhead. Subsequent calls run the optimized code and are significantly faster.
By caching the compiled artifacts across model container lifecycles, we’ve seen dramatic improvements in cold boot times:
The cache also improves time from container startup to first prediction success across all models using torch.compile.

The caching system works like many CI/CD cache systems:
To learn more about how to use torch.compile, check out the our own
documentation and the
official PyTorch torch.compile tutorial.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。