Hmm, I unfortunately didn’t save the error. It might have been magma? It was an assert error and not an pytorch OOM error. I will come back or open a new issue if I manage to reproduce it (or when torch.cuda.memory_allocated before optmizier.step fixes the issue).