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.5k stars 296 forks source link

What does shortcut exactly do? #251

Open amelio-vazquez-reina opened 5 months ago

amelio-vazquez-reina commented 5 months ago

What is shortcut for?

I see it being used with ip-adapter-faceid-plusv2_sd15.bin as in this call:

ip_ckpt = "ip-adapter-faceid-plus_sd15.bin" if not v2 else "ip-adapter-faceid-plusv2_sd15.bin"

...

images = ip_model.generate(
     prompt=prompt, negative_prompt=negative_prompt, 
     face_image=face_image, faceid_embeds=faceid_embeds, shortcut=v2, s_scale=1.0,
     num_samples=4, width=512, height=768, num_inference_steps=30, seed=2023
)
xiaohu2015 commented 5 months ago

https://github.com/tencent-ailab/IP-Adapter/blob/main/ip_adapter/ip_adapter_faceid.py#L115