NokiMo
Furkan Gözükara
Furkan Gözükara

patreon


1 Click Automatic Installer & A Very Advanced GUI For InstantId For Windows, RunPod, Linux & Kaggle Notebook

This post is now only history and obsolete

new post : https://www.patreon.com/posts/118469722

This post is now only history and obsolete

new post : https://www.patreon.com/posts/118469722

This post is now only history and obsolete

new post : https://www.patreon.com/posts/118469722

Join discord and tell me your discord username to get a special rank : SECourses Discord

How to use NGROK to connect Gradio apps on free Kaggle notebooks : https://youtu.be/iBT6rhH0Fjs

16 August 2024 Update:

3 July 2024 Update V14:

30 April 2024 Update V13:

18 March 2024 Update V12:

25 February 2024 Update V11: 

21 February 2024 Update:

20 February 2024 Massive Update:

18 February 2024 Massive Update:

10 February 2024 Update:

Full tutorial video : in production

Fully automatic installers for Windows and Linux for InstantID : Zero-shot Identity-Preserving Generation in Seconds > https://instantid.github.io/

Watch it to learn how to install Python (3.10), Visual C++ tools properly > https://youtu.be/-NjNy7afOQ0 since you need C++ tools installed for InsightFace library

Features

Comparisons & Experiments

Tips

Requirements

Windows Install Instructions

Kaggle Instructions



1 Click Automatic Installer & A Very Advanced GUI For InstantId For Windows, RunPod, Linux & Kaggle Notebook

Comments

this post not updated anymore. new post : https://www.patreon.com/posts/118469722

Furkan Gözükara

I installed v19 in windows 11 but got the following errors : Modify this file and add --share if you want Gradio share Options VRAM usages are as below. No controlnet or LoRA used so these are min requirements 1+1 = 13 GB, 1+2 = 10 GB , 1+3 = 8.5 GB, 2+1 = 10.5 GB, 2+2 = 8.2 GB , 2+3 = 6.9 GB Please select an option: 1. Default - Faster but higher VRAM 2. Enable CPU Offloading - Reduces VRAM but changes output. I would avoid if possible Enter your choice (1-2): 1 Please select an option: 1. Default Precision (Half BF16-FP16) - Higher quality higher VRAM 2. FP8 Precision - Slightly lower quality medium VRAM 3. FP4 Precision - More slightly lower quality lower VRAM Enter your choice (1-3): 1 Traceback (most recent call last): File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\utils\import_utils.py", line 811, in _get_module return importlib.import_module("." + module_name, self.__name__) File "C:\Python310\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\loaders\lora_pipeline.py", line 33, in from .lora_base import LoraBaseMixin File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\loaders\lora_base.py", line 47, in from peft.tuners.tuners_utils import BaseTunerLayer File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\peft\__init__.py", line 22, in from .auto import ( File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\peft\auto.py", line 32, in from .mapping import MODEL_TYPE_TO_PEFT_MODEL_MAPPING File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\peft\mapping.py", line 25, in from .mixed_model import PeftMixedModel File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\peft\mixed_model.py", line 29, in from .peft_model import PeftModel File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\peft\peft_model.py", line 37, in from transformers import Cache, DynamicCache, EncoderDecoderCache, PreTrainedModel ImportError: cannot import name 'EncoderDecoderCache' from 'transformers' (C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\transformers\__init__.py) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\utils\import_utils.py", line 811, in _get_module return importlib.import_module("." + module_name, self.__name__) File "C:\Python310\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\pipelines\stable_diffusion\pipeline_stable_diffusion.py", line 24, in from ...loaders import FromSingleFileMixin, IPAdapterMixin, StableDiffusionLoraLoaderMixin, TextualInversionLoaderMixin File "", line 1075, in _handle_fromlist File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\utils\import_utils.py", line 801, in __getattr__ module = self._get_module(self._class_to_module[name]) File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\utils\import_utils.py", line 813, in _get_module raise RuntimeError( RuntimeError: Failed to import diffusers.loaders.lora_pipeline because of the following error (look up to see its traceback): cannot import name 'EncoderDecoderCache' from 'transformers' (C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\transformers\__init__.py) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\AIGen\instant_id_v19\InstantID\gradio_demo\web-ui-multicontrolnet.py", line 4, in from diffusers import StableDiffusionPipeline File "", line 1075, in _handle_fromlist File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\utils\import_utils.py", line 802, in __getattr__ value = getattr(module, name) File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\utils\import_utils.py", line 802, in __getattr__ value = getattr(module, name) File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\utils\import_utils.py", line 801, in __getattr__ module = self._get_module(self._class_to_module[name]) File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\utils\import_utils.py", line 813, 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 diffusers.loaders.lora_pipeline because of the following error (look up to see its traceback): cannot import name 'EncoderDecoderCache' from 'transformers' (C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\transformers\__init__.py) Press any key to continue . . .

Huey

dont worry it installs v22

Furkan Gözükara

16 August 2024 Update: InstantID updated to V22 but there's download only for instant_id_v19.zip

Proulxmila

Without any stable diffusion base model it takes around 13 GB

Furkan Gözükara

How much space does this all take? Accidetaly filled my HD first atempt to install.. would be good to write out so people know =)

