RuntimeError: upsample_nearest_nhwc only supports output tensors with less than INT_MAX elements when decoding latents

这个报错通常发生在 Stable Diffusion 管线中,当 batch size(如 num_images_per_prompt )过大导致 VAE 解码 latent 时输出张量元素数量超过 INT_MAX 上限时触发。优先排查 batch size 是否过大,或尝试升级 xformers。


![[Bug]: DeepSeek-V4 NIXL failure returns corrupted reasoning with empty content](https://www.chat-gpts.plus/wp-content/uploads/2026/08/52276-70f6e8bd-768x403.jpg)





