lllyasviel / ControlNet

Let us control diffusion models!
Apache License 2.0
30.72k stars 2.76k forks source link

OOM for high resolution image #241

Open jingyangcarl opened 1 year ago

jingyangcarl commented 1 year ago

awesome work!!

I'm testing the pipeline for high-resolution images (2048*2048), which takes 128G GPU. Any suggestions on how to make it work for high-resolution inputs? Thanks!

RuntimeError: CUDA out of memory. Tried to allocate 128.00 GiB (GPU 0; 47.52 GiB total capacity; 5.77 GiB already allocated; 38.53 GiB free; 7.01 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

geroldmeisinger commented 1 year ago

all duplicate concerning "RAM and out of memory exceptions (OOM)": https://github.com/lllyasviel/ControlNet/issues/21 https://github.com/lllyasviel/ControlNet/issues/33 https://github.com/lllyasviel/ControlNet/issues/191 https://github.com/lllyasviel/ControlNet/issues/236 https://github.com/lllyasviel/ControlNet/issues/241 https://github.com/lllyasviel/ControlNet/issues/247 https://github.com/lllyasviel/ControlNet/issues/294 https://github.com/lllyasviel/ControlNet/issues/301

codeundercoverdev commented 1 year ago

all duplicate concerning "RAM and out of memory exceptions (OOM)": #21 #33 #191 #236 #241 #247 #294 #301

You comment this on every issue which stops people from responding but there's no working solution as evidenced by the fact people keep making new issues