Beginners guide to ComfyUI Stable Diffusion

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hello nice to see you again thank you for stopping and watching this video and where we're going to going over comei we're going to look on a nodes how to connect and how to use them config UI it's a stable diffusion basic um applications which is uze in visual way within nodes how to workflow is going to use it confy UI you can install an automatic 1111 by itself or what I would like by myself it's using stable Matrix stable Matrix is free UI which combine lot of different packages all this different type of the available the installations for the Mac Linux or Windows in one nice package very easy to use it very easy to install and if you don't have it or Miss for some reason I will provide link down below for you so you you can go on GitHub if you scroll down below right here you'll notice all what you need to do download just Windows Linux or Mac version which will install for you this UI in UI you can also go and consider the packages and install what packages you wanted the best things about when you add packages if you click add you notice right here you can select one of them and it's tell you where it will work or what I it will use it for example config UI if we click on this you'll notice it will can utilize CPU or Nvidia direct email AMD on Linux and Mac OS so it will tell you what package will work in what system after you selecting just click install mine is already install it so let me go ahead cancel this one and we're going to launch we can launch directly from package click right here lunch or we can go to the launch menu select from drum down and click on lunch another benefits running from stable Matrix it will utilize uh centralize all of the checkpoints and libraries and luras whatever you're using in one place so you want to have multiple copies on your computer which is save a lot of room the one minus what I found with this specific UI it is allowed you launch only one package at a time so for example if you run automatic 11 from stable Matrix you cannot run com UI it says already in use sometimes as it runch La as launching La I may launch multiple but using only one at a time I understand reason why they done this to preserve memory because you may load a checkpoint one type and another in different window and it will take quite bit time so right here you can see it is start executing and we can just f follow see when it's a confy UI ready to work with and here we have it our confy UI open by default this window can be a little bit different but it's okay what we're going to do we're going to look on all of this and how they connect first you'll notice it is big uh workspace and by clicking middle button on your mouse or other things you can select and drag around the space you also can zoom in zoom out I'm using the wheel on my mouse to do this so we can preview like all of the structure or just zoom directly to specific element this element each of them is called node so node it's like this box which is some have it only outputs some maybe maybe have it inputs and outputs and other ones have it just only input and produce something for example right here where is a loaded check point you'll notice it's having only three output well technically it's have one selection input and it's when we select any specific checkpoint we want to use it but General it will have no other inputs and only provide for us model clip or me points and this currently set up you can see it is done for um real time render so we don't want to do this let's go ahead and delete some elements that we W going to use I'll just actually delete almost all of them we'll see by way this other box if you notice this is a group and we don't need group group do nothing it's just a visual or management for other nodes let's look what we have here okay and actually we want delete this to delete this easy you just highlight and click delete but button and there look we delete almost everything we just have it on our load checkpoint and clip prompt so where we put a text if you need to add new nodes all what you need to do just to right click anywhere and you notice right here we have it add node if we click on ADD node we have a lot of different nodes we have utilities sampling different loers condition different ltin and you notice some of the nested so you have it like multiple levels you can go more down we have it image for example upscaling on an image if we need PR processors animations we can even save image if we want it and for example let's click on save image if we open you'll notice it's create another node save image obviously it's save on a hard drive but or your other dis but it does not have it necessary processing node what I mean processing it's when something in come process here and have it output so this will accept image and notice right here color says image and it will be safe where we specify so it's kind of good to have this node if you want save on a hard drive we also want to have it like loaded checkpoint well let's go ahead and create one we leave it a load check point here because we're going to use and we have one clip so we you want to maybe positive and negative here let's go add another ones and notice right here it says conditioning so if it's conditioning we probably want go inside the conditioning here and we also want to select clip text and cod prompt if we put it it should be same and we want two if we want to use it one as negative and one as a positive prompt next we need Define the image so what is meaning we need set for um application for the the comy UI we need to tell what size of image we want as original or what we want to create for this we want to go inside node Laten is what we're going to do and we want to create a empty latent image so we're going to create this node notice as we're creating here we have our width and height it's what we're going to specify and also how many we want in the batch size do you want 1 2 3 4 images how many you want to create at once next we want somehow combine them together to use it so for this we need use it sampler and best thing to do is go sampler and use it K sampler this is simple one look what we have here we have it our positive negative input and let's go right there so this one this will be our positive yes will go drag and drop notice how it's easy all what you need to do just click on this drag and there we have long handle and just go over you cannot connect this to another one so if I go to the image see it does not want to connect because it is by the color one connect condition to condition and we can drag from One Direction or from different directions as long we're connecting them together and here we connect one to a positive and one to the negative as well so next we need connect case symbol to the model right here we have our model on checkpoint and we have it model in case sampler so let's go ahead just drag and drop to our model now they all connected next if we look on case simpler we needed Laten imagees what we have here so it's specify same let's go connect now when it's done we have it our latent image what we want to do at this time we have it noise processing and we need actually specify the processing for this we need to use it our V point well next what we need to do right here we need take this information and somehow the code to the image and for this we'll using our V or variational after encoder and put it between latent and image so let's go ahead we'll click right there we'll go to the nodes now then to the latent and we'll select the the code notice what we have here we have one sample input we'll go from lat and connect and we also have here right there input and on our checkpoint so we need connect those together next we want to go and save this image let's go say to connect that is it that's all what we needed as a symbol to process so let's go try here and we're going maybe type Forest but it's hard to see you can always remember scroll in so we can see here forest and we'll just type green I don't want Green Forest we'll see what we have it next all what we need to do is just go ahead and press Q notice it pleas come up some errors and says require input Mist as a clip this is a nice variation because if we forgot to connect our clip from here to our negative prompt and validations happen if if we miss something it will come and tell us and that's a very nice kind of element also notice it will highlight in red where the error happened as well it's even Mark for us what we missing well of course because we need to take this clip and connect to our decode now okay when we fix this error let's try again we click on a prompt and it says rendering now sometimes times it may take little bit time at the beginning because it is need pre-loaded model if you have a new model or perform some other operations when you launch for first time and that's why sometimes get very handy to going to your task manager performance GPU performance and we look on this notice right here it is utilizing so it's processing as well it's using some memories does not use that much memory because with a small teeny tiny we render but it is nice way to see when it's uh working we also can see how it's running if we go in our manager and right here we'll click on our view qu right there and we can see it our view history so we can delete it work if we don't want it we refresh and you can see right here one is running so let's click click also preload if we need it and this is still executing so it's still probably downloading the model or other elements that we're missing and here we have it our image notice right there it's also shwing our image and because I say no green it does not show any green they also com UI have it very beautiful hidden secrets well that's actually it's not Secrets but it's hidden definitely the all information about nodes or how image was done it's written inside the image itself it's inside metad data so we have it some create very interesting setup and you want to know how other people done they can actually share with you image and all what you need to do just take this image drw and drop well before we look let's look a little bit closer what's happening here so so for this we're going to zoom to our checkpoint and here we have our model clip and V the model is our noise predictor uh model in a Laten space so it is kind of what we train on image and other stuff clip is the language model preprocessor the positive and negative prompts so it's another things to understand with weights what we're trying to say and or variation left encoder it's convert the image between the pixels and latent space latent space if you're not very familiar you can imagine as connections between all pixels and each pixels connected between each other it's look very like a spider web with the points on the middle of the pixels and you have to multiple Nest at them so in this way each pixel can set weights and so on work if you needed more information I'll provide link down below little bit more explain how stable diffusion works but General this three we needed at the beginning and of course our clip model is connecting to our prompts negative and positive it's because it's need process it by the model before it's actually become to useful so we kind of need to understand computer need to understand what we are trying to say the our model going and connect to our sampler where we have it this noise pattern and we have it reverse diffusion on this SC on and our last step right here our variational of the encoder it's where happen on a last step it's where we need convert from Laten space all what we create there to our image so we can see it in other where we can say this is our language handling from Human langage language to weights here sampler is where happening the noising reverse diverse because we create a noise image and we noising to the image and after this lat and space all this weights everything created in a way decorder we convert them to V to the image so it's kind of those three steps and of course two things that we mentioned before empty latent space it will Define the size of the image Define the latent space where all those connection between pixels happening and save image is where we just output image after the the coding of latent space happen so we can visually see it and we can save this image let's look a bit closer on the properties of each of them checkpoint notice we if we click on the checkpoint we can select all different checkpoints and because we was using the stable Matrix we can go ahead and unloaded models inside the stable Matrix which will share between all different installations so from there this is where checkpoints we can see how the checkpoints is trained that will affect our off course our model clip and the quarter May de quar so or after in quarter that will affect this and it depend how much thata inside of course it will depend how that model will understand what we want to create we have a text input and we kind of Ed on this bul they're identical only what different is where they connect to the sampler one is positive one negative empty Laten we have our width height and how many of the images we want process now inside the case sampler we'll already look on some inputs as well we look on the latent output but below we have an additional parameter seed when we generate first noise it it's a random noise but in a computer nothing is actually random everything is based on some algorithms and everything so the noise is actually can be repeatable and seed is what Define that noise so if we using same seed we will have it same beginning noise which is most likely will create it about a same result as long we our clip will get it in same next we have control after the generate this refer to R seed so right now it says to random it's mean every time when we generate New Image the C is changing so that parent originally of the noise is will be different we can change to for example create increment or decrement is going by one up or down fix it it's mean don't change seed and this is sometimes nice if you want to just change or tweak a little bit for the prompt for example if I leave it fix it here and we're going to render one more time we should notice right here be almost about same image let's try again one more time and it should be effect exactly the same on this case you can go inside and modify just in a clip text and see how that will affect and how this change so this is way you can tweak your prompt without worried about all random seed okay so let's go right here we'll go back to randomize next we have steps steps it's how many times we processing through our sampler so it's meaning think about is refining but refining need be very carefully uh think that way because if we have sometimes too many space sometimes you may overdone so you want to be sure your sample step it's set with how many it was trained on a Model usually when you look on documentation on the model it will tell like um some model will require 75 or 55 35 20 steps it's what originally us it for some models some turbo sdxl used only one step so it's just depend on a model and if you use it more the result won't be that good so read documentation for the model or stay with a 20 or 35 this is very safe bet so next one going to the sampler and sampler it is um responsible for the den noise it's carrying from step to step to the noising because um sometimes it's original stable diffusion when it was done and everything it is think about this remove Some Noise come compare if image look what we want it not compare it's more in a weight and I'm quite bit simplify actually how it's work but think about this as a steps of the noising how they going so that's what related to this and sampler is responsible for this some model work better with some Samplers other models work with different Samplers you it's very common very fast sampler very popular other ones is actually very popular and people like to use it will be KPM one or DMP so it depend which one you can use it and I put a link down below for you if you're interested to see what sampler can do so you can learn a little bit more about this if you want dive in next we have it scheduler which is actually control how noise levels should change each step and we have it also the noise this is how much of initial noise should be erased by the noiser processor so it's meaning one it's erased all or not so this one you can modify and see how much you want to play so you can increase decrease and do all of these values this is kind of very interesting experimental things to do around and find your own best settings and it's even very fun to kind of going and look what this can do but I personally like to water by example so it's meaning one Beauty it's what I said before with conf UI that's hidden parameters inside the image so for example if I want to go and learn how to do image to image you can actually going to confy UI page right here you can see all of these different models by example and if you like for example click on image to image you come to specific well they explain okay here's a nodes but you know you don't need to copy them all what you need to do in this case go get this example image and when example image you save on your drive see what's happening so let me go take this example image drag and drop and as I'm doing this and it will change this so let me actually showing something a little bit different from this right here we have sdxl noted and I'm going drug and drop and look what's happening you see how everything change this is very complex one this has allowed us sdxl real time so it's mean as I'm typing it will showing for us but General look on this lot of not and this is could be scared at the beginning but again if we look little bit what is going on we can also find uh what is happening first off notice on different colors and this is colors it's representing by groups so it's take it all of this noise like this checkpoint we can move it out in and it's grouped together with a node refiner explanation you can always create your own group by going and said create a group and right here look we have our new group created and we can take those guys and put it inside our group be sure it's a big enough to handle and right there now there's two guys in my other group okay so it's very easy to do that okay let's create remove this scop we're going to edit group and just click on remove it to remove so right here is nice things you can go actually to some examples like right here is the Excel it's what we was going to use you can also going to all different like for example image to image or in painting and another options also you can do if you mess up and you want to go back to your original you can click load here or load defaults and load default we'll preload it one that we actually kind of was using before look it looks similar it's a little bit different because this is come with a default but it's one that we created similar before on the side you notice what I click right here this is our kind of management yours maybe look a little bit different because I have an extra manager component this I have another video If you interested you should watch about comp to install this manager this manager it's additional custom node that allowed me to install missing nodes and everything and I actually recommend for you to have this because it's allowed you to automatically install those new nodes that is missing and what I mean node by like this so some of those nodes is come by default and of course a great corders creators that created new nodes very sophisticated one and you can use them in inside your code you know what let's do something else we'll see how this work remember right here we have check point we have it our all encoders like before sampler the code and save image what if you want to create image to image so for this we need to replace this empty letter with something input of the image so we'll need it preload some image here then we need it encode to space lat and B same like right here we have it we the code we need one to encode let's go try this so we go this oops right click edit node we're going to the latent space and we'll just select the encode so this is our encoder notice as we encode we have a couple inputs we have our pixels which is probably represent our image we want to input and we have it our there and here it's the same we need the we need encode this in same space as our model so for this we'll take this and connect model to RV code then we'll say this image that will input in code in the same latent space as we using our checkpoint so let's go ahead next we'll go to add node images and we're going to load image because we need to find some of the image so right here we already have some example PNG which is kind of okay we'll go connect to pixels and now this latent we go connect to latent image so now we have our empty image that we don't necessarily need to use okay so let's go ahead delete this one and you know what let's preload something other image keep in mind that our size because we don't have here at this time if we using this without any changing of scale or other things we will have it image size so be sure you don't use it big SI a big image at that time and I will just use it these portraits okay next let's go type in our encoding right there which which portrait I think that should work text water Ark okay we'll just type this and I think that will work for now we'll have it random 20 steps you know what let's go pop up to maybe 35 steps okay we'll just have it little bit more leave it everything else as default I think that has looked good and we'll just click on C if you don't know what's going on and happening notice right here it's a turn green around the load checkpoint this is what happening it's preloading checkpoint right now and of course if we look on also inside our St Matrix you notice is what happening it's right here going it's loading model it's kind of very nice steps to see what's going on and of course right here because it's green around it's mean we on this Step at that time and right here is our result you can definitely see this is image we input say which portrait there's created at head and based on this of course we can modify a little bit more parameters as well if for some reason you think image is too large you can always go to the node images pre processor or actually transform and have it image corop so in this case if we think image is too large you want to use it you can actually put it some note between right here and set what you want it and also adjustment so right now it will just crop from the top let's just try see how much it will cut off and you can see probably bottom cut because the image I think is 1,24 by 1,24 so you can add all of these cool noes between to manipulate with images even can rotate image if you want it and also postprocessing for example in image if you want a little bit larger image from now I think it's because 52 x 512 you can always go inside and going to upscaling and just use it image upscaler with any specific element so for example 512 we can just go from image here output to save image and inside we can modify to any different size for example 768 and let's go right here put it 768 okay same prompt you see the processing and I like how it's going green this and now we have our image which is largest size well I think that is all it's already get little bit longer video be sure you watch next video when it's coming very soon where we're going to use comy UI to create animation so we'll going clip it more deeper and deeper I know this is maybe too simple for some of us but I think this will help to establish a basic and from there we continue exploring thank you for watching this video please share subscribe and thank you for your support
Info
Channel: Vladimir Chopine [GeekatPlay]
Views: 894
Rating: undefined out of 5
Keywords: Geekatplay Studio, Vladimir Chopine, Digital art, How to, Learning Photoshop, 3d tutorials, Digital compositing, How to do in Photoshop, How to do compositing, How to do in 3d, AI art, MidJourney, Stable Diffusion, Dreambooth, Dall-e, Free resources, Free learning, Digital art for begginers, Free tutorials, artificial intelligence, Digital Photography, Photography
Id: TI71a_XaLuI
Channel Id: undefined
Length: 30min 32sec (1832 seconds)
Published: Wed Jan 17 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.