Transcript for:
Exploring Flux One Image Generation Tools

hi everyone welcome to the channel this is fahad mirza and in this video we are going to have a look at recently released flux one tools this will be the easiest tutorial you will find on the youtube i can promise you that because i am going to explain it in as simple words as possible with a hands-on step-by-step tutorial flux one is one of the best model for text to image generation out there at the moment If you don't know what Flux1.dev is, please search my channel and you should be able to find heaps of videos around it. We have already installed it locally and we have played around with it a lot. Now, the same company, Black Forest Labs, has released these Flux1 tools. The reason they have released it is because Flux1.dev is a model which is base model. What it means is that it generates images from text. but if you want to add control if you want to mix and match those images if you want to add more spice to those images for example you want to generate images on the basis of some images then a lot of people have either built some control models which control the generation of images or they have built lauras which has a smaller model for a typical image style and there are a lot of variations which people are building and that innovation is awesome we have covered hundreds of those models already on the channel so what the creators of the original models have now done they have come up with four different tools which are called as flux one tools and these are the tools which we are going to look at in this video you can see those four tools on your screen the first tool is called as fill fill is used for in painting and out painting In painting means that you just mask an area on your image and replace it with something else. For example, you just put it on the lips of a human and you say green lipstick or red lipstick and it is going to put on a red lipstick on it. Out painting means that you create a mask on any area on the image and then the model extends it. For example, a person is just shown waist up, you just create a mask around waist and then when you click on a generate it might just generate legs on that image or something like that so it just extends the image in very simple words and then we have depth and Kenny so these are the control images so depth means that it enables the structural guidance based on the depth map that how deep the images for example you are taking an image of some hole and then this model measures the depth of that hole and then when you create a new image the same depth is reflected in the new image. Canny is something which is used for edges. So, canny edges are the outlines or boundaries of objects within an image and they are detected using this canny edge algorithm and it is better explained by showing in my humble opinion and then finally they have this redux tool which allows you to mix and recreate input images and text prompt and we are also going to check it out in our video so now you know what these tools are let's see how can we get it installed and play around with it and i will be showing you the easiest way as i promised earlier before i move forward let me also give a huge shout out to our good friends at agentql who are sponsoring the video agentql is a query language that turns any web page into a data source with its python sdk and live debugging tool you can scrape and interact with web content agentql works on any page it is resilient it is reusable and it structures output according to the shape of your query and i will drop the link to the website in videos description okay so now in order to get it installed the first step is to go to this website which is comfy anonymous and i will drop the link to it in video description from there let's download all of the models now here is a heads up you would need at least 75 GB of disk space yes you have heard it right in order to download all the models which I will be showing you for all four tools in addition to the flux one dot dev base model so combined make sure that you have that much space on your disk space also for vram I will also show you in real time when i will be using this to show you how much vram it is consuming and then you can act accordingly so first up go to huggingface.com and from there go to this flux1.dev website click on files and then once you click on files you will see this file which is called as flux1-dev.safetensor make sure that you right click on this download save link as go to confiui models and unet now what is confiui if you don't know what confiui is please search my channel and i will shortly show you the video which you can which can make you a hero from zero in confiui anyway so wherever your computer is installed go to computer models unit and save that model flux1.f base model there now go to my channel just search with easiest tutorial computer and watch this first video video if you have never used or installed comfy ui this is going to give you a very very fine head start so make sure you watch it if you are following along so i'm assuming your comfy ui is installed and you know the basic concepts around comfy ui so we have downloaded our flux.dev cf tensor model which is good now another thing which we need to do is to download rest of the tool models so for in printing in this page the comfy anonymous GitHub just again right click on it maybe open it in a new tab again click on files also you see it says get it model so you need to log into hugging face and accept the term and conditions it's all free and then click on files then this is that save tensor file right click on download save link as and then go to models and then in the diffusion model just save it here so similarly wherever there are these links so for example for in printing you need to download this and it also tells you to put it in config UI model diffusion model folder then this is for in printing and also for output the same model because it is a fill tool there is another tool as i mentioned earlier redux for that again open it in a new tab download the file just like i showed you above put it in clip vision folder and similarly download this redux dev save tensor file and put it in style models folder so redux is done and then for Kenny and depth just download these two and put them in your diffusion model folder so these are all the models you need to download you will also need some clip models and some VAE model and I will quickly show you again go to hugging face the same flux1.dev website and from here click on files and then I'm just scrolling down to show you you see that AE.safetensor you need this file so I'm just going to open it in a new tab right click on download and save link as and you need to save this file in this vae or variational autoencoder folder so make sure that you also have saved it another one would be need in this clip folder make sure that you have these two clip uh files there clip underscore l and this t5 double excel file these are both the clip model and let me show you where you can get them wherever you have go to hugging face and then maybe just paste here flux text encoders and then open the first one and from here go to files scroll down and just download this clip underscore L and then either this or this last one so I have just gone with this last one because I have more and this clip L1 if you have lesser vrime you can go with this one okay so these are all the model you need and that is why I was saying you would need 75 GB and you already know that you would need to put them both these clip model T5 double XL and this in the clip folder okay so now I'm just going to close these from here so that we will have more room to play with okay now models are done comfy ui is done you know what exactly this is now let me show you how you can use it in this comfy ui so the best way of doing it is to go again back to this example let me go up i'm going to start with the inpainting example in this page just scroll down the same one this is where flux extras now the beauty is of this is that they have embedded the workflows in these images and comfy UI works on workflows so right click on it and then save image of this image and then save it anywhere on your local folder so and then go to comfy UI either you can drag drop or you can open so I'm just going to drag drop so this is how we are going to check the imprinting so just drag drop in print and it is going to put the whole workflow here for you so make sure that your clip models are selected in the first one and then because i have the difference so i just selected this it is saying anime girl with massive fanx you can just leave it for now we'll just change it shortly and then let me put in the image so i'm just going to go with my own image from my system so i'm just going to go with this ai generated image of a pakistan karachi girl in pakistan so let's see how it goes i'm just going to check it check what is happening here okay this is all good so i'm just going to check all the models are there which seems they are okay all the models are in place so now let me show you how to do in painting whatever image you have loaded right click on this image then click on open in mask editor now let's change the sleeve color so what I want to do I want to just make we make these sleeves red let's reduce the thickness of our mask tool and I'm just going to put this mask on these sleeves so let me put it here and then i'm just going to put it here i know the video is getting longer but i just want to show you how you can do that i just want to don't want to show you all edited at all cosmetic video okay there you go so it's not perfect uh perfectly masked but that is fine and then we are going to save to node here that is done let me go to my prompt so if you look at the prompt i'll make it bigger it says a gorgeous adult 26 year old karachi girl studying in a karachi market smiling looking at the camera i'll just say in yellow shirt with red sleeves so that is done so let's see if it turns these two red only these sleeves and in order to run it I'm just going to click on Q now if there is any error here it is going to error out like node is missing or something but it seems everything looks good and let it generate the image and i will quickly explain to you what exactly these nodes and these values are in very very simple words but if you want to know in more detail in more simple language please watch my other video which i showed you this one now if you look at this tab you see that it is 58 done it is also loading the model and stuff so let it generate now model is loaded almost there so let me show you vram consumption so this is my ubuntu system and i let me clear the screen and run the nvdsmi so you see it is consuming just under 24 gig of vram out of my 48 gpu of vram and i'm running nvidia rtx 6000 which is courtesy mass compute if you're looking to rent a gpu on very affordable prices i will drop the link to their website and we and a 50 discount coupon in the video's description so do check them out okay it seems it has generated something let me go here wow look at that look at that a red sleeves and if you remember my masking was not perfect but it was intelligent enough to do it let me place them side by side look at this now now if you are into the dress designing and if you have seen these pakistani dresses you can you see this border this is model it is not present in this one but it has picked it up from this neckline so this is why flux model is the best model out there i mean sometime it just mind-boggling that it just goes above and beyond so i mean who we never asked you to create this border but it did that and it picked it out out not randomly but from here from a um this design on her neckline amazing stuff okay so now you know what in printing is let's try out try out the outpainting now in order to clear it simply go to edit clear workflow you can space into the backspace for again for outpainting go here scroll down just right click here save image I already have it so I'm not going to do it again and we will you can do it for every thing you are checking so I'm just going to go comfy outpaint let's go here and now instead of going through every step I'm just going to create it and I will show you and don't worry in this one i'm going to explain a bit about these notes to you so in front of you is an example of out printing so again what happened here this was the image on the left hand side the original i just created a mask like this let me open it in my escalator so i just created a mask here on on her left hand side because you see there is a not much there so i just wanted to change or extend that image from this side so i saved it and then i simply ran it and it has created it has extended on this side even it also intelligently adjusted all the sides here how good is that and you see now her arms are even longer and then we can see more full frontal posture also what i did another thing is that you see there is some flowery sort of sense here i just um earlier i just put it in flowers you can put it in water or something like that and it is going to do the needful there now what exactly is happening here is if i take you to from the flow these are the clips so which basically uh convert your text prompt if there is any to enough format which will be understandable by the model and then we are loading the models here and then we are giving it a guidance this is basically cfg or flux guidance and i'm a bit surprised that the value is 30 which is quite higher and this guidance or cfg classifier guidance primarily dictates how much the model is going to adhere to you or confirm to the prompt so 30 is quite uh you know big but is quite good anyway so and then we have uh you know here this is the sampler which primarily generates the image and we are using sampler for ruler and scheduler is normal the sampler and scheduler are but an important part sampler affects the quality speed and style of output image whereas scheduler controls how noise is gradually removed from the latent image and i already have done heaps of videos on this what is latent image what is scheduler and sampler you can check out the channel so this is what these nodes are doing now you know uh how to do the in painting you have seen the out printing let's move on to the next tool and this is example of redux where you provide it an original image and then once you run it it is going to generate various variations of that image you can also give it some text round to influence the variation for instance what I did here is I just kept the same image but I said long earrings and then once I generated it you can see that it has generated with long earrings here so this is how it all depends upon your innovation your creativity how you want to fix it okay so now let's try out the control ones let's try with the maybe Kenny one and look at this example of kenny so for the text prompt i just went with cute enemy looking girl with massive fluffy fennec gear and a big fluffy tail tail blunt and then by original image this is uh it has gone all the edges very very correctly of everything and look at the resultant image so how good it has replaced it except in the same place you see there is less space left here on the left hand side as compared to right and it has depicted it right here so this is how it controls the generation of image to the health and you can see the rest of it looks really according to my prompt so these are the tools which have been released by flux one i hope that now you understand them and you are quite clear how to get them installed and use if you still have any doubts or anything please feel free to let me know happy to help out if you like the content please consider subscribing to the channel and if you are already subscribed please do me a personal favor and share it among your network as it helps a lot because that is only marketing i do and i'm very very indebted if you would be sharing it on social media or wherever you like thanks again and have a good day bye