win10下,torch.cuda.OutOfMemoryError: CUDA out of memory.
运行命令: python run_ootd.py --model_path D:/OOTDiffusion/run/examples/model/model_2.png --cloth_path D:/OOTDiffusion/run/examples/garment/00055_00.jpg --scale 2.0 --sample 4
在最后报: torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 3.75 GiB. GPU 0 has a total capacty of 23.99 GiB of which 1.12 GiB is free. Of the allocated memory 20.95 GiB is allocated by PyTorch, and 117.26 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
请问这个需要怎么调整?
https://github.com/levihsu/OOTDiffusion/issues/59#issuecomment-1965683568
可以试一下这个方法
os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "max_split_size_mb:128"
加上后,跑到最后还是报了这个
一样的报错,无法使用,作者看到的话希望能帮助下
把你的 --sample 4 换成 --sample 1 即可