Mikubill / sd-webui-controlnet

WebUI extension for ControlNet
GNU General Public License v3.0
16.96k stars 1.95k forks source link

Port new IPAdapter features from cubiq/ComfyUI_IPAdapter_plus #2700

Open huchenlei opened 6 months ago

huchenlei commented 6 months ago

cubiq released new version of ComfyUI ipadapter recently. He walked though the various updates in https://www.youtube.com/watch?v=_JzDcgKgghY. I noticed some features are very handy and should be ported here:

[DONE] CLIP mask, which allow CLIP encoder ignore part of image masked.

image image This is the example shown in the video. The face of the man is masked, so that generation result's face looks more like the woman.

[DONE] Unified loader

We should unify the preprocessor here as well.

Automatically load corresponding LoRA

For faceid models, corresponding LoRA should automatically get loaded

Negative embedding

Currently negative embedding is set to 0 in this extension

Noise option

Gives option to add some noise to the image before sending the image to CLIP

Tiled ipadapter

Better reuslt for non-square input/generation.

lhucklen commented 6 months ago

I too would like to see tiled adapter

StellarBeing25 commented 6 months ago

Please also add combine_embeds and weight_type settings. The combine_embeds set on "average" gives better results in Face IPAapters with multiple face image input, and the weight_type set on "ease in" gives better prompt following when generating full body portraits while using Face IPAdapters. 1 2

huchenlei commented 6 months ago

Please also add combine_embeds and weight_type settings. The combine_embeds set on "average" gives better results in Face IPAapters with multiple face image input, and the weight_type set on "ease in" gives better prompt following when generating full body portraits while using Face IPAdapters. 1 2

Currently multi-inputs to ip-adapter is already implemented as average embeds. See https://github.com/Mikubill/sd-webui-controlnet/blob/cc571f1425ac8eacf42a1c28a7eedb00d5e3a530/scripts/ipadapter/plugable_ipadapter.py#L126-L128

I will consider give option to support other combine methods.