WeilunWang / semantic-diffusion-model

Official Implementation of Semantic Image Synthesis via Diffusion Models
218 stars 23 forks source link

Sorry, I have another question. How do I set up to run this code on a single GPU? #10

Open ZzzTD opened 1 year ago

YuRzbeta commented 1 year ago

Release comments in dist_util.py

os.environ["CUDA_VISIBLE_DEVICES"] = f"{MPI.COMM_WORLD.Get_rank() % GPUS_PER_NODE}"

os.environ["CUDA_VISIBLE_DEVICES"] = "4"

or change it like that:

os.environ["CUDA_VISIBLE_DEVICES"] = f"{MPI.COMM_WORLD.Get_rank() % GPUS_PER_NODE}"

os.environ["CUDA_VISIBLE_DEVICES"] = "0" # your available gpu id

Ontheroad123 commented 8 months ago

how to set on mutilple GPU, i set "os.environ["CUDA_VISIBLE_DEVICES"] = "1,2"" in dist_util.py, but still use single gpu