Stable Diffusion - Real Product Placement into AI - Fooocus

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hello everyone, Rodney here with Kleebz Tech,  and today I'm going to show you how to take a   real product image and have an AI model hold  that product using Fooocus. I have had plenty   of people ask for a video on this, so here it  is. Now, if you're not familiar with Fooocus,   I do recommend giving it a try because  it is really easy to download and run,   and very easy to use. It is another useful  tool to have in your AI toolbox. I do have   plenty of other videos on using Fooocus that  you can check out as well. The picture on the   left is actually a real picture. I went through  my files, found one that worked, and that's the   one I'm going to use for this. I'm going to show  you how to basically take and create, like the   ones here on the right that I've already done,  by putting the product into the model's hands. Now, in order to do this, I am going to do a  lot of inpainting with this one. One thing I   do prefer to do when I'm doing something like  the can or the product or anything like that,   I find it's easier if we just go ahead  and make the mask outside of Fooocus   instead of manually doing it. There is a  feature where you can enable mask upload,   so I'm going to go ahead and create a mask  like this. The black part will be the can;   it shows through. The white part will be  the masking area which will be inpainting. So, why don't I show you how I quickly do, how I  create the mask myself, and then right after that,   we'll jump into Fooocus. So, if you don't need  to know how to make the mask, you can skip right   ahead to that part. Okay, so the way I usually  do it is I use whatever tool you want to use to   remove the background. I use Adobe Express,  which I find works pretty well to at least   get me started. And once I've done that, I just  go ahead and download the image, and that way,   I can bring it into something else. I usually use  GIMP, which is what I'll be   using here. So once I have that, I'll bring it  over into GIMP, I'm going to   first go ahead and just change the canvas size. I  want to get this image to a proper resolution that   Fooocus uses. So once I've gone ahead and changed  my canvas size, I have that where I want it, then   I'm going to go ahead and just erase anything else  that the background removal didn't remove. A lot   of them, some you have to clean them up more; how  you do it is up to you, it really doesn't matter. Now once I have that, I'll add myself  a new layer, make it a white layer,   I'll put that at the bottom. Now that I  have that, I make sure to select the layer,   the can. I should probably save this first.  So I have this image; this will be the image   that I'll actually use initially for the  inpainting because all I need is the can,   I don't need the rest of it, doesn't matter. So  now I'll go ahead and I'm just going to go up   in here, go to the colors, change the levels,  and I'm going to adjust that just so it's all   black. Anything that's black is going to show  through; the white is the actual mask. So,   if I were to manually paint all, you know, mask  all around the can, it would be the white areas. Okay, now that we have our images prepared, we're  going to go ahead into Fooocus now, and we should   be able to pretty much do most of this in Fooocus  from this point on. We will do some possibly some   resizing. I'm going to be using the quality  setting. I've set my size and aspect ratio to   what I had put the image at. I just do about eight  images at the moment. The Styles, I just have the   standard Styles set up for the moment; that's  perfectly fine. Model, I'm running Juggernaut   version 8 at the moment. The other thing is, you  want to go in advanced, in the developer debug   mode, and we are going to, if we're going to be  using the mask that we created. If you're just   going to be painting the mask on yourself, you  don't need to do this, but if you are going to be   using the mask you want to upload, then you want  to enable mask upload. Now once you've checked   that off, you'll notice over here the inpaint,  you'll have two boxes in here. Here, you can do   it the other way and just drop the image in and  then mask over it manually. I find this way works   better; it gets a better edge, everything else.  I have set on standard, so let's see here, then   we're going to take our image with the background  removed, right? I'm going to put that in the   left-hand side, put our mask on the right, go on  random. Okay, let's go ahead and see what happens. The biggest thing here I find is, by doing this,  generating it real close up like this, we're going   to get much better hand, finger placement. I'm  still, you're still going to get messed up hand;   just, you won't get as many, I find. That's  my opinion on it because it can get close up;   it has more detail of those hands getting at  the right proportions. Can be another problem,   like the can. I find a lot of times I get the  can either too big or too small. Getting it where   it's pretty close to the right proportions of the  hand, that can be a struggle as well. Sometimes,   and whenever I'm generating images, if I,  but I do this, I'm usually sitting here,   and in the moment, it's not looking  right, I just skip to the next one. The other thing is what'll happen is it'll add  a little bit to the edge to get those fingers   to go around. Now, sometimes that'll be fine;  sometimes it won't be. So you could theoretically   actually cut, mask a little bit on the Inside  Edge so it, if it expands the can a tiny bit,   it will usually match the colors. It won't be too  detrimental to the image. But like this one here,   that's a little too big. I haven't fully tested  this out with a lot of other products yet,   so this is really, you know, I'm going  to probably make a few more videos using   different products because it probably  requires slightly different methods. This   one so far seems to work. I usually get a hand  holding. Oh, we might be getting one here. No,   this one's going to be messed  up. So let's go ahead with that. We'll go into advanced. I'm going to go in here  and turn that off for now as I'm done using that,   and I'm going to drag this down here. So that's  the image that we'll be using. I think that's a   good start. Now, the thing is, if the background  isn't what you want, that's not necessarily an   issue. A lot of times, if you're doing it, like  this, the way I'm doing it, the biggest thing   I find is to get the hand product placement  correct, then you can inpaint out some of the   other stuff and regenerate. So, if I don't want  her to be in that clothing, I can change that;   that's not going to be as much of an issue. And  actually, that's what I'm going to do. So now,   I have my initial image, so I start off with  this initial image, and I build out from there. If you don't need a full person, then I could  say, okay, that might be fine enough. So,   in this example here, I'm going to  go ahead and start building this out,   and this is where the power of outpainting  comes into play. The reason I didn't make   this and start off with a can smaller,  because that's one suggestion I've had,   but it's much hard when I had the can even  half the size and I was trying to do this,   I had a much harder time getting the fingers to  come out right. I found the further back it went,   the more messed up it was. But if I went too  close, then you don't get enough to outpaint   properly. So when I do, at this point, when I find  when I do outpainting, you want to do one side   at a time. And what that does is just, it's going  to add onto this side, and that's pretty much it. So let's go ahead, I'll hit generate. Now, the  way I do this, you can just outpaint and be done,   but the problem I find is a lot of time, the  outpainting will leave a little bit of stitching   lines. So I more or less outpaint to get the  basic structure, to have it build out. So,   the arm and stuff because that's, I find, is  going to be the most important thing. I can redo   the rest of it with regular inpainting. Okay, so  that's good enough for me for this one. I'm going   to bring this down now, down to here. So, we've  now, now I'm going to, instead of doing the right,   I'm going to do, well, I'm going to do the  bottom at the moment. It doesn't really matter. And now, once I get to a certain size, I'm  actually going to probably take it out of here,   I'll bring it back in, and resize it back down  to closer resolution to what we have here,   and then I'll adjust it again. Okay, so I think  we're going to use this image here. It's big   enough for what I, my purpose. So, at that point,  I'm going to go ahead and open up that image,   actually, in whatever image editing tool that you  want. All we're doing here is, I'm going to resize   this down to an actual resolution that is already  in Fooocus. That way, we get a much better result. So, let me scale the image down.  Yeah, that's pretty close. So,   let's scale that down. See, canvas size.  Okay, I'm going to overwrite that. Now,   I've resized it to a more appropriate version  here. So, we've now scaled it down because,   remember, as this added edges and  everything, it increased the size   of the image. It doesn't keep rescaling  it. So, when you want to do the final job,   if you're going to repaint the whole thing like  I'm going to do here, I want to get that down to   a normal size. I find you get much better results  than if you try to inpaint a much larger image. I'm going to drag that in. That's the one  that I've now resized to the 896 to 1152,   I think that's what it was, yes. So, this is now  resized. I have the proper size I want over here.   I'm going to increase my images. Style, everything  is all set. Oh, let me go ahead and just mask this   out. Now, this, I'm going to do manually. And  then for your prompt, you can put however you   want in the prompt; that's entirely up to you, at  that point, whatever you're looking for. And I'm   just going to go ahead, I got the size correct  and everything. Let's go ahead and generate. I think we have our winner. Yeah, I'm  going to go with this one. Hopefully,   this will help with adding real products or  objects into your images using Fooocus. I will   probably try some other product ideas in the  future. I'm pretty happy with these results.   If you have any suggestions on other ways of  doing it within Fooocus, definitely leave a   comment. We're always, I'm always looking for  good ideas. If you found this video helpful,   please hit that like button, and I'd like  to again thank the viewers who have bought   me a coffee. I really appreciate it. And  until the next video, have a great day.
Info
Channel: Kleebz Tech AI
Views: 11,766
Rating: undefined out of 5
Keywords: stable diffusion tutorial, stable diffusion, stable diffusion secrets, controlnet stable diffusion, fooocus tutorial, inpainting stable diffusion, stable diffusion install, foocus, convert image ai, stable diffusion ai, stable diffusion xl, inpainting ai, generative fill free, inpainting, add objects to photos, add objects to photos ai, product placement ai, photoshop ai product placement, add objects to ai, add objects to image ai, insert object ai
Id: j_2omWnsArw
Channel Id: undefined
Length: 11min 3sec (663 seconds)
Published: Thu Mar 14 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.