IP-Adapter-FaceID-PlusV2 - 0 Shot Face Transfer - Auto Installer & Gradio App
🕑 Added 2024-05-26 01:56:00 +0000 UTCJoin discord and tell me your discord username to get a special rank : SECourses Discord
https://github.com/FurkanGozukara/Stable-Diffusion
https://www.youtube.com/@SECourses/search?query=runpod
How to use NGROK to connect Gradio apps on free Kaggle notebooks : https://youtu.be/iBT6rhH0Fjs
1 February 2025 Update
RunPod & Massed Compute Installers and instructions files added
Upgraded to the latest libraries
21 January 2024 Update
SDXL model upgraded to ip-adapter-faceid-plusv2_sd15
Kaggle Notebook upgraded to V3 and supports SDXL now
11 January 2024 Update
Image saving naming of the Gradio app improved
Now it will not anymore overwrite older images
10 January 2024 Update
Full tutorial > https://youtu.be/rjXsJ24kQQg
If you also upvote this Reddit Post I appreciate very much
Face embeddings caching added
Now it will calculate face embeddings only if input person image changes and not cached
Therefore the image generation speed is many times faster now
8 January 2024 Update
SDXL models support added
You can also convert SDXL into Diffusers to load models from local Diffusers folders
6 January 2024 Update
Convert any model into Diffusers feature added to the very bottom of the App
After converting add the folder path into models array
Examples added
Now you can use any CivitAI model as well with local saving
Custom model path input box added. You can give any diffusers repo path including your local path
5 January 2024 Update
Free Kaggle notebook added. Follow the notebook instructions
Tutorial video in production. Hopefully coming soon
The Main Repo
https://huggingface.co/h94/IP-Adapter-FaceID
Requirements
For this to work you need to have C++ tools installed with Python 3.10.x
Watch this tutorial to install them https://youtu.be/-NjNy7afOQ0
Edit web-ui.py file and add any models from here : https://huggingface.co/stablediffusionapi
You can also convert any model into diffusers local model and give its path or add its path to web-ui
If you want Hugging Face to download models into another drive (not mandatory) use following prompt
Start a new CMD as administrator
setx HF_HOME "G:\HF_Models"
This above command will add a variable to System Environment Variables
On RunPod or Linux
export HF_HOME="/workspace"
RunPod Install Instructions
Click here to register or open RunPod : https://runpod.io?ref=1aka98lq
Select any GPU - I prefer RTX 3090 - It takes around 2 seconds for each image with 512x768
Select any template - I prefer RunPod Pytorch 2.1
Set volume disk according to how many models you want to download and test e.g. 50 GB
Upload all files inside zip into the workspace folder
Start terminal and execute below command
cd /workspace
chmod +x linux_install.sh
./linux_install.sh
After install completed use below command to start each time
export HF_HOME="/workspace"
cd /workspace/
source venv/bin/activate
python web-ui.py --share
This will give you a Gradio live link. Use it to connect. You can also use RunPod proxy connect feature.
When you are uploading your input picture wait until it fully loads before hit generate button.
Kaggle Instructions
Register a free Kaggle account : https://www.kaggle.com/
Verify your Phone number : https://www.kaggle.com/settings
Start a new notebook by clicking + Create button
Import notebook
Full main tutorial of this notebook > in recording
Select Python and GPU P100 or GPT T2 x2
Instructions are well written on the Notebook

