The initialization looks correct to me.

self.pix2pix_model_on_one_gpu = self.pix2pix_model.module

Question: why retrieving the local model from DDP model?

It will stop after Every 13 epoches by two gpus.

You mean the program crashes without any error message? How did you launch the two DDP processes?