One possibility is

use the new_group 24 API in torch.distributed to create a different process group for two different models,
Create different DistributedDataParallel instances, one for each wrapper and pass the process group object explicitly to DistributedDataParallel constructor (process_group arg 9) instead of using the default one.

In this way, DistributedDataParallel’s allreduce operations will not collide.