TencentARC / PhotoMaker

PhotoMaker
https://photo-maker.github.io/
Other
8.63k stars 676 forks source link

Spend Too Many VRAM #67

Open hiliuxg opened 5 months ago

hiliuxg commented 5 months ago

I use demo "https://github.com/TencentARC/PhotoMaker/blob/main/photomaker_style_demo.ipynb " in google colab, and use v100 16G vram, but it throw exception :

1705577717727

how can i fix it, only increase more vram ?

colab : https://colab.research.google.com/drive/1HeFBI2O3dcQtVPC-uQnBWc0eOI_305lZ#scrollTo=6lSum6Zk_J-Z

Paper99 commented 5 months ago

For those GPUs that do not support bfloat16, please change this line to torch_dtype = torch.float16, the speed will be greatly improved (1min/img (before) vs. 14s/img (after)). The minimum GPU memory requirement for PhotoMaker is 15G.