Add AoTI compilation with LoRA hotswap

#4
by multimodalart HF Staff - opened

AoTI-compile the Krea2TransformerBlock for a ~2-3x speedup, keeping dynamic LoRA loading. The block is served from a prebuilt .pt2 (kernels only, no weights) with one rank-64 LoRA hotswap slot (diffusers #9453): built-in and custom LoRAs swap into that slot with no recompilation, and the scale slider is folded into the re-supplied constants. The single slot replaces the multi-adapter preload (AoTI captures one adapter graph). UI is unchanged.

Artifact: public dataset multimodalart/krea2-aoti-kernels. If it's missing the Space falls back to eager, so this is safe to merge as-is.

requirements.txt is unchanged (already has peft + git diffusers).

AP123 changed pull request status to merged

Sign up or log in to comment