Algi

thanks a lot will do hopefully. i am working on instantid app it will be hopefully amazing

Furkan Gözükara

Have you seen Krita AI? I just discovered it today. It's an open source ai plug in for Krita (a free open source photoshop type program). From the github description "Streamlined interface for generating images with AI in Krita. Inpaint and outpaint with optional text prompt, no tweaking required." It's an amazing plug in which allows real time inpainting, lora and base model support...SD or XL. ComfyUI back end. Super easy to install and use. Very robust and user friendly. It might be worth a look for a future tutorial video. https://github.com/Acly/krita-ai-diffusion

Lou

sadly not yet

Furkan Gözükara

can we use insitantid with inpainting?

zhou jie

try to understand how InstantId works

Furkan Gözükara

I only saw uploaded pictures of faces and movements, but no reference to my own style.

鸣 陈

Do you mean the current one is better? I would like to ask, how can I let him refer to my style?

鸣 陈

this is better than ip adapter plus. put models e.g. sdxl.safetensor under "models" folder and put loras under "loras" folder inside InstantID folder

Furkan Gözükara

I have a few questions 1. Where should the large model be placed? I did not find the location of the large model. 2. You can add an IPAdapter_plus. I upload a picture and you can directly refer to it to learn his style.

鸣 陈

tried running update requirements as well as update version, deleted venv reinstalled same error.

Steve

fresh install of v13: Traceback (most recent call last): File "W:\InstantIDmostnewest\InstantID\gradio_demo\web-ui-multicontrolnet.py", line 29, in from pipelines.pipeline_common import quantize_4bit File "W:\InstantIDmostnewest\InstantID\.\pipelines\pipeline_common.py", line 4, in import bitsandbytes as bnb ModuleNotFoundError: No module named 'bitsandbytes'

Steve

i don't have amd so can't tell :/

Furkan Gözükara

This will not work with an AMD gpu correct?

Stefan K

testing right now. there was a gradio bug maybe that is why

Furkan Gözükara

Installed InstantID v12 on Kaggle using the Installer. Images seems generated but not viewable in Webui. Runtime Error: no "view" mailcap rules found for type "application/octet-stream". For your kind advise Dr, Thank you! -------------------- Image 1/1 generated in 70.76 seconds. 1 images generated in 70.76 seconds, average 70.76 seconds per image. Warning: unknown mime-type for "/kaggle/working/InstantID/outputs" -- using "application/octet-stream" Error: no "view" mailcap rules found for type "application/octet-stream" /usr/bin/xdg-open: 869: www-browser: not found /usr/bin/xdg-open: 869: links2: not found /usr/bin/xdg-open: 869: elinks: not found /usr/bin/xdg-open: 869: links: not found /usr/bin/xdg-open: 869: lynx: not found /usr/bin/xdg-open: 869: w3m: not found xdg-open: no method available for opening '/kaggle/working/InstantID/outputs'

Stephen Yip

yes that means you installed too many models. you can use kaggle temp alternatively

Furkan Gözükara

Last time I try at kaggle. I get error File "/opt/conda/lib/python3.10/tempfile.py", line 483, in func_wrapper return func(*args, **kwargs) OSError: [Errno 28] No space left on device

Evan Helga

hello. On my todo list hopefully. I plan to save .txt file of all settings into a folder with the file name. would that work?

Furkan Gözükara

I have a problem. This works so well (fun) with styles, loras, models that after few hours of playing with a different combination, I ended up with a folder of nearly 100 images. Among them, I found a few looks that I like. So here is the problem, I can't seem to be able to to repeat the look. Can I beg for embed metadata in the PNG or an adjacent text file with same file name that show the configuration? At least which Lora(s) and Checkpoint I used. If someone come up with a different solution to log the process I am all ears.

Hung Do

hello. Hugging Face (where we store models) is in maintenance mode so currently it will not work. can you try again later please?

Furkan Gözükara

