1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-10-24 20:59:27 +03:00

fix kvae gradient checkpointing tests

This commit is contained in:
sayakpaul
2026-06-04 14:12:51 +05:30
parent 6a43fb6e8a
commit 52ecdb07eb

View File

@@ -97,6 +97,9 @@ class TestAutoencoderKLKVAEVideoTraining(AutoencoderKLKVAEVideoTesterConfig, Tra
def test_training_with_ema(self):
_run_nondeterministic(super().test_training_with_ema)
def test_mixed_precision_training(self):
_run_nondeterministic(super().test_mixed_precision_training)
@pytest.mark.skip(
"Gradient checkpointing recomputes the forward pass, but the model uses a stateful cache_dict "
"that is mutated during the first forward. On recomputation the cache is already populated, "
@@ -105,13 +108,13 @@ class TestAutoencoderKLKVAEVideoTraining(AutoencoderKLKVAEVideoTesterConfig, Tra
def test_gradient_checkpointing_equivalence(self):
super().test_gradient_checkpointing_equivalence()
def test_layerwise_casting_training(self):
_run_nondeterministic(super().test_layerwise_casting_training)
class TestAutoencoderKLKVAEVideoMemory(AutoencoderKLKVAEVideoTesterConfig, MemoryTesterMixin):
"""Memory optimization tests for AutoencoderKLKVAEVideo."""
def test_layerwise_casting_training(self):
_run_nondeterministic(super().test_layerwise_casting_training)
class TestAutoencoderKLKVAEVideoSlicingTiling(AutoencoderKLKVAEVideoTesterConfig, NewAutoencoderTesterMixin):
"""Slicing and tiling tests for AutoencoderKLKVAEVideo."""