jiwoogit / StyleID

[CVPR 2024 Highlight] Style Injection in Diffusion: A Training-free Approach for Adapting Large-scale Diffusion Models for Style Transfer
MIT License
168 stars 9 forks source link

Failing for higher resolution images #14

Open algoDd opened 1 month ago

algoDd commented 1 month ago

It works good with 512*512 images but when I use bigger images it fails can you please help?

Error:

CUDA out of memory. Tried to allocate 31.63 GiB. GPU 0 has a total capacity of 22.19 GiB of which 10.68 GiB is free. Process 23421 has 11.50 GiB memory in use. Of the allocated memory 10.68 GiB is allocated by PyTorch, and 527.53 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables) ❌❌❌❌❌❌❌❌Error in running Main image: (1624, 1624), Style image: (512, 512)❌❌❌❌❌❌❌

noname31337 commented 1 month ago

the error says to infer this task with higher resolution, you need 31.63gb of gram, but you have 22.19 gb, thus you might need to upgrade the hardward to make it work, or try quantify with float16 or even lower-precision options.