Hello I found error, and also I dont see anything at InstantID\models\ Downloading ./models/antelopev2.zip from https://github.com/deepinsight/insightface/releases/download/v0.7/antelopev2.zip... Traceback (most recent call last): File "/kaggle/working/InstantID/gradio_demo/web-ui-multicontrolnet.py", line 85, in app = FaceAnalysis( File "/opt/conda/lib/python3.10/site-packages/insightface/app/face_analysis.py", line 27, in __init__ self.model_dir = ensure_available('models', name, root=root) File "/opt/conda/lib/python3.10/site-packages/insightface/utils/storage.py", line 28, in ensure_available return download(sub_dir, name, force=False, root=root) File "/opt/conda/lib/python3.10/site-packages/insightface/utils/storage.py", line 17, in download download_file(model_url, File "/opt/conda/lib/python3.10/site-packages/insightface/utils/download.py", line 73, in download_file raise RuntimeError("Failed downloading url %s" % url) RuntimeError: Failed downloading url https://github.com/deepinsight/insightface/releases/download/v0.7/antelopev2.zip

Evan Helga

hello. it means there is still 1 error you didn't fix path. you obviously don't have /workspace. in my code I have no such hard coded path since it works both on Windows and RunPod. check your installation again. you shouldnt have any path as workspace

Furkan Gözükara

