Great information, very thorough explanations covering a lot. You explained symbolic links so well that I actually was able to switch my models folder quite easily. I love the command line tips too. Can't wait to see what you teach me next! Subbed.
Thank you so much, @SebAnt! Your support, both as a long time subscriber and Patreon contributor, means a lot to me. Thank you, I'm thrilled to have reached 1K subscribers. I appreciate you being part of this journey! Your encouragement helps keep the momentum going.
@@CodeCraftersCorner The dude behind IPAdapter Plus is making a new one for InstantID, he talk about it in "issue" page of his IPAdapter Plus github, let us hope that runs as good and fast as ipadapter
Amazing video, its so detailed and thank you so much for your big effort and time to make this video ultra detailed explaining every commands, issues and process. amazing. cheers....
You do such an amazing job explaning everything! Unfortunely in my case, I ran out of memory on my RTX 3060 12 Gb VRAM. I hope there will be a refined model which will not use such amount of Vram!
Hi @danieljfdez! Sorry to hear you could not get it to work. Yes, right now, this implementation is not optimized. Thankfully, there is another implementation is on the way using the ComfyUI module.
Subscribed immediately! :D thx for tutor the basix. Btw I didn't install the comfyUI version, I installed just their gradio demo and the first completion takes about 100 sec (4060TI 16GB)
Thank you for the tutorial. It effectively allowed me to test InstantID early! I would suggest to you to skip the parts where you're teaching us a dozen times how to do a copy and paste. You're already talking about somewhat advanced stuff, I'm fairly confident your audience is familiar with 7zip and copy and paste techniques so let's move along shall we ^^ Additionally, unless I missed it, a little disclaimer at the start of the video warning about the 40+ minutes render times would have been welcome. Would be curious about what GPU model you're using too, useful info to put on your descriptions.
@bigfisher42, Thank you for your feedback! I appreciate your suggestion to streamline the tutorial and will take that into consideration for future videos.
That's for sure the most complicated nodes to install in comfyui. I don't understand why zho-zho nodes are so complicated to run, it always breaks the regular version of comfyui and forces us to reinstall the env python version to run it. It's not a feasible thing if you're willing to work with other comfy ui nodes that depends on newer versions of python. I'm just using another node from huxiuhan and it run with the regular Comfy portable.
Hi @Paulo-ut1li, I appreciate your feedback. I think the intention behind its implementation was to offer early access and a quick solution. The ZHO nodes do not use the ComfyUI API and instead are just a wrapper to allow using the original diffuser code. This is relative fast to implement at the cost of the inconveniences you mentioned. I will give the other node you mentioned a try.
because he wants to limit your freedom in Comfy, and lock down everything in his own node It's a shit extension and many others are rerouting this shit work into better function nodes that dont lock down other passthroughs.
@yizhouqian5899 Did you invoke your ComfyUI python when installing the dependencies? Alternatively, you can manually install it by doing -m pip install --upgrade diffusers
Thanks for the feedback. I have manually checked the python version as well as diffuser installation and import. Everthing appears to work properly. However, I still run into the same error code when loading InstantID. It is really strange...@@CodeCraftersCorner
@yizhouqian5899! Hmm, if you've verified everything and still encountering the error, I not sure what else you can try. It might be best to wait for the official ComfyUI implementation. It should provide better compatibility. Hope it comes out soon for you to try.
Hi, thanks for this tutorial, but I have a question about the manager button, why in this video there's no "manager" and "share" button under "load default" button? Because mine also doesn't have, but many other videos they have those buttons
Your the video is the best tutorial out there even better than famous UA-camrs. I run into an issue which is the first step ID Contronet Loader won't load even though I have downloaded the models and have the correct path in place (I haven't rename the controlnet models). I couldn't perform the .venv as well. Any advice?
hi, thank for the great tutorial. I'm getting an error with onnxruntime when I choose GPU for InsightFace Loader. However with CPU it works fine. here's the error message : 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 , make sure they're in the PATH, and that your GPU is supported.
Thank you @zhoobinnourian! Yes, some CUDA version may not be compatible with onnxruntime-gpu. Choosing CPU is the correct choice here. The developer note's section provides more information here: bit.ly/48VHCzN
Thanks for sharing your experience, @PyruxNetworks! Yes, the VRAM requirement is challenging. Waiting for the official implementation is a better option. Appreciate the support.
Hello @JackTorcello, the only suggestion I found on the topic is "Try to upgrade diffusers to version 0.25.0". The developer has not responded on the issue.
Hey @imranl8742! I would recommend waiting for the official ComfyUI InstantID implementation. This version is in early access, uses a significant amount of VRAM (14-18 GB), and has compatibility issues with certain models. Keep an eye out for updates! Glad you liked the video!
Hello, @MrTeddi100! This happens when insightface cannot detect a face. You can use the prepare image for insight face node. Here is a link to the solution: bit.ly/4c48GP5
I just discovered your channel. Great video, explained very well. Can you make a video on hardware requirements for running stable diffusion locally, based on low med and high budget? Like explaining, what difference to expect when we upgrade to high end GPUs and what cons to consider when settling down with cheaper ones. Stuff like that. I am currently running on runpod and thinking of getting a good GPU without breaking the bank. Thanks in advance.
@@CodeCraftersCorner I thought with a technical background like yours you would be able to give a much better understanding of hardware rather than from a affiliate marketer on UA-cam.
I got this error when executing the insightface node: Error occurred when executing IDGenerationNode: StableDiffusionXLControlNetPipeline.check_inputs() takes from 5 to 14 positional arguments but 15 were given Have no idea how to fix it...
Thanks again for a very detailed and explanatory tutorial. I did everything you did to the letter, however. ModuleNotFoundError: No module named 'diffusers' Cannot import C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-InstantID-ZHO module for custom nodes: No module named 'diffusers' Import times for custom nodes: 0.0 seconds (IMPORT FAILED): C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-InstantID-ZHO I get a module could not be found error so it cannot be imported. I would appreciate if you can help me where I may be making a mistake.
Hi @hudaicihandurmus5414! To troubleshoot, please follow these steps: 1. first check if you have the correct requirements.txt file in the ComfyUI-InstantID-ZHO custom node folder. (Go into ComfyUI > Custom Node > ComfyUI-InstantID-ZHO > Open the requirements.txt file). Check and make sure "diffusers" is in the file. 2. Next go to your ComfyUI root folder (where there is the run_cpu.bat and run_nvidia_gpu.bat) file. Open the CMD from this folder by going into the address bar, type CMD and press Enter. 3. Run the command (without quotes) ".venv\Scripts\activate" 4. This will activate the virtual environment. 5. type in "cd ComfyUI\custom_nodes\ComfyUI-InstantID-ZHO" and press Enter 6. This will change directory to ComfyUI-InstantID-ZHO. 7. type in python -m pip install -r requirements.txt 8. press enter. 9. This will install diffusers. A common mistake is not activating the virtual environment and installing the requirements file in the wrong directory. Before running the command, make sure that in the terminal, it says (.venv) at the beginning. If not, do steps 2 and 3 again.
There seems to ba a bug - people using 16Gb VRAM (mine is 8Gb VRAM) - are getting this ERROR, as am I Error occurred when executing Ipadapter_instantidLoader: Allocation on device 0 would exceed allowed memory. (out of memory) Currently allocated : 16.00 GiB Requested : 5.00 MiB Device limit : 8.00 GiB Free (according to CUDA): 0 bytes PyTorch limit (set by user-supplied memory fraction) : 17179869184.00 GiB Win 10, 64Gb, RTX 2070 (using either CUDA or CPU setting)
Great tutorial! Unfortunately I got this error "Error occurred when executing IDBaseModelLoader_local: HIP out of memory" is there a way around that? Or I just need a card with more vram?
Thank you, @rykk! Yes, with this implementation, the out of memory error is quite common. There is a new implementation of InstantID on the way which will follow ComfyUI convention. I suggest waiting for it before investing into a new card.
Despite doing step by step the model failed to load..... error - 0.8 seconds (IMPORT FAILED): D:\Stable Diffusion ew_ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-InstantID
Hi @user-kk2ve1un4u! All three of them are techniques to generate images from a face input image in different styles and poses. They will do the same thing but give you slightly different results. IPAdapter has other uses like it can grab style from an input image and transfer it to the output image. To my knowledge, PhotoMaker and InstantID cannot transfer styles.
my GPU is Nvidi RTX 3080 and I got an out of memory as shown below , do you know a solution for it ?. torch.cuda.OutOfMemoryError: Allocation on device 0 would exceed allowed memory. (out of memory) Currently allocated : 12.66 GiB Requested : 1.56 GiB Device limit : 16.00 GiB Free (according to CUDA): 0 bytes PyTorch limit (set by user-supplied memory fraction) : 17179869184.00 GiB
Error occurred when executing Ipadapter_instantidLoader: 'StableDiffusionXLInstantIDPipeline' object has no attribute 'dtype' File "C:\ComfyUI\ComfyUI\execution.py", line 155, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI\ComfyUI\execution.py", line 85, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI\ComfyUI\execution.py", line 78, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-InstantID\InstantIDNode.py", line 191, in load_ip_adapter_instantid pipe.load_ip_adapter_instantid(face_adapter) File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-InstantID\pipeline_stable_diffusion_xl_instantid.py", line 156, in load_ip_adapter_instantid self.set_image_proj_model(model_ckpt, image_emb_dim, num_tokens) File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-InstantID\pipeline_stable_diffusion_xl_instantid.py", line 174, in set_image_proj_model self.image_proj_model = image_proj_model.to(self.device, dtype=self.dtype) ^^^^^^^^^^ File "C:\ComfyUI\python_embeded\Lib\site-packages\diffusers\configuration_utils.py", line 137, in __getattr__ raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
Hi @krupnikova! It seems like there is a mismatch between the checkpoint and the ipadapter model. Are you perhaps using the load model locally node? If so, can you try with the load from hub node? If this does not work, you may have to wait for the official implementation as it will provide better compatibility.
Hello @SheRoMan! Are you perhaps using the load model locally node? Can you try with the load model from hub node? It seems like there is a mismatch with your model and the ip adapter model.
@@CodeCraftersCorner now i'm getting this error 🥲 Error occurred when executing IDBaseModelLoader_fromhub: Using `low_cpu_mem_usage=True` or a `device_map` requires Accelerate: `pip install accelerate` BTW I install all the requirements.txt as you showed in video with no errors
Maybe a compatibility issue. Try adding 'accelerate' to the requirements.txt file and reinstalling. If the problem persists, you might want to wait for the native ComfyUI-InstantID project. Here's the link for reference: bit.ly/3Ome31I
Getting this error Error occurred when executing InsightFaceLoader_Zho: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from D:\000AI\00ComfyUI\ComfyUI\custom_nodes\ComfyUI-InstantID\models\antelopev2\1k3d68.onnx failed:Protobuf parsing failed. File "D:\000AI\00ComfyUI\ComfyUI\execution.py", line 155, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\000AI\00ComfyUI\ComfyUI\execution.py", line 85, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\000AI\00ComfyUI\ComfyUI\execution.py", line 78, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\000AI\00ComfyUI\ComfyUI\custom_nodes\ComfyUI-InstantID\InstantIDNode.py", line 71, in load_insight_face_antelopev2 model = FaceAnalysis(name="antelopev2", root=current_directory, providers=[provider + 'ExecutionProvider',]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\000AI\00ComfyUI\python_embeded\Lib\site-packages\insightface\app\face_analysis.py", line 31, in __init__ model = model_zoo.get_model(onnx_file, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\000AI\00ComfyUI\python_embeded\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 96, in get_model model = router.get_model(providers=providers, provider_options=provider_options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\000AI\00ComfyUI\python_embeded\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 40, in get_model session = PickableInferenceSession(self.onnx_file, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\000AI\00ComfyUI\python_embeded\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 25, in __init__ super().__init__(model_path, **kwargs) File "D:\000AI\00ComfyUI\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 419, in __init__ self._create_inference_session(providers, provider_options, disabled_optimizers) File "D:\000AI\00ComfyUI\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 452, in _create_inference_session sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ please help
1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "D:\000AI\00ComfyUI\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll" how to solve this error
Are you perhaps running on CPU? There a dependency which requires GPU, onnxruntime-gpu. You can try to re-install from scratch. When you reach the step to install dependencies for ComfyUI-InstantID-ZHO, modify the requirements.txt file. Change onnxruntime-gpu to onnxruntime and then do the python -m pip install -r requirements.txt.
hmm, in that case, can you make sure that you have downloaded and replace the 1k3d68.onnx placeholder file with the correct model? It should be around 137mb in size.
Have you tried the PhotoMaker implementation by ZHO? InstantID takes a little more than twice as much time as PhotoMaker. It can give you a rough estimation.
Most likely, your credentials are no longer valid. If you are using SSH, then go to GitHub and set up a new one or you can try this in the terminal: git config --global user.email "you@example.com" git config --global user.name "Your Name" You can go to this page for more info: docs.github.com/en/authentication
@CodeCraftersCorner thanks for the reply, bro . I've tried this option also, but it says fatal: unable to access could not resolve host: socks I've reinstalled Comfy. Is that a all in one solution. like reinstall windows or some simple solution.
@praneethsingh7109 in that case you can download the project as zip from GitHub and extract it manually into ComfyUI folder. Not sure why the error. You may have to reinstall Git.
Hello Sharvin, I don't know if my comment keeps getting deleted or I can't see it, anyway, I was wondering if you offer pair programming/tutor services. I am looking for 4 hours/twice a week, it would amount to $120/week, but I can negotiate if you are interested. You are an excellent teacher, would love to discuss further.
Hello Mehrad, Thank you so much for your kind words. I'm open to discussing the details further. Could you please send me an email at CodeCraftersCorner@gmail.com, so we can discuss the details; schedule, pricing, and any other specific requirements you may have.
Thank you for sharing your perspective, @tommymarcetta9571! While you may already be familiar with certain aspects, I aim to help a diverse audience with varying level of expertise. The intention is to ensure that everyone, regardless of their familiarity with the topic, can follow along. I appreciate you feedback and will consider ways to balance the level of detail in the future videos.
I got this error when executing the insightface node: onnxruntime.capi.onnxruntime_pybind11_state.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from D:\Projects\stable-diffusion\execution\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-InstantID\models\antelopev2\1k3d68.onnx failed:Protobuf parsing failed. Have no idea how to fix it.
Getting stuck at this Error occurred when executing InsightFaceLoader_Zho: File "B:\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "B:\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "B:\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "B:\ComfyUI\custom_nodes\ComfyUI-InstantID-ZHO\InstantIDNode.py", line 71, in load_insight_face_antelopev2 model = FaceAnalysis(name="antelopev2", root=current_directory, providers=[provider + 'ExecutionProvider',]) File "C:\Users\john_\AppData\Local\Programs\Python\Python310\lib\site-packages\insightface\app\face_analysis.py", line 43, in __init__ assert 'detection' in self.models
Hello @JackTorcello, the only suggestion I found on the topic is "Try to upgrade diffusers to version 0.25.0". The developer has not responded on the issue.
I get this ERROR - Win 10, RTX 2070 8Gb VRAM - cannot import name 'id_tensor_storage' from 'transformers.pytorch_utils' (C:\Users\john_\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\pytorch_utils.py) - Error occurred when executing IDBaseModelLoader_fromhub
Not spamming at al!! You are doing all the hard work and providing immense value!! Forever grateful amigo!! ❤️🇲🇽❤️
Thank you @WhySoBroke! I appreciate you continuous support.
Huge props to you for detailed video.
Thank you, @strizerquel8796!
Your video helped me so much, really like the extensive explanation of each step. 😊
Glad it was helpful!
Thanks for so detailed and informative video. Good work!
Great information, very thorough explanations covering a lot. You explained symbolic links so well that I actually was able to switch my models folder quite easily. I love the command line tips too. Can't wait to see what you teach me next! Subbed.
Thank you @matthewkolb9950! Glad it was helpful.
Keep the wonderful tutorials coming Sharvin, and congratulations on reaching 1K subscribers 👏🏼👏🏼
Thank you so much, @SebAnt! Your support, both as a long time subscriber and Patreon contributor, means a lot to me. Thank you, I'm thrilled to have reached 1K subscribers. I appreciate you being part of this journey! Your encouragement helps keep the momentum going.
With your tutorials no one will be lost, keep up the greate work bro
Thank you, @0A01amir! I appreciate that!
@@CodeCraftersCorner The dude behind IPAdapter Plus is making a new one for InstantID, he talk about it in "issue" page of his IPAdapter Plus github, let us hope that runs as good and fast as ipadapter
@0A01amir, yes I am also keeping an eye on it. There is a placeholder Github repo here: bit.ly/3Ome31I
Amazing video, its so detailed and thank you so much for your big effort and time to make this video ultra detailed explaining every commands, issues and process. amazing. cheers....
Thank you for your kind words, @DianneStudio!
This video helped a lot. InstantID working now. Thank you!
Glad it helped, @dgtlnative259!
amazing he's also explaining how DOS commands are working :P great tutorial
Glad you liked it, @anthonyfesce4073!
Oh man your explanation is really really great . very very clean and super help full . Looking forward to see more videos ❤❤❤❤
Thank you, @sunlightlove1!
You do such an amazing job explaning everything! Unfortunely in my case, I ran out of memory on my RTX 3060 12 Gb VRAM. I hope there will be a refined model which will not use such amount of Vram!
Hi @danieljfdez! Sorry to hear you could not get it to work. Yes, right now, this implementation is not optimized. Thankfully, there is another implementation is on the way using the ComfyUI module.
Thanks for the fast try! And ZHO's implementation also broke my Comfy, reinstalled too. Looking forward to official implementation.
Thank you, @Gabriecielo! I am also looking forward to the official implementation.
Subscribed immediately! :D thx for tutor the basix. Btw I didn't install the comfyUI version, I installed just their gradio demo and the first completion takes about 100 sec (4060TI 16GB)
Thank you so much for the support, @yngeneer! That's great. Have fun!
Thank you for the tutorial. It effectively allowed me to test InstantID early!
I would suggest to you to skip the parts where you're teaching us a dozen times how to do a copy and paste. You're already talking about somewhat advanced stuff, I'm fairly confident your audience is familiar with 7zip and copy and paste techniques so let's move along shall we ^^
Additionally, unless I missed it, a little disclaimer at the start of the video warning about the 40+ minutes render times would have been welcome. Would be curious about what GPU model you're using too, useful info to put on your descriptions.
@bigfisher42, Thank you for your feedback! I appreciate your suggestion to streamline the tutorial and will take that into consideration for future videos.
That's for sure the most complicated nodes to install in comfyui. I don't understand why zho-zho nodes are so complicated to run, it always breaks the regular version of comfyui and forces us to reinstall the env python version to run it. It's not a feasible thing if you're willing to work with other comfy ui nodes that depends on newer versions of python. I'm just using another node from huxiuhan and it run with the regular Comfy portable.
Hi @Paulo-ut1li, I appreciate your feedback. I think the intention behind its implementation was to offer early access and a quick solution. The ZHO nodes do not use the ComfyUI API and instead are just a wrapper to allow using the original diffuser code. This is relative fast to implement at the cost of the inconveniences you mentioned. I will give the other node you mentioned a try.
because he wants to limit your freedom in Comfy, and lock down everything in his own node
It's a shit extension and many others are rerouting this shit work into better function nodes that dont lock down other passthroughs.
@a.akacic, Thank you for sharing your perspective.
Thank you very much for such a great job, it was only thanks to you that everything was able to get started.
That's great to hear, @sklad_2023! Glad it worked.
Thanks, you explain everything in great detail. How long would this take to generate on a 4090 you think?
Hello @xcom9648! I estimate it will take slightly longer than base SDXL with refiner at 50 sampling steps.
Thank you so much for such a helpful video and breakdown of the time codes ❤
Thank you, @Shisgara77! I am glad it was helpful.
Thank you, everything works. Very good lesson!
Glad it helped you, @intergalacticpassenger5911!
Thanks for sharing :D Keep it coming!
Thank you, @zimnelredoran9985! Will do!
Great tutorial! Thank you for the detailed instructions!
Glad it was helpful, @yizhouqian5899!
I still had an error showing the lack of "diffuser". Do you have any idea about this? Thanks! @@CodeCraftersCorner
@yizhouqian5899 Did you invoke your ComfyUI python when installing the dependencies? Alternatively, you can manually install it by doing -m pip install --upgrade diffusers
Thanks for the feedback. I have manually checked the python version as well as diffuser installation and import. Everthing appears to work properly. However, I still run into the same error code when loading InstantID. It is really strange...@@CodeCraftersCorner
@yizhouqian5899! Hmm, if you've verified everything and still encountering the error, I not sure what else you can try. It might be best to wait for the official ComfyUI implementation. It should provide better compatibility. Hope it comes out soon for you to try.
Hi, thanks for this tutorial, but I have a question about the manager button, why in this video there's no "manager" and "share" button under "load default" button? Because mine also doesn't have, but many other videos they have those buttons
Hello @silverstone6849! You will need the ComfyUI Manager. I made a video on how to install it here: ua-cam.com/video/qKO6pZAv0jM/v-deo.html
@@CodeCraftersCorner oh thank you very much for your reply, I'll check it out😁
@silverstone6849 👍!
Your the video is the best tutorial out there even better than famous UA-camrs. I run into an issue which is the first step ID Contronet Loader won't load even though I have downloaded the models and have the correct path in place (I haven't rename the controlnet models). I couldn't perform the .venv as well. Any advice?
Thank you for watching, @ZakariaNada! Try to follow this tutorial. It's my updated video on InstantID. ua-cam.com/video/_8iElCxHg-c/v-deo.html
You are the best of the best
Thank you so much, @djivanoff13! Really appreciate it.
hi i have issue installing artgallery & gemini custom nodes, after installing the comfyui UI not working
Hello @satishpillaigamedev! There is a version available. I am editing the video. It should be up by early next week.
hi, thank for the great tutorial.
I'm getting an error with onnxruntime when I choose GPU for InsightFace Loader. However with CPU it works fine.
here's the error message :
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 , make sure they're in the PATH, and that your GPU is supported.
Thank you @zhoobinnourian! Yes, some CUDA version may not be compatible with onnxruntime-gpu. Choosing CPU is the correct choice here. The developer note's section provides more information here: bit.ly/48VHCzN
Bro! Thank you for a job well done!
Thank you, @MrLespola!
it is taking like 14gb during generation but at last step causing a 18-19gb vram usage spike. May be its better to wait for official implementation.
Thanks for sharing your experience, @PyruxNetworks! Yes, the VRAM requirement is challenging. Waiting for the official implementation is a better option. Appreciate the support.
Help! AttributeError: 'StableDiffusionXLInstantIDPipeline' object has no attribute 'dtype'
Hello @JackTorcello, the only suggestion I found on the topic is "Try to upgrade diffusers to version 0.25.0". The developer has not responded on the issue.
Thanks. I ran it, but I keep getting this message "Error occurred when executing LoadImage". What should I do?
Hello @lilillllii246! Can you try with a different image? You can also try removing (deleting) the LoadImage node and add it back again.
Hey Bro, is it worth building a live product with this? can think of some good use for customers? Your thoughts?? Great Video!!!
Hey @imranl8742! I would recommend waiting for the official ComfyUI InstantID implementation. This version is in early access, uses a significant amount of VRAM (14-18 GB), and has compatibility issues with certain models. Keep an eye out for updates! Glad you liked the video!
@@CodeCraftersCorner thanks for the heads up!
Quick question you do freelance work? thanks
Sure, open to the opportunities if my workload permits.
Error occurred when executing PreviewImage:
'str' object has no attribute 'shape'
Hello, @MrTeddi100! This happens when insightface cannot detect a face. You can use the prepare image for insight face node. Here is a link to the solution: bit.ly/4c48GP5
Amazing my friend, but too much for me haha!!! keep it up!
Thank you for watching, @MarcoAndrade00!
I just discovered your channel. Great video, explained very well. Can you make a video on hardware requirements for running stable diffusion locally, based on low med and high budget? Like explaining, what difference to expect when we upgrade to high end GPUs and what cons to consider when settling down with cheaper ones. Stuff like that. I am currently running on runpod and thinking of getting a good GPU without breaking the bank. Thanks in advance.
Thank you for the feedback, @PallaviChauhan91! I already have a few projects I am working on but I will add it to my list. Great suggestion!
@@CodeCraftersCorner I thought with a technical background like yours you would be able to give a much better understanding of hardware rather than from a affiliate marketer on UA-cam.
@PallaviChauhan91 Yes, added to my list of todo.
loads of likes!
Thank you, @SyncWaveAnimation!
I got this error when executing the insightface node:
Error occurred when executing IDGenerationNode:
StableDiffusionXLControlNetPipeline.check_inputs() takes from 5 to 14 positional arguments but 15 were given
Have no idea how to fix it...
It seems there is a model mismatched between your controlnet model and your checkpoint. Can you try with the load model from hub node?
Thanks again for a very detailed and explanatory tutorial. I did everything you did to the letter, however.
ModuleNotFoundError: No module named 'diffusers'
Cannot import C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-InstantID-ZHO module for custom nodes: No module named 'diffusers'
Import times for custom nodes:
0.0 seconds (IMPORT FAILED): C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-InstantID-ZHO
I get a module could not be found error so it cannot be imported. I would appreciate if you can help me where I may be making a mistake.
got the same problem: No module named 'diffusers'
Hi @hudaicihandurmus5414! To troubleshoot, please follow these steps:
1. first check if you have the correct requirements.txt file in the ComfyUI-InstantID-ZHO custom node folder. (Go into ComfyUI > Custom Node > ComfyUI-InstantID-ZHO > Open the requirements.txt file). Check and make sure "diffusers" is in the file.
2. Next go to your ComfyUI root folder (where there is the run_cpu.bat and run_nvidia_gpu.bat) file. Open the CMD from this folder by going into the address bar, type CMD and press Enter.
3. Run the command (without quotes) ".venv\Scripts\activate"
4. This will activate the virtual environment.
5. type in "cd ComfyUI\custom_nodes\ComfyUI-InstantID-ZHO" and press Enter
6. This will change directory to ComfyUI-InstantID-ZHO.
7. type in python -m pip install -r requirements.txt
8. press enter.
9. This will install diffusers.
A common mistake is not activating the virtual environment and installing the requirements file in the wrong directory. Before running the command, make sure that in the terminal, it says (.venv) at the beginning. If not, do steps 2 and 3 again.
@sittingmadman, please see the response above.
Error occurred when executing ApplyInstantID:'embedding' ==> I'm getting this error message, does anyone know how to fix it?
Hello, @lilillllii246! There's a new version of InstantID now.
😂 You the best spammer sir. Thanks for the updates 😎👌
Thank you, @PixelsVerwisselaar!
@@CodeCraftersCorner 💪
👍
First! 😃 thanks for this!!
Thank you so much for the support, @rifz42! I truly appreciate it.
There seems to ba a bug - people using 16Gb VRAM (mine is 8Gb VRAM) - are getting this ERROR, as am I
Error occurred when executing Ipadapter_instantidLoader:
Allocation on device 0 would exceed allowed memory. (out of memory)
Currently allocated : 16.00 GiB
Requested : 5.00 MiB
Device limit : 8.00 GiB
Free (according to CUDA): 0 bytes
PyTorch limit (set by user-supplied memory fraction)
: 17179869184.00 GiB
Win 10, 64Gb, RTX 2070 (using either CUDA or CPU setting)
@JackTorcello Yes, there seems to be a bug.
Great tutorial! Unfortunately I got this error "Error occurred when executing IDBaseModelLoader_local: HIP out of memory" is there a way around that? Or I just need a card with more vram?
Thank you, @rykk! Yes, with this implementation, the out of memory error is quite common. There is a new implementation of InstantID on the way which will follow ComfyUI convention. I suggest waiting for it before investing into a new card.
"You do not have sufficient privilege to perform this operation." 37:08 how can I grant this permission?
Hello, @itsmenord1993! You can skip this step and manually copy the checkpoints to the correct folder. Your system may require administrative rights.
Despite doing step by step the model failed to load.....
error - 0.8 seconds (IMPORT FAILED): D:\Stable Diffusion
ew_ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-InstantID
Sorry to hear that it did not work, @filmyentity! You may want to create an issue in the Github repo to let the developer know.
@CodeCraftersCorner what is the difference between InstantID , PhotoMaker & IPadapter ? , I got confused between all of these 🤔
Hi @user-kk2ve1un4u! All three of them are techniques to generate images from a face input image in different styles and poses. They will do the same thing but give you slightly different results. IPAdapter has other uses like it can grab style from an input image and transfer it to the output image. To my knowledge, PhotoMaker and InstantID cannot transfer styles.
Thanks a lot @@CodeCraftersCorner
You're welcome!
my GPU is Nvidi RTX 3080 and I got an out of memory as shown below , do you know a solution for it ?.
torch.cuda.OutOfMemoryError: Allocation on device 0 would exceed allowed memory. (out of memory)
Currently allocated : 12.66 GiB
Requested : 1.56 GiB
Device limit : 16.00 GiB
Free (according to CUDA): 0 bytes
PyTorch limit (set by user-supplied memory fraction)
: 17179869184.00 GiB
Hello @user-kk2ve1un4u! I suggest trying the new version. Here is the link: bit.ly/3Ome31I. Hope this one works.
Error occurred when executing Ipadapter_instantidLoader:
'StableDiffusionXLInstantIDPipeline' object has no attribute 'dtype'
File "C:\ComfyUI\ComfyUI\execution.py", line 155, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI\ComfyUI\execution.py", line 85, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI\ComfyUI\execution.py", line 78, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-InstantID\InstantIDNode.py", line 191, in load_ip_adapter_instantid
pipe.load_ip_adapter_instantid(face_adapter)
File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-InstantID\pipeline_stable_diffusion_xl_instantid.py", line 156, in load_ip_adapter_instantid
self.set_image_proj_model(model_ckpt, image_emb_dim, num_tokens)
File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-InstantID\pipeline_stable_diffusion_xl_instantid.py", line 174, in set_image_proj_model
self.image_proj_model = image_proj_model.to(self.device, dtype=self.dtype)
^^^^^^^^^^
File "C:\ComfyUI\python_embeded\Lib\site-packages\diffusers\configuration_utils.py", line 137, in __getattr__
raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
Hi @krupnikova! It seems like there is a mismatch between the checkpoint and the ipadapter model. Are you perhaps using the load model locally node? If so, can you try with the load from hub node? If this does not work, you may have to wait for the official implementation as it will provide better compatibility.
Any idea how to fix?
Error occurred when executing Ipadapter_instantidLoader:
'StableDiffusionXLInstantIDPipeline' object has no attribute 'dtype'
Hello @SheRoMan! Are you perhaps using the load model locally node? Can you try with the load model from hub node? It seems like there is a mismatch with your model and the ip adapter model.
@@CodeCraftersCorner okay thanks
@@CodeCraftersCorner now i'm getting this error 🥲
Error occurred when executing IDBaseModelLoader_fromhub:
Using `low_cpu_mem_usage=True` or a `device_map` requires Accelerate: `pip install accelerate`
BTW I install all the requirements.txt as you showed in video with no errors
Maybe a compatibility issue. Try adding 'accelerate' to the requirements.txt file and reinstalling. If the problem persists, you might want to wait for the native ComfyUI-InstantID project. Here's the link for reference: bit.ly/3Ome31I
@@CodeCraftersCorner Thank You
I love U
Thanks a bunch, @AICreator1314! Appreciate the love!
Getting this error
Error occurred when executing InsightFaceLoader_Zho:
[ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from D:\000AI\00ComfyUI\ComfyUI\custom_nodes\ComfyUI-InstantID\models\antelopev2\1k3d68.onnx failed:Protobuf parsing failed.
File "D:\000AI\00ComfyUI\ComfyUI\execution.py", line 155, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\000AI\00ComfyUI\ComfyUI\execution.py", line 85, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\000AI\00ComfyUI\ComfyUI\execution.py", line 78, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\000AI\00ComfyUI\ComfyUI\custom_nodes\ComfyUI-InstantID\InstantIDNode.py", line 71, in load_insight_face_antelopev2
model = FaceAnalysis(name="antelopev2", root=current_directory, providers=[provider + 'ExecutionProvider',])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\000AI\00ComfyUI\python_embeded\Lib\site-packages\insightface\app\face_analysis.py", line 31, in __init__
model = model_zoo.get_model(onnx_file, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\000AI\00ComfyUI\python_embeded\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 96, in get_model
model = router.get_model(providers=providers, provider_options=provider_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\000AI\00ComfyUI\python_embeded\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 40, in get_model
session = PickableInferenceSession(self.onnx_file, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\000AI\00ComfyUI\python_embeded\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 25, in __init__
super().__init__(model_path, **kwargs)
File "D:\000AI\00ComfyUI\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 419, in __init__
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "D:\000AI\00ComfyUI\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 452, in _create_inference_session
sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
please help
1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "D:\000AI\00ComfyUI\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll" how to solve this error
Are you perhaps running on CPU? There a dependency which requires GPU, onnxruntime-gpu.
You can try to re-install from scratch. When you reach the step to install dependencies for ComfyUI-InstantID-ZHO, modify the requirements.txt file. Change onnxruntime-gpu to onnxruntime and then do the python -m pip install -r requirements.txt.
@@CodeCraftersCorner I have a machine with RTX 4070
running this command python.exe -m pip install onnxruntime-gpu will solve?
hmm, in that case, can you make sure that you have downloaded and replace the 1k3d68.onnx placeholder file with the correct model? It should be around 137mb in size.
Did anybody run this on 12GB GPU? Whats the time?
Have you tried the PhotoMaker implementation by ZHO? InstantID takes a little more than twice as much time as PhotoMaker. It can give you a rough estimation.
any idea please help !
Most likely, your credentials are no longer valid. If you are using SSH, then go to GitHub and set up a new one or you can try this in the terminal:
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
You can go to this page for more info: docs.github.com/en/authentication
@CodeCraftersCorner thanks for the reply, bro .
I've tried this option also, but it says
fatal: unable to access could not resolve host: socks
I've reinstalled Comfy. Is that a all in one solution. like reinstall windows or some simple solution.
@praneethsingh7109 in that case you can download the project as zip from GitHub and extract it manually into ComfyUI folder. Not sure why the error. You may have to reinstall Git.
Hello Sharvin, I don't know if my comment keeps getting deleted or I can't see it, anyway, I was wondering if you offer pair programming/tutor services. I am looking for 4 hours/twice a week, it would amount to $120/week, but I can negotiate if you are interested. You are an excellent teacher, would love to discuss further.
Hello Mehrad, Thank you so much for your kind words. I'm open to discussing the details further. Could you please send me an email at CodeCraftersCorner@gmail.com, so we can discuss the details; schedule, pricing, and any other specific requirements you may have.
If it takes 41 minutes generate an image you might as well just train a Lora or two of yourself in that time…
You are absolutely right, @JustMaier! With this implementation of InstantID, it is better for me to use other techniques.
Spam my friend !!! Thanks
Thank you, @johnlenoob6951!
ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
File "E:\ComfyUI\execution.py", line 155, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "E:\ComfyUI\execution.py", line 85, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "E:\ComfyUI\execution.py", line 78, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "E:\ComfyUI
odes.py", line 1415, in save_images
full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir, images[0].shape[1], images[0].shape[0])
AttributeError: 'str' object has no attribute 'shape'
😂😂😂
Sorry, I solved the problem by restarting my computer, 🤣🤣🤣🤣and by the way, you are really awesome
Glad you were able to solve it, @andychang9529!
too lOOOOOOOOOOOOOOOOOng wait for image :(
Yes, @andrewq7125! Waiting for an optimized implementation.
you need to stop overexplaining EVERYTHING makes it so painful to spend 2minutes waiting for a cmd command
Thank you for sharing your perspective, @tommymarcetta9571! While you may already be familiar with certain aspects, I aim to help a diverse audience with varying level of expertise. The intention is to ensure that everyone, regardless of their familiarity with the topic, can follow along. I appreciate you feedback and will consider ways to balance the level of detail in the future videos.
I got this error when executing the insightface node:
onnxruntime.capi.onnxruntime_pybind11_state.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from D:\Projects\stable-diffusion\execution\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-InstantID\models\antelopev2\1k3d68.onnx failed:Protobuf parsing failed.
Have no idea how to fix it.
Hi @PeterChen-zx3ni! Can you try to re-download the 1k3d68.onnx model? Then replace the current one with the newly downloaded one and try again.
Getting stuck at this
Error occurred when executing InsightFaceLoader_Zho:
File "B:\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "B:\ComfyUI\execution.py", line 82, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "B:\ComfyUI\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "B:\ComfyUI\custom_nodes\ComfyUI-InstantID-ZHO\InstantIDNode.py", line 71, in load_insight_face_antelopev2
model = FaceAnalysis(name="antelopev2", root=current_directory, providers=[provider + 'ExecutionProvider',])
File "C:\Users\john_\AppData\Local\Programs\Python\Python310\lib\site-packages\insightface\app\face_analysis.py", line 43, in __init__
assert 'detection' in self.models
Hello @JackTorcello, the only suggestion I found on the topic is "Try to upgrade diffusers to version 0.25.0". The developer has not responded on the issue.
I get this ERROR - Win 10, RTX 2070 8Gb VRAM - cannot import name 'id_tensor_storage' from 'transformers.pytorch_utils' (C:\Users\john_\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\pytorch_utils.py) - Error occurred when executing IDBaseModelLoader_fromhub
The answer:- pip install peft==0.5 and ReStart ComfyUI
@JackTorcello Thank you for posting the solution!