[Tests] clean up and refactor gradient checkpointing tests by sayakpaul · Pull Request #9494 · huggingface/diffusers (original) (raw)

What does this PR do?

Gradient checkpointing is an essential component of model training. We need to ensure it's implemented properly.

If we had them implemented properly we could have avoided the fix from #9489 beforehand. Another related issue: #9496.

Additionally, I took the liberty of properly skipping the related tests with "unittest.skip". This way, we know that tests are being actually skipped.