I was able to install it on my ubuntu OS. but when I click on submit button I get this error: ( I haven't install it in /workspace folder ) File "/usr/lib/python3.10/os.py", line 215, in makedirs makedirs(head, exist_ok=exist_ok) File "/usr/lib/python3.10/os.py", line 215, in makedirs makedirs(head, exist_ok=exist_ok) File "/usr/lib/python3.10/os.py", line 225, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: '/workspace'

So Sha

perfect awesome. we spent huge time to make it work

Furkan Gözükara

Working great on Kaggle with notebook from 25 Feb. Using it with & without ControlNet (lowvram option). Thanks

Rick B

hi i am going to verify and fix hopefully checking

Furkan Gözükara

Hi, im getting error with version 10: RuntimeError: "upsample_bilinear2d_out_frame" not implemented for 'BFloat16'

Bartosz Polecki

it shouldn't. to return v9 you can use git checkout 4393697028e1e779f19f23cf5cba912e2a60bd5c so open a cmd on instant id folder and do git checkout 4393697028e1e779f19f23cf5cba912e2a60bd5c can you give me more info about bf16? when do you get it?

Furkan Gözükara

When generating it gives an error about BF16. But only since v10. Can i download v9 or older anywhere?

Chris

try to install into C:\instant_id and let me know please

Furkan Gözükara

I get this error with v10 \AppData\Local\Programs\Python\Python310\python.exe: can't open file 'I:\\INSTA10 LORA\\gradio_demo\\web-ui-multicontrolnet.py': [Errno 2] No such file or directory Press any key to continue . . .

Mark Sutherland

We have different best config for both. Each model requires different config. I made 120+ training for sdxl config and 70+ training for sd 1.5 config

Furkan Gözükara

I don't suggest lora so I don't have very good config for lora. Only the config of first video I made. why i dont suggest lora you can read here : https://www.linkedin.com/posts/furkangozukara_why-i-dont-research-lora-training-because-activity-7164700874097856512--Ecj/?utm_source=share&utm_medium=member_desktop

Furkan Gözükara

just finished TE training and honestly very close and I would choose the non TE over TE...

Ec Jep

Can you upgrade the codes and add Loras? Please

Hung Do

Does it work only with SDXL checkpoints ? or 1.5 checkpoints also work ?

Hazem

Thanks for catching the TE1 not working. I trained yesterday and didn't notice Koyha kept "text_encoder1: false" even though it had a rate. The training output was still amazing but am training again today with TE1 set to True so it will be a good comparison. BTW RealVisXL4 appears to be an improvement on realism

Ec Jep

lol they deleted the file. i am going to update give me a minute

Furkan Gözükara

yes i have huge quality difference. my gradio worked many times better than controlnet in auto1111

Furkan Gözükara

wow this is so wrong. let me check

Furkan Gözükara

Please select an option for VRAM usage (default 1): 1. High VRAM (Faster) 2. Low VRAM (A Little Bit Slower) - Preffered For Cards Below 16GB VRAM Enter your choice (1-2): 1 -- Please select an option for Gradio Share (default 1): 1. Without Gradio Share 2. With Gradio Share Enter your choice (1-2): 1 -- Please select an option for Precision Type (default 1): 1. With BF16 (preffered better faster choice) 2. With FP16 (only useful for old GPUs such as RTX 1080 TI) Enter your choice (1-2): 1 -- 2024-02-21 13:07:54.080108: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`. WARNING:tensorflow:From E:\INSTANT_ID_V9\InstantID\venv\lib\site-packages\keras\src\losses.py:2976: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead. download_path: ./models\antelopev2 Downloading ./models\antelopev2.zip from https://github.com/deepinsight/insightface/releases/download/v0.7/antelopev2.zip... Traceback (most recent call last): File "E:\INSTANT_ID_V9\InstantID\gradio_demo\web-ui-multicontrolnet.py", line 78, in app = FaceAnalysis( File "E:\INSTANT_ID_V9\InstantID\venv\lib\site-packages\insightface\app\face_analysis.py", line 27, in __init__ self.model_dir = ensure_available('models', name, root=root) File "E:\INSTANT_ID_V9\InstantID\venv\lib\site-packages\insightface\utils\storage.py", line 28, in ensure_available return download(sub_dir, name, force=False, root=root) File "E:\INSTANT_ID_V9\InstantID\venv\lib\site-packages\insightface\utils\storage.py", line 17, in download download_file(model_url, File "E:\INSTANT_ID_V9\InstantID\venv\lib\site-packages\insightface\utils\download.py", line 73, in download_file raise RuntimeError("Failed downloading url %s" % url) RuntimeError: Failed downloading url https://github.com/deepinsight/insightface/releases/download/v0.7/antelopev2.zip Press any key to continue . . .

Nobodys Hero

Hello, is there a difference in the quality of generation in the local instantID and instant ID in automation 1111?

Dmitry

Hi, i've just tested version 9 on runpod A6000, following the instructions in the readme file, but unfortunately an "out of memory" error stopped me before I could generate an image. here's the problem : torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 12.00 MiB. GPU 0 has a total capacity of 47.54 GiB of which 10.00 MiB is free. Process 239789 has 47.52 GiB memory in use. Of the allocated memory 867.36 MiB is allocated by PyTorch, and 2.64 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)

sebastien laroche

can you message me from discord? show screenshot of your task manager of your gpu screen

Furkan Gözükara

raise local protocol error too little data for declared content length likewise for h11._util.localprotocolError to little data for declared content-length

Mark Sutherland

thanks for reply. I ran that cmd, running on windows, not sure if this has anything to do with it but in the cmd bos it says

Mark Sutherland

are you using low vram? what is your GPU? how much VRAM your computer uses before starting the APP?

Furkan Gözükara

I'm run v3 v6 and it's taking well over an hour to generate one image. No idea whats going on with it,

Mark Sutherland

i didnt are there any demo link? so far this is best i found without training

Furkan Gözükara

Have you tried photomaker? I wonder if it has better quality since you can put in more than one image as reference.

Khoa Vo

edit run_web_UI.bat and add your folder path as below --models_path "G:\automatic1111\stable-diffusion-webui\models\Stable-diffusion" with your path

Furkan Gözükara

thank you so much yes it was indeed instruction error. after you put the models you need to restart the app. but i will try to add a refresh folders button right now

Furkan Gözükara

Hello, There were 2 problems(RunPod) 1) For some reason, when I select an aspect ratio that differs from 1:1, it gives an error. It doesn't matter which input image I upload, you can only create an error-free image with a 1:1 ratio. 2) After uploading the model to the InstantID/models folder, it did not appear in the pop-up list UPD Problem 1 has been solved. If the smaller of the sides in the output image is less than 800 pixels, then there will be an error PS In the instructions of the txt file to install on the RunPod, the slash “\” was in the wrong direction (python gradio_demo\web-ui-multicontrolnet.py --share), which is why the command was not executed. I am completely zero in understanding the code, what is the problem ChatGPT helped to solve, it may be worth fixing it in the instructions

Dmitry

How do I get this to use my existing A1111 model folder? Also I can't even find the existing model folder it's trying to load.

Khoa Vo

hello. you did run low vram or high vram? can you give me context when happened exactly?

Furkan Gözükara

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument index in method wrapper_CUDA__index_select)

Steve Bruno

Hello. We are still working on improvements. But If you install windows_install.bat it won't do that. Hopefully I will update this post once we are fully moved to better version

Furkan Gözükara

Hello, I've just tested V2 but, unless I've made a mistake somewhere, there's a problem. Each time an image is generated, it reloads the model I'm using, which makes each image generation very long. It didn't do that with the previous version.

sebastien laroche

on civitAI some models require account login. so start your download on your browser, go to all downloads, copy download link, open a new cmd inside models folder and just do this wget "URL" dont forget "" - quotation marks

Furkan Gözükara

hello, thank you for your work. Maybe I'm bad, but I can't install models. I go to Civitai, download the chekpoints in the instantID "model" folder, but as soon as I want to use them I get errors. I'm on Runpod (usually on the 3090). my line of code for installation: wget *model address* -content-disposition. I've also tried the hugginface repo, but I don't know where to find the right links. Thanks in advance for enlightening the blind man that I must be ;)

sebastien laroche

great

Furkan Gözükara

Thanks Mate, everything is working great.

Bartosz Polecki

you are welcome thanks for support

Furkan Gözükara

Thank you very much!

OctonionPrime

did you install c++ tools accurately? also did you install cuda libraries? i have shown both in this video : https://youtu.be/-NjNy7afOQ0

Furkan Gözükara

RuntimeError: D:\a\_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:857 onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasnt able to be loaded. Please install the correct version of CUDA andcuDNN 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.

Hassan Alhassan


Related Creators