Comments
Furkan Gözükara
fixed with v4 please use it : FaceID-Kaggle_v4.ipynb at the attachments above
Matthew Willliams
Struggling with the notebook. When running the web UI cell I get this error. Any ideas? Traceback (most recent call last): File "/kaggle/working/web-ui.py", line 8, in from diffusers import StableDiffusionPipeline, DDIMScheduler, AutoencoderKL, StableDiffusionXLPipeline File "", line 1075, in _handle_fromlist File "/usr/local/lib/python3.10/dist-packages/diffusers/utils/import_utils.py", line 844, in __getattr__ value = getattr(module, name) File "/usr/local/lib/python3.10/dist-packages/diffusers/utils/import_utils.py", line 844, in __getattr__ value = getattr(module, name) File "/usr/local/lib/python3.10/dist-packages/diffusers/utils/import_utils.py", line 843, in __getattr__ module = self._get_module(self._class_to_module[name]) File "/usr/local/lib/python3.10/dist-packages/diffusers/utils/import_utils.py", line 855, in _get_module raise RuntimeError( RuntimeError: Failed to import diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion because of the following error (look up to see its traceback): Failed to import transformers.models.clip.image_processing_clip because of the following error (look up to see its traceback): operator torchvision::nms does not exist add Codeadd Markdown
Furkan Gözükara
Ufuk sıfırdan kurup bana kurulum cmd ekranın tüm loglarını gönderir misin eposta olarak : monstermmorpg@gmail.com
Ufuk Akçay
Traceback (most recent call last): File "D:\video_face\web-ui.py", line 5, in import torch File "D:\video_face\venv\lib\site-packages\torch\__init__.py", line 148, in raise err OSError: [WinError 126] Belirtilen modül bulunamadı. Error loading "D:\video_face\venv\lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies. Press any key to continue . . . merhaba böyle bir hata alıyorum çözemedim? sizceneden?
Furkan Gözükara
it could be incompatible lora. there are so many lora model types sadly. which lora you are trying?
Jeff Penny
When I try to use a lora I get this error: raise ValueError(f"The following keys have not been correctly be renamed: \n\n {', '.join(state_dict.keys())}") ValueError: The following keys have not been correctly be renamed: lora_te2_text_projection.lora_down.weight, lora_te2_text_projection.lora_up.weight
Furkan Gözükara
yes on my todo list hopefully thanks for reminding
Kappa_Neuro
Hi! Could you make a "1 click installer" for PuLID: "Pure and Lightning ID Customization via Contrastive Alignment"? This technology is more advanced than FaceID and shows much better quality. Thanks in advance for the reply. https://github.com/ToTheBeginning/PuLID
Furkan Gözükara
Hello. I just did a fresh install. It worked. Can you tell me what is your python version? also your error seems like models are not accurately downloaded. did you have any problem while installing?
Samuel Mallevaes
Hello Furkan, I installed IP Adapter with your script and followed your tutorial but when I try to generate images, I got this message whatever the model I choose : safetensors_rust.SafetensorError: Error while deserializing header: MetadataIncompleteBuffer / Do you have a solution for this one ? Thanks :)
Furkan Gözükara
thank you. sadly i dont know since i dont have a mac. but you can try.
Max
Hi. Thank you for good content. Is it possible to run ip-adapter on silicon mac (macbook air m2 24Gb unified memory)?
Furkan Gözükara
sadly i cant make since google colab not supporting ngrok.
Art
is it possible to have this notebook for google colab?
Furkan Gözükara
If it is SD 1.5 model don't select SDXL. I am doing a fresh install to test right now
Umut Hasanoglu
When I try to convert juggernautv8 I get this error Conversion status: Error: StableDiffusionPipeline.__init__() got an unexpected keyword argument 'tokenizer_2'
Furkan Gözükara
You need to start from beginning if you do restart or stop. That is how Kaggle works sadly.
Art
Hi... I installed on Kaggle, and everithing went fine, for the forst run... now I'm trying to restart notebook: what are the steps to reactivate it (I clicked on the link to gradio that worked this morning but it gives me back error... do I have to re run all the steps of the notebook to have it back running?)
Furkan Gözükara
no i mean how did you install python? when you open a new cmd and type python what do you see?
amit maitra
I extracted the files like you did in the video and clicked the install.bat and it installed automatically. then I opened the webui and uploaded a pic then selected a model and click generate. it downloaded the model files after that it gave me error saying Torch not compiled with CUDA enabled. I tried several times
Furkan Gözükara
are you installing on linux machine? using runpod installer?
amit maitra
python version is 3.10.13 and gpu is RTX 3080
Furkan Gözükara
that is install error or gpu error. what is your python version and what is your GPU?
amit maitra
can you help me fix?
amit maitra
I keep getting this error when I click generate "zy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: To"
Furkan Gözükara
yes i will make hopefully on my list very soon
gao yu
can you make a one click install bat for PhotoMaker ,https://huggingface.co/spaces/TencentARC/PhotoMaker
Furkan Gözükara
can you give example of that? i can try
g Yu
Dr, It is recommended to add wildcard function, this amazing program will be better.
Furkan Gözükara
which model you are trying? i can try and test
Joosheen
Error: 'time_embed.0.weight' when i want to convert local safetensors model to diffusers.. Am I doing sth wrong?
Furkan Gözükara
hi can you elaborate more? about other download methods?
guangyu niu
Hi there, Are there any other download methods?
Furkan Gözükara
rank given and i tagged you on discord
Hung Do
Installed plus_ip_v13 on windows Python 3.10 got errors. After wasting about couple hours I decided to try on Kraggle and still getting errors. Please see screenshot. https://i.imgur.com/HWvHD8a.png Also my user name on Discord is barepixels, can you upgrade me there?
Furkan Gözükara
you are welcome. i am glad you solved
Baekdoosixt
but thank you for your quick replies ;-)
Baekdoosixt
i've redownload CUDA 12.1 and reinstalled it , i've verified that the CUDA_PATH env is correct (.../NVIDIA GPU Computing Toolkit\CUDA\v12.1) but still not working can you please help ?
Baekdoosixt
Hi ! as i try to generate , i receive this message : RuntimeError: D:\a\_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:743 onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasn't able to be loaded. Please install the correct version of CUDA and cuDNN as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported.
Furkan Gözükara
hello. i heard there is a way to make it work with comfyui but sadly i dont know how. i just tested with a cat and it didn't work sadly : ValueError("No faces found in the image.")
Dr dusk
hello, can i make it work with a comfy UI? and have u tested it with pets? or is there any IP-adapter or something to get similar pets without training a ckpt for your pet
Furkan Gözükara
i can download attachments. you need to check attachments at the very bottom plus_ip_v11.zip
Pallavi Chauhan
'AttachmentNotFound' error for the zip file,
mike oxmaul
Re run the installer. 0 errors. Says virtual env made correctly.
mike oxmaul
On Windows. After running install.bat, opening run-web-app.bat I get this error. A matching Triton is not available, some optimizations will not be enabled. Error caught was: No module named 'triton' Traceback (most recent call last): File "C:\AI\plus_ip_v6\web-ui.py", line 13, in from pyngrok import ngrok ModuleNotFoundError: No module named 'pyngrok' Press any key to continue . . .
Furkan Gözükara
sure i will work on runpod and kaggle scripts now
Moh'd Mahfadi
Oh I don't really have that haha .. so will wait for a colab or Kaggle
Furkan Gözükara
Hello I just did a test. Around 8 GB. so 8 GB GPU should run it fairly well at 512x768 pixel resolution output
Moh'd Mahfadi
Dr, how much GPU this requires?