-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support PuLID #2838
Support PuLID #2838
Conversation
Hi author, thanks for the amazing support! I am trying to follow your PuLID mode and padding/ orthogonal stuff in code, however, the author seems not illustrating this part in the paper? |
* Replace mask upload with effective region mask (#2830) * 📝 Update to version v1.1.446 (#2832) * 📝 Update to version v1.1.446 * update readme * Fix blur_gaussian slider param (#2834) * Support PuLID (#2838) * Add preprocessors * Fix resolution param * Fix various issues * Add PuLID attn * remove unused import * Resize img before passing to facexlib * safe unload * 📝 Update to version v1.1.447 (#2842) * 📝 Update to version v1.1.447 * update readme * Allow pulid accept multiple inputs (#2843) * Quick fix enum issue (#2844) * Move enum (#2845) * Move enums to enums.py * Add missing import * Remove unused import * Remove legacy test (#2846) * Quickfix Enum Issue 2 (#2849) * Drop external_code. prefix (#2850) * Drop external_code. prefix * Remove unused imports * fix test (#2851) * Adjust test template's threshold a/b value (#2852) * Validate ControlNetUnit using pydantic (#2847) * Add Pydantic ControlNetUnit Add test config Add images field Adjust image field handling fix various ui Fix most UI issues accept greyscale image/mask Fix infotext Fix preset Fix infotext nit Move infotext parsing test Remove preset Remove unused js code Adjust test payload By default disable unit refresh enum usage Align resize mode change test func name remove unused import nit Change default handling Skip bound check when not enabled Fix batch Various batch fix Disable batch hijack test adjust test fix test expectations Fix unit copy nit Fix test failures * Change script args back to ControlNetUnit for compatibility * import enum for compatibility * Fix unit test * simplify unfold * Add test coverage * handle directly set np image * re-enable batch test * Add back canvas scribble support * nit * Fix batch hijack test * 📝 Update to version v1.1.448 (#2853) * Update UI image (#2855) * Fix duplicated version logging (#2856)
EVA02_CLIP_L_336_psz14_s6B 放在哪个文件夹下面 |
EVA02_CLIP_L_336_psz14_s6B 哪里下载? |
@huchenlei Forge support please |
1 similar comment
@huchenlei Forge support please |
@huchenlei
|
+1, same ugly color blocks happen always |
No forge, no give a crap. |
Hello:
|
Closes #2835.
Overview
PuLID is an ip-adapter alike method to restore facial identity. It uses both insightface embedding and CLIP embedding similar to what ip-adapter faceid plus model does. However, there is an extra process of masking out the face from background environment using facexlib before passing image to CLIP. PuLID also uses Eva CLIP instead of normal CLIP. In the attn overrides, PuLID also does something more than IPAdapter, as it zero pads the tensor and adds to ortho of hidden states. If you are interested you can read their paper on how this is handled.
How to use
Install sd-webui-controlnet-evaclip extension
PuLID uses both evaclip embedding and insightface embedding as proj module input. So in order to use the feature, you need to install https://github.com/huchenlei/sd-webui-controlnet-evaclip extension.
Download Model
You can download fp16 model here: https://huggingface.co/huchenlei/ipadapter_pulid/resolve/main/ip-adapter_pulid_sdxl_fp16.safetensors
ControlNet Unit Setting
There is an extra radio group to let you select PuLID mode. According to my testing, they only make slight difference, but still something nice to have.
Example
Input
Output [Fidelity]:
Output [Style]:
Generation params
Note
Comparing to instant id, you need stronger prompt to make the output stylized. Following is the same neon style generated by instant id:
Known issue
facexlib and evaclip in total consumes about 2~3GB of vram. So if you have low vram, that can be an issue. There is also about 500MB of vram not unloaded after unloading the preprocessors. I will need to investigate more on why vram here is not properly freed.