GaParmar / img2img-turbo

One-step image-to-image with Stable Diffusion turbo: sketch2image, day2night, and more
MIT License
1.7k stars 192 forks source link

About The amount of GPU memory required for training on a paired dataset #31

Closed hannanyi closed 7 months ago

hannanyi commented 7 months ago

Hello! When I run train_pix2pix_turbo.py, I set the batchsize to 2. Is it normal that the GPU takes up 34g when running on the A6000? Because looking at your code, there are not many trainable parameters, and I don’t know why it takes up so many GPUs. thank you

GaParmar commented 7 months ago

Hi,

Thank you for your question. Even though the number of training parameters is low, the GPU memory requirement is high because we still need to compute and store the gradients throughout the network. I hope this answers your questions!

-Gaurav

hannanyi commented 7 months ago

Thank you for your answer, I understand now.