InstantID Implementation in ComfyUI for Stable Diffusion SDXL

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone it almost feels like I am spamming videos at this point but uh we got a new project instant ID which look promising it is yet another project which takes the face Fidelity and tries to match it as closely as possible to the input image but this one it's interesting because it is inspired by IP adapters and control net so we have both concept of Ip adapter as well as the level of control which we get from control Nets so here I am on the official GitHub repository by instant ID and the project name is also called instant ID now this project got over 2,000 stalls before even releasing the code base so it was just a read me with with some Concepts and people liked it now this project came out yesterday at least the code base was release yesterday for me and if you go down you can see that it has multiple IDs and it can also do multiple timey and there's also a good picture here that tells us we have an ID this ID is basically generating the face and then we have another one that is generating the background we got a third one that is generating a second person and then we also have star Li so we can take a picture of a person and we can change it into different STS now there's a good comparison between previous work you have been following the advance in the AI field then you probably already know that we have IP adapter base ID and we got version two then U maker came out and now we have instant ID so there's a good comparison here you can take a look I will have a link in the description as usual to get started with the project you have a couple of options the first one is a gradiate demo poed by hugging face from the GitHub repository can click on the hugging face spaces and this is a button it will open a new tab and in here at the top you will see some instructions on how to use it the top left drop- down box is for an image so this could be a person a character the bottom one is for a POS so remember that I said that this project was inspired by control net so you can add a person or even a character in a different completely different pose and it will take that pose and generate an image using the face from the top drop down and the pose from the second drop down on the right you will get the output this is an option but you do not have control over the number of images that you want to generate you cannot add anything into the pipeline which is going to bring me to my second option to try it out and we have to scroll a little bit down as the download section there is a Community Resources section and in there is confy UI confy UI is the front end for stable diffusion there's also automatic 1111 which is quite popular but we do not have an extension for automatic 1111 as of at least to my knowledge I will be using comy Y locally and I'm going to show you how you can install the zoo zoo zoo implementation inside of compi now if you have been following the channel you may already be familiar with z z zo they provided a diffuser implementation of pH maker and now now they are bringing a diffuser implementation of instant ID so just like Photo Maker this extension by zo zo zo is not the official implementation it again going to say unofficial implementation of instant ID or confy UI basically it's giving us an early preview of how instant ID works now just like video maker when installing this you will get a lot of errors and in today's video I will be talking about the errors I encounter and how I was able to resolve it so hopefully when you follow today's video you will be able to get instant ID running in case you get issues like out of memory error for this one we will just have to wait for the official implementation one that actually uses the confi pipeline now some of you may have already tested it and if you were able to get it to work that is great for me when I followed the instruction on the install and how to use section it did not work on my regular compi installation instead I got a lot of dependencies conflict which ultimately broke my confy wi so I highly recommend you to not install this version of instant ID Direct direct L on your working confy installation instead navigate to confy GitHub repository by confy Anonymous you scroll down where it says installing confy UI click on it it will bring you to the installation guide click on direct link to download and this will give you a zip file now if you've downloaded it by default it goes into your downloads folder so so you can go into files type in files Explorer or if you have the option you can select downloads directly from there once it's open just look for confy UI Windows portable you need to extract this so click on it once to select it at the Top If you are using Windows 11 you will have extract all button and then click on the browse option and just choose a path where you want to save your new installation of confy UI I'm going to extract mine in the downloads folder itself and we should see it here this will take some time so I'm going to come back when it's completed for those who do not have Windows 11 or if you are on a previous build then you may not have the extract old option in that case I recommend using seven zip you can go into the GitHub Rory for comp UI and under the installing section you will have a link a direct link to 7zip website click on it and then download the version for your particular operating system now once it's completed you will have a folder confy UI Windows portable now do not delete the zip file just yet I'm going to show you the first method it is the recommended way by zo zo zo and we're going to follow these instructions in case it does not work we are going to uninstall it and install another version inside the config y Windows portable go into it and then go into confy UI open up custom nodes inside here go at the top type in CMD then go back into the GitHub repository copy the second line click and drag to highlight press contrl C to copy go into the terminal press contrl V to Pace if fuel terminal does not allow you to Pace with contrl v then you can press control shift V to Pace or you will need to go at the top right click and select paste from the drop down once you paste the line press space and then type in confy UI Dash instant I D Dash and then I'm just going to add Z so that I know this version is from zo zo zo diub user because as with bomaker we may get a confi implementation basically the official implementation and if both project has the same name is going to give us a name conflict now to clear the CMD you can type in CLS and then type in di press enter and what we're looking for is to make sure that this fold was successfully cloned then type in CD space type in c m press tab it will go to complete and give you the name otherwise you can type the name exactly as it is press enter this will change the folder and bring us into this new folder so all we've done is go into the folder and right now we are here then we need to invoke the python which is inside the confy Y Windows portable folder so right now we are here we need to go back once and then a second time and then a third time in order to go back in the terminal we have to do two Dot and in my terminal you can see all each folder is separated by a back slash so I'm going to type in a back slash now these two dot means that I went back one folder so right now I'm inside sign the custom node folder I have to do this two more times in order to go back into confy UI Windows portable so I'm going to type in two dots three times this will send me into the confy Y reduce portable folder inside it I have the python embedded and now I need to invoke the python.exe then- M pip install Das all requirements.txt this will install everything that is inside this file and this is what is recommended in the GitHub repository we've done the git learning we've gone into the config y instant ID it just rename hours with the dash zoo at the end and then this pip install dasr requirements.txt because we are using the python inside of confy UI python embedded bold we need to do this at the beginning and then do the PIP install DHR requirements as suggested in the GitHub repository now press enter and at this point we just hope that it works if it does not we are going to move on to the second method which is the method which worked for me now here it started installing and then it reach inside face and it's trying to build the inside face dependency here and you can see that it's getting the requirement to build the wheel but then I got an error saying that I do not have the module name scon now this is an easy fix all you have to do is to install the scyon dependency so to clear the output we are going to type in CLS clear press enter Then to go back up and get the previous command in the terminal we can press the up Arrow once in this case it's giving me CLS clear I have to go back once more so I'm going to press the up Arrow again it will give me my pip install dasr requirements.txt command I'm going to remove the dashr requirements so at the beginning I have my Python and then dasm pip install scyon and then the C is capital press enter I will install this one first it's completed I will press up Arrow once twice and the third time to get the PIP install dasr requirements.txt press enter so once again it's installing inside face and this time you can see that the installing built dependencies was successful the getting requirements to build the wheel was successful and if we go all the way down you can see the output it was able to start the buildt process but then it could not complete it we got an error if you got this error go back into your browser any search engine type in Microsoft build tools and then click on the first option it should be by visual studio. microsoft.com and then at this point you will download the community version the free download now I've already installed it but uh I'm going to show you open the installer when you first install it it will download in my my case I already have it so it did not download but uh you will see something similar for you you may not have this these two options maybe it will show you the aaable whichever the case all you need to do is to select the visual studio build tool and you may get a window like this you need to select the C++ option and on the right side make sure that the windows sdd is selected for your particular Windows version so I have Windows 11 and windows 11 is checked in case you have Windows 10 and if you scroll down there will be a Windows 10 SDK you can select a Windows 10 SDK then click on install it's about 4 gab in size now I already have it as you can see I've installed two different version to try it out but it's still when I follow the instructions on the GitHub repository like this it does not work I'm still getting the same error saying that the file is missing now at this point if you were able to go beyond this point so you did not get any error that's great just skip to where I show you how you can create the workflow but for those of you who got the same error exit out of this terminal instead of following these instructions I'm going to show you a different way of doing it go into the file explorer and you may have to go back a couple of times in order to get to your downloads folder or wherever you place the comy UI Windows portable folder click on it press delete and we are going to delete this version completely that is why I said do not delete the zip file because once again we are going to click on it extract and I'm going to go into my downloads folder CLI on extract this will give me a completely new confy y installation folder okay it's completed I'm going to go into the confy Y Windows portable folder and then you will need to delete the python embedded folder completed we are going to recreate this folder using the correct dependencies and the correct python version for instant ID to work so select the folder and press delete this will delete about four to 5 GB of files okay so now we do not have that folder go to the top click there type in CMD open the terminal into this folder and now we want to make sure that we have the correct iPhone version so type in Python Das Dash version press enter in my case as you can see I have the python 3.2.1 install this version is to ahead for instant ID to work instant ID will require python version 3.10 in order to work so the easiest method in order to install the python 3.10 if you are using Windows is to type in winget press enter if you see an output like this and it tells you Windows package manager it means you have the latest version of Windows Windows 11 and wiet is installed now again to clear type in CLS press enter then we are going to do winget search python press enter this will take some time it will go on the internet download the list of basically packages which have the python in their knee now go to the top and look for the ID python. python on 3.10 so 3.10 there is one that says 3.1 that is an old version so you need the one that says 3.10 so put your mouse just before the python and drag over until you have all the characters then press contrl C to copy now because the terminal input field is at the bottom I'm going to clear the terminal by typing CLS pressing enter and this time I will do Wing get Space install space dash dash ID and then paste in the ID the python do python do 3 do n if you are not able to copy it post the video and type in as it is make sure that the b in Python is capital in both cases so Upper Keys P then press enter now in my case I already have it installed but in your case you may get a popup that tells you you need to give administrator rights so just press on okay or confirm and then you will get an installer where all you need to do is to click on next next next until the installation is completed then to check if the python was installed correctly you will need to close out of the terminal first go back to the top CMD again then do Wing get space list space then type in the pipe symbol the pipe symbol is just this line here the vertical line on my keyboard it is above the enter key and I need to press shift that button in order to get it now after the pipe character press space and then we are going to type in find s space dap tool for python press enter and just should have an output similar to this where it's going to give you the python 3.1 0.11 in my case so it's basically the python 3.1 which is installed now if you have other python version that is okay you can have the python 3.9 3.11 3.12 and so on all of that is okay we are only going to use the python version 3.10 so whenever we start confy UI we always go into the Run nedia GPU we double click on that and it loes conf so if we open this file in N pad you will see that it's telling us to go into the python embedded python.exe and then run the command if you're a Linux user you're probably typing this command manually what we need to do right now since we've deleted this python embedded folder we'll have to recreate create a virtual environment using the python 3.10 and then install all the dependencies which compy UI will require inside that virtual environment let's minimize the terminal go into your start menu and if you have recently installed file here it may tell you your python 3.10 is somewhere here otherwise you can go to the top where say search and type in Python from the list you will have all of your python version Look for the python that says 3.10 right click on it select open file location now this is still a shortcut at the top we can see that it's pointing our the start menu program and so on so right click on the python 3.10 once again and select open file location now once it's open the actual location you will see python.exe right click on it and choose copy as path in case you are not able to copy as path you do not have this option maybe you're using Windows 10 in that case go to the address bar at the top select it in case it's not selected for you like this you can press contrl a to select everything basically highlighted and then press contrl C to copy you can also right click and copy then then go into your terminal P it put e back slash type in Python press the Tab Key and it will go to complete giving you python.exe okay so right now we are in Booking the python versions 3.10 and we are going to create a virtual environment with it so we'll do space- m v EnV which stands for virtual environment and then we need to give it a name now coffee youi use Python embedded you can use Python embedded but it is not actually embedded right now so I'm I'm going to call it do bemv which is basically the traditional name whenever developers are creating virtual environment so I'm going to stick with this best practice again the path to the python 3.10 in working the python then space- m space V MV space do VMV to create the virtual environment press enter this will create a virtual environment give it some time until you see the command prompt back minimize the terminal once again we can close out of the folder for Python 3.10 and if you go into your folder for confy y you should have the folder Dove EnV there okay now go into the terminal once again and now press do venv back slash scripts the s in scripts is capital uppercase back slash activate press enter and you should have an output like this where it tells you that you are using the virtual environment so to check we can do python Das Das version remember when we did this command previously for me it was telling me python 3.12 and this time when I press enter it is telling me that I'm using the python 3.10 okay so from here on whenever I need to call in Python I will just type in Python and it will automatically take this python 3.10 now we can just start config y because we have not installed dependencies or confy UI to run properly so let's go into the GitHub repository for comy UI the one from confy Anonymous and in the list of Fes if you scroll a little bit down there is a file called requirements. EXT click on the file it will open and give us all the requirements from the file copy the raw content by clicking on this button here this will copy the content now go into file explorer right click click on new select a text document rename it to requirements.txt and then open the file in notepad or any other editor that you may have by the way to get this context menu I am right clicking on the file I will select edit in not pan and I will press contrl V to paste you can also go into edit paste and save this file by pressing contrl s or go into file save now at this point we cannot just run this requirement and install everything it will go in and install the latest version of everything that we have here and that is not what we need right now we need to install the dependencies for our own operating system so stable diffusion at least coni works with the pytorch library that is the Deep learning library that comyy uses let's go into the browser open a new tab at the top type in byy torch it is py t r c press enter and the first link should be the one it should be by torch. org click on it this will send you into the website homepage at the top there will be a get started button click on it and then in my experience most of the time it auto detects what is the best configuration for me now in case you do not see any of these red selected boxes then you may have to select it by pressing on the options so as you can see I can change it to preview or I can select this table so I am using Windows I'm going to select windows I am using the PIP installer so this is what I'm going to do the language is p I found and then the compute platform I'm going to select the 11.8 version now once you've selected these options at the bottom here where it says run this command it will give me a command to run in the terminal I'm going to copy everything is starting from install all the way to Q 11.8 this basically means Cuda 11.8 so I am leaving this pip three out because for Windows most of the time you will have to type in PIP without the number three if you using Linux if you're using a Mac OS then copy the PIP three and then you will use that copy it by highlighting everything and then right clicking copy you can press contrl c as well to copy go into the terminal remember we always need to have this V EnV in front before we run these commands so if you do not have this in front you will have to do the VMV back slash the scripts back slash activate press enter in order to get that next we'll do python dasm pip and then paste the line now if you accidentally copied the PIP three then when you pasted it use your arrow keys to move the cursor over and remove the three from the command if again if you're using Mac OS or Linux usually by default you will get python 2 and Python 3 install so you'll need to tell the operating system which python you want to use that is the reason why there is a three over there in Windows we do not have python installed by default now once you have all of this press enter and this will take some time to go online download the correct python TCH version okay so once it's done you should see successful install and then all the dependency is there I'm going to do CS to clear then I will go back into file explorer open the requirements.txt in no pad okay so here are the requirements and at the top I have the requirements from py chge so you can see that we have the same command twice one in the py so we have torch here and then we also have torch in the comments what we need to do right now is to remove all the duplicates dependency otherwise it may uninstall the previous version the one from py torch and install a new version so we're going to remove torch you can press delete backspace on your keyboard to remove it well closer remove torch vision and that's it press crl s to save file save then go into to your terminal if you still have the long log history from when we were installing the P Charge dependencies you can press CLS to clear press enter and then we now need to install everything that was inside the requirements.txt file we are going to do python dasm pip install Das all requirements.txt the command there press enter okay so it's completed for me and again I have successful here if you see this warning that tells us to upgrade the PIP version do not worry about it we do not require updating pip or any of the dependencies to continue forward again I'm going to type in CLS to clear the terminal output and at this point we basically have confy y as a fresh install just using the python version 3.10 so we are now ready to do a test we need to modify one last thing open the Run Nvidia GPU dobat file I'm going to use notepad for that and at the beginning you can see that it is still pointing towards the python embedded folder all we have to do is to change this part to point towards our virtual environment go into the terminal I will show you how you can get the path to the virtual environment python press do venv back slash scripts again the S is uppercase back slash type in py and press tab this will aut to complete and give you the python path now to select this you can highlight everything from starting from the dot V EnV all the way to exe highlight it press contrl C to copy go into the new new pth remove the previous python path so from dot all the way to dotexe remove it by pressing backspace or delete then paste the New Path by pressing contrl V now in case you were not able to copy it then just pause the video and type in the command press contrl s to save go into file save close out of the node path remove everything from the terminal if you have anything press Escape will clear everything if you also have your log you may want to do CLS to clear the log then if you following along you should be inside the confy UI Windows portable as well as inside the virtual environment minimize this terminal we may use it later on and run the Run Nvidia _ GPU file the one that we just modified now in case for those of you who are using the run CPU version you will do the exact same thing you will open the runor CPU with no pad and then just replace the first section the python path with the virtual environment path press save contrl s to save we will go into file save in order to save the file run confy y to test I'm going to double click on run and VI GPU and we can see that it found everything it started comy y as usual if your comy UI opened up inside the web interface then you know that the previous steps that you've done is correct close out of that web interface close out of this particular terminal the one that is running confy UI next we are going to go into confy UI folder and then there will be a folder name models you may be familiar with it this is where we are going to place all the checkpoints if we have any control net Photo Maker models all of that is going to go inside this folder however for us we are going to select that folder and press delete remember this is the new confi folder it's not your working confy y do not delete the models folder from your working comfy work this is the new one as you can see I've deleted the models folder now I need to recreate it but I do not want to redownload or copy paste checkpoint from one folder to another nor do I want to go into this extra model half and then for each model and for each section I have I have to create a section one for checkpoint one for control net one for IB adapter and have the path there instead I'm going to show you an easier way using symbolic link which is going to do all of that for us let's go into the terminal once again and we need to navigate into this confy y folder so right now I am inside the root folder so I will do CD confy UI press enter and now I have inside the confy UI folder if the terminal that you using is power shell you will have to do CMD to go and press enter in order to go into CMD this will only work inside of the command line terminal CMD all right so if you followed along you should have the CMD open already this is what we were using all this time now type in MK link space forward slash d space type in models this is the folder that we want to create then the last parameter is going to be the path to a models folder which has all of the check prints so let me explain what we are doing here we are going to create a symbolic link and this MK link is responsible to do the symbolic link so I've opened two file explorers the one in the background this one it's from my new comy UI installation the one that we were working on all this time and this one is a folder where I have working confy and this is where I save all of my models so I'm going to go inside of config y testing go into config Y in here I have models if I go into checkpoints you can see I have all of my checkpoints here in your case you need to navigate to a folder which has the models and then all of your checkpoints there then right click on that models folder copy as path go into the terminal you should have MK link for slash D models is a new folder that we are going to create and this folder will link to you in my case it is inside of confi testing and then models press enter so if you've done everything correctly it will tell you that we are creating a symbolic link or a folder called models and this models folder will be linked to an existing models folder so if I minimize this I go into my confy y Windows portable the new installation and I go back once then go into confy y again just to refresh the folder I will see let me zoom in a little bit I will see a new folder called models and there will be a little icon next to it that tells me that this is just a link to a different folder if I double click on this folder and go into checkpoints you can see I have all of my checkpoints here but this is not copying the folder and wasting spaces basically this folder here is 0 kilobyte in size it's just a link to an existing folder okay just to recap in case you are confused MK link is just a command to create a symbolic link for/ D we are telling the system that we want to create a new directory or folder and this folder will be called model and we want to link it to an existing models folder okay so we're gting the path to an existing model folder okay so hopefully you were able to do this part minimize the terminal go back once we should have the Run nvdia GPU double click on it again we are using the 3.10 python inside the virtual environment I'm going to close this error message and clear the canvas load the default canvas click on refresh and make sure that your checkpoints are there in my case they are there I'm going to choose one reduce the number of steps to four to six anything like that click on two promp go into the terminal at this point I can see that it is loading the model and it started generating an image so right now we have comy UI running it detected our models so if you have control net IP adapters any of those models it's already detected because of that symbolic link and we are using the python 3.10 version and it was able to start as well as generate an image so from here we are going to follow the steps for instant ID by zooo so let's close out of the terminal exit out of the browser go into the terminal and right now I am inside the confy folder I need to go into custom nodes folder so I will do CD custom press tab to go to complete press enter I am now inside custom node folder I will do get clone go into the browser go into the confy UI instant ID by zoo zoo zoo click on the drop down which says code copy it by pressing on this little icon copy URL to the board back into the terminals I will paste by pressing contrl V and then do space confy UI Dash instant - Zoo press enter this will clone the project I will do CD change directory into this comy y- instant id- Zoo press enter I'm going to clear the terminal just to make space for you to see everything go back into the GitHub reper story go down until we see installation or install section and then all we need to do is do pip install dasr requirements.txt so remember very important we are using the virtual environment I can simply do python DM bip install dasr requirements.txt press enter and wait for it to complete the installation all right so hopefully you were able to install the ments next we need to install the models so let's do CLS to clear minimize the terminal go into the file explorer and just navigate to the confy UI instant ID zo implementation the folder inside it let me zoom in a little bit there will be a couple of folders one will be checkpoints another one will be models let's go into GitHub repository for the confy Y Z mentation of instant idid and you want to scroll down until you see how to use and I do not speak Chinese but uh basically what is saying here is you need to download the control net model from this link so click on the link on this control net model link it will open the hugging face website the instant ID this is the original project and here very important you need to download both files the config Json as well as diffusion uncore PYT toore model. save tenses and equally important you need to keep the same name the Noe will look for this specific name in order to download it you can click on this button here download file or you can open this link you can click on the file name and then you will get a download button here so I've completed the downloads it is inside my downloads folder select the two files press control X to cut go inside the zoo zoo zoo instant ID folder inside of check points in here we need to create a folder called control net right click click on new folder and then do control net all lowercase go inside the control net folder and do control V to paste you can also right click and at the top you will have the paste option so you can click on this little icon to paste all right so again just to recap inside the checkpoints folder we are going to create a control net folder and inside the control net we will have the config Json as well as the diffusion undor patore model save tenses file next we need the IP adapter let's go back to the GitHub grou story and again it's telling us that we need to download the IP adapter so click on the link go into the hugging face page and this time you will download the IP adapter. bin pickle file so click on this download button or you can click on the name and click on download all right so it's completed I have IP aductor dobin file inside my downloads folder I will select it press contrl X to cut go into config y instant ID project and you need to go inside the checkpoints folder then where it says put models here you're going to control V to past the IP adapter bin file here so it should look like this inside the checkpoint folder you will have the IP adapter and then if folder called control net inside the control control net there will be the Json config file as well as the save tenses control net file now the last thing that we will need is these different models I believe they are four or five so click on the last link that you have and we have 1 2 3 4 five files which you'll need to download okay so select the first one click on download and this time I'm going to show you a little bit of trick because there are so many files if your browser gives you a download like this where you can choose to save as select the option save as and then simply navigate to your confy y the new confy y project the one we created the virtual environment for okay not your previously working one open the confy Y go into custom node open the zoo instant ID folder then go into models go into anti-loop B2 and you will see some files there it will tell you that it is only 1 kilobyte in size these are placeholder files basically telling you you need these file you need to replace these file so the name will be pre-selected for you just click on save it will replace the previous one with the new one that you've downloaded so I'm going to do it here click on save it will tell me to replace click on yes and on the right here it downloaded finished so I'm I've did I've done the first one I'm going to do the second one press on download again I will do save as and because I selected this folder it remembered the folder and in in this case it is telling me it is adding a one next to it I do not want that so I will go to the top I'm going to select the number two and it will change the name down press on Save and it will replace that one click on yes okay now in case you do not have that download box then all you have to do is click on download it will automatically download into your downloads folder like this then select the file press contrl X go into the zoo implementation models anti Loop and then in here press contrl V to paste and replace the placeholder file okay so do it for all of the fs once you've done you downloaded post of the models you should have five files and the total size should be around 400 and 7 megabytes okay double check if you see one of the files that's saying 1 kilobyte it means that you have downloaded that particular model so go into the instant ID hugging face page and look for that model and download that model now there's one last thing that uh you may have to install I needed to install it so I'm going to show it to you just to be safe it's not going to break anything in case you do not require so in the terminal where you have your virtual environment again if you close that terminal go into the new installation the confy Y new installation folder and then the V EnV back slash scripts back slash activate press enter and you will get the virtual red here then do python - MP install omga C NF press enter this is just a dependency that one of the nude requires at this point we don't need this terminal we can safely close out of this terminal go into the file explorer go back a couple of times until you're back at the root of confi fer and where we have the Run Nvidia _ GPU double click on it open your comy UI and we can do a test to see if the node got installed correctly so once confy loads this point hopefully you have this that tells us that it was able to import the instant ID comy y node I'm going to clear the canvas right click at node instant ID and then just make sure you can open all of the no so select the node top one okay and then open all of the nodes I'm going to this implementation will require all the noes anyway um there are two ways of loading models one is to download model directly from hugging base page and the second one is to use an existing model so let's go over the notes Let Me zoom in slightly hopefully you can see the top one we are just going to tell the system whether we want inside Bas to use the GPU or we can also use a CPU now we've install py George or Cuda if you remember when we went into py George get started it U detected that I needed Cuda 11.8 now in your case it may be something else but uh that is what you need to choose here if you are running on CPU then you want to change this to CB now the next nde that will require is the ID control net loader and in this case it says enter your P we'll need to go into file explorer config UI go into custom nodes instant ID by Zoo checkpoints select the control net folder right click on it and copy as path then go into the web browser remove the enter your path text select it and press delete or backspace then press contrl V to paste or you can right click and paste as playing text now if you copy it as path you will have these codes at the end as well as at the beginning like here so put your cursor there and remove that code just use your arrow keys to move your cursor left or right okay so to remove press okay or enter and now we have the path to the control net folder it's not the control net model it's the control net folder now this control net it needs to go into the model so you have two options for the model one is the ID base model loader from Hub this one will go to download a model and the second one you need to download the model manually place it inside of your uh models checkpoint folder and then you can use it now remember this project will also require sdxl based model you cannot use SD 1.5 models so if you have one already you can use the idb model loader locally and select an sdxl model otherwise you can select the default one now I'm going to select the default one because I want to do a test I want to make sure that everything is working then later on I can go into the model L locally and do some test there some users reported that they were not able to use certain sdxl models to generate with incent ID so you will need to test if your model is compatible now the one that is already provided with this node this one it's compatible okay back to the workflow ID control net loader control net output goes into the base model loader control net input very easy just connect those two the base model loader will output a pipe this pipe will need to go into the IP adapter now so here is the IP adapter node the pipe will go into pipe again where it says enter instant ID path I'm going to go into the folder this time I will have to click on back and copy the path four checkpoints I'm going to show you a second way of how you can copy the path so let's say I need to copy the path of this checkpoints folder I will enter it and then at the top I will click on it highlight it contrl C copy go into the web UI remove enter your path and then paste this method does not add boots at the end click on okay or enter and this will automatically detect the IP adapter dobin so again if you downloaded the file do not rename the file all right so at this point we have inside face loader all by itself control net goes into base model which goes into the instant ID IP adapter this IP adapter will go into the instant ID generation so model will go into pipe and the inside base loader will go into inside base the face image we can just do a load image for it similarly if you want a pose you can drag out and do a load image for the pose the positive and negative will require the ID prompt Styler positive will go into positive negative will go into negative okay so all the all the fils are connected here and image we just go out as a save image node or a preview node then the these are the recommended settings I have not experimented in fact I've just generated one image okay so at this point all you have to do is to enter a promp and then click on generate it's a little bit space out but I'm going to slowly show you all the noes once again control net loader goes into the base model loader which goes into the IP adaptive instant loader and this model goes into the instant ID gener ation now next you just need to fill in what is remaining so face image just input a load image in this case I have my face inside face you'll need the inside face loader and select the provider CPU or GPU F the pose image it's optional in my case here I've selected a POS just to see how well it's going to adapt to it and then the positive and negative will require the ID instant ID prompt styler and all the positive I've written a photo of a man that style of selected line art and I'm just going to use the default settings and I will click on generate so if I open my terminal you can see it loaded the component in your case you may see it's downloading this is because the Noe here it's going to download this model for me I've tried it before I've already downloaded this model and this is going to take a while for me the previous run took 41 seconds to complete if compare this with photomaker photomaker the zoo zuu implementation was taking 15 minutes and then we got a new implementation the offshore implementation of Faker by Shimizu and that one was taking about 3 minutes for me now this instant ID it is new and we have an implementation so right now it is taking 41 to 42 minutes for me to generate image I'm going to wait until we get an optional implementation if we do get one and then compare it but you can have an idea of how it's going to perform in case you trying it out so as you can see it's generating right now it's at 0% and well it's going to take some time now there's one thing not sure if it's going to show in this terminal okay it's not here because my text prompt is short I have a photo of a man but if you've copied a prop from an online source for example mid Journey or something like that you may get a lot of detail in the prompt when you check your terminals it will tell you that the text will get truncated at the 77 token and in case if you're wondering what this token number is and why you are getting this 77 token limit I have a video on the channel that's called prompt Engineering in there I explain what this 77 token limit is and why it happens all right so as you can see it's going and right now because I am recording it's telling me that it will take about 55 minutes to complete so I'm going to pause the video stop the recording let it complete and come back okay so it's finally completed and we can see the result here so this is the input image and this Bas is going to go here and this is the input POS and this POS is reflected here now it's not an exact one to one we can see the arm is in sort of the exact position and the line of sty got uh reflected really well it saw the glasses and put the glasses the hair is pretty much what it was able to to get and for the face as well it's pretty much what we can see from the input image so overall I think this is really good it's a good implementation however the cost it was this this one took about 4 five minutes probably because I was recording earlier and then um I stopped recording so if I was not recording when I did my first run it took about 41 to 42 minutes so on my system it is very taxing but uh on your system if you have an NV the 4,000 series 3,000 series or the 2,000 series you're probably going to get a huge speed up let me know if you were able to install the instant ID come UI custom node and um this was a long video if you stayed until the very end thank you guys I really appreciate support and I hope you well I will see you in the next video
Info
Channel: Code Crafters Corner
Views: 12,543
Rating: undefined out of 5
Keywords: instantid, comfyui, diffusers, ai art, install tutorial, python, virtual environment, symbolic link, controlnet, ip adapter, omegaconf, custom node GitHub, Open Source, face generation, zho-zho-zho, Code Crafters Corner, CodeCraftersCorner
Id: TckTmnYq6oU
Channel Id: undefined
Length: 59min 59sec (3599 seconds)
Published: Thu Jan 25 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.