I would like to test the Paper TEXTure locally at my place. I have successfully installed all libraries and would like to test the examples. I am using Windows, a RTX 3060 TI, CUDA 11.6 and PyTorch 1.12.1. When running I get the error:
RuntimeError: CUDA is out of memory. Trying to allocate 86.00 MiB (GPU 0; 8.00 GiB total capacity; 7.19 GiB already allocated; 0 bytes free; 7.31 GiB total reserved by PyTorch) If reserved memory >> allocated memory, try setting max_split_size_mb to avoid fragmentation. See the documentation for memory management and PYTORCH_CUDA_ALLOC_CONF.
This is triggered at this point:
self.inpaint_unet = UNet2DConditionModel.from_pretrained("stabilityai/stable-diffusion-2-inpainting", subfolder="unet", use_auth_token=self.token, batch_size=1).to(self.device)
So far I have tried to set this flag with values down to 128:
set 'PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:512'
Also, in the parameters of the method I tried to set the batch size to 1.
Does anyone have another idea I can try?