tencent-ailab / IP-Adapter

The image prompt adapter is designed to enable a pretrained text-to-image diffusion model to generate images with image prompt.
Apache License 2.0
4.48k stars 293 forks source link

Bug in visualization_attnmap_faceid.ipynb #319

Open songyang86 opened 3 months ago

songyang86 commented 3 months ago

Dear xiaohu2015: when I run visualization_attnmap_faceid.ipynb, I meet a error,which is RuntimeError: stack expects a non-empty TensorList. I trace the code and I find the code in the file ,which is attn_maps = get_net_attn_map((768, 512)) ,have a problem. And in the utils.py , I find hasattr(module.processor, "attn_map") is not work, which make attn_maps is empty

Looking forward to your reply,Thanks

Qrteng commented 2 months ago

you can change the "USE_DAFAULT_ATTN" variable to true in ip_adapter/ip_adapter_faceid.py, this should solve the problem

songyang86 commented 2 months ago

Thanks,This problem has been solved