跳到正文
Modal Blog· Will Shainin·· 2025-06-18AI 评分58

Modal 展示如何将 FLUX.1-dev 的运行速度提升三倍

Run FLUX.1-dev three times faster

AI 导读

Modal 的工程师们介绍了如何让 Black Forest Labs 的 FLUX.1-dev 作为自动扩缩容服务运行,速度提升约三倍,将 1024x1024 图像的生成时间从约 6.75 秒缩短到 3 秒以内。标准优化手段,即启用 max-autotune 的 Torch 编译器、融合 QKV 注意力和 channels-last 内存布局,带来了约 1.5 倍的提升;而基于 TEACache 论文、来自 ParaAttention 仓库的 First Block Caching 在阈值 0.12 下又额外带来了 2 倍的提升。编译缓存和 Modal Memory Snapshots 将冷启动延迟降低了 30 倍。

来源:Modal Blog · modal.com