Compile and warm the pipeline
The worker compiles individual diffusion-transformer layers withtorch.compile(dynamic=True). Rotary embeddings and output RMS normalization also use compiled paths. The VAE decoder compiles separately and receives contiguous decode inputs.
TorchInductor and Triton keep compiler artifacts in runtime caches. Startup warmups exercise short and long diffusion shapes with two steps. VAE warmups cover 256 and 1,536 frames, tiled decoding at 4,500 frames, and a ten-second stereo encode. The decoder chunk size is 1,536 frames.
Generation pools keep model weights on the GPU with CPU offload and save-memory mode disabled. TF32 and high float32 matmul precision configure the matrix paths. The Base pool eagerly loads Demucs for separation.
Avoid repeated inference work
Cross-attention keys and values are prepared once and reused across diffusion steps. Windowed classifier-free guidance skips the unconditional half-batch outside its configured interval. The fast conditioning path avoids unused audio-code and cover preparation. Fast and Master use different step and guidance settings. Editing selects the model supported by the requested operation.Reuse source audio
These caches sit alongside GPU coordination. An adapter can remain loaded between jobs while the worker disables or restores it for the next operation.