1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-10-27 21:33:02 +03:00
Files
diffusers/tests
Sayak Paul 58eb52c080 tests: fix CUDA OOM in VidTok slicing/tiling tests (#14554)
TestAutoencoderVidTokSlicingTiling overrode test_enable_disable_tiling and
test_enable_disable_slicing with copies that ran their three forward passes
outside torch.no_grad(). The retained autograd graphs pushed each test to a
10.9 GiB peak on a 14.74 GiB T4, so with any memory left over from earlier
files in the same xdist worker the class OOM'd -- taking
test_forward_with_norm_groups down with it.

The mixin already implements both tests correctly (no_grad, plus torch.allclose
for the disable-comparison instead of the `.all() == .all()` idiom the copies
used, which compares two booleans and always passes). Drop the overrides and
inherit them.

Peak memory on a T4, measured per test:

  before   10937.3 MiB
  after     1666.5 MiB

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-23 00:34:28 +05:30
..
2026-07-21 13:12:27 +05:30