Would I be correct if I assume model (and model_ema as well) is a DistributedDataParallel instance? If so, the forward method of DistributedDataParallel will set some internal flags, which could cause hang.
If you just want to evaluate, you can use model.module to retrieve the original non-DDP module. And then clone, set eval(), run forward on the original non-DDP module. This should keep DDP states intact.