generative-models icon indicating copy to clipboard operation
generative-models copied to clipboard

Enabling Multi-GPU in SVD

Open Benjamin-So opened this issue 1 year ago • 1 comments

Hello, thank you for providing this open source model!

I'm attempting to run the Stable Video Diffusion using the simple_video.py script. I'm running this with the following arguments. --version svd --input_path data/robot_images --image_size 512

But I'm running into an out of memory error. I have two A100 GPU's available to me. Is there a way to enable multi-GPU? Thanks!

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 3.50 GiB (GPU 0; 31.74 GiB total capacity; 23.40 GiB already allocated; 1.92 GiB free; 29.42 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

Benjamin-So avatar Aug 11 '24 16:08 Benjamin-So

enable two gpu is not easy, you can look https://pytorch.org/tutorials/intermediate/ddp_tutorial.html

LukeLIN-web avatar Nov 18 '24 02:11 LukeLIN-web