TimesXY / Cold-SegDiffusion

4 stars 0 forks source link

Multiple GPU training. #1

Closed iwcyou closed 3 months ago

iwcyou commented 3 months ago

I saw you use 4 GPUs in your training process. But there isn't mutiple GPU training code in your drive.py file. When I run python drive.py the arg of num_processes is "1". And the use of accelerate is prepared for 1 process. I don't know which args I missed. What should I do can implement multiple GPU training, please.

TimesXY commented 3 months ago

This can be done by adding simple code as follows: diffusion.model = torch.nn.DataParallel(diffusion.model, device_ids=[0, 1, 2, 3])

iwcyou commented 3 months ago

This can be done by adding simple code as follows: diffusion.model = torch.nn.DataParallel(diffusion.model, device_ids=[0, 1, 2, 3])

Thank you. You are such a good persion.