-
Stefy Lanza (nextime / spora ) authored
LongCatVideoPipeline's docstring says "This model inherits from [`DiffusionPipeline`]". The class declaration inherits nothing, so it has no enable_model_cpu_offload and no enable_sequential_cpu_offload. The guarded getattr found neither, logged a warning and fell through to pipe.to("cuda") — so every load put all three components on the card and the offload mode in the model config was decorative. That is the 45 GB ask against a 24 GB card. An INT8 DiT does not fix it on its own: 13.6 GB of DiT plus ~11.2 GB for the UMT5-XXL encoder (5.6B, stored fp32, loaded bf16) plus the VAE is ~25 GB before activations. But the encoder runs once, to encode the prompt, and is dead weight for every denoising step after. So offload now keeps it on the host and brings it over only for encode_prompt, set on the instance because all four generate_* methods call self.encode_prompt. The DiT and VAE stay resident, which leaves the loop — the part that has to be fast — on the card. It is moved back in a finally: stranding 11 GB after a failed encode would make the retry the thing that runs out of memory. 'sequential' is served as model offload and says so, rather than implying a deeper mode that upstream has no machinery for. Co-Authored-By:Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0185zEBiy3KWB37xNGSrxL7w
1d745ffd