RuntimeError: MPS backend out of memory

#47
by zglu - opened

when I run CodeFormer on my MacBook Air (M1) using:
python3 inference_codeformer.py -w 0.7 --input_path /Users/zglu/CodeFormer/inputs/album3
, it works fine for the first 17 photos.
but starting from the 18th photo, it give me an error message:
RuntimeError: MPS backend out of memory (MPS allocated: 3.80 GB, other allocations: 4.75 GB, max allowed: 9.07 GB). Tried to allocate 1.34 GB on private pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

please help.
thanks!

Sign up or log in to comment