Exact positioning of transparent objects in your ComfyUi AI scene

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello welcome to this new tutorial today I want to show you how you can use transparent images and position them freely in your scene in front of a background or something else so that you are able to make a composition after your needs with transparent images in front of a background these transparent images can be generated by stable diffusion with layer diffusion for example or by comi with using the ram BG remove background custom notes but you can also use your images from Photoshop which you edited there or other sources of images so in this case I prepared a wizard which I want to position into a fantasy Forest I rescale the visard and freely position it into the forest quite in the center in front of the tree and uh based on the default workflow I will show you how you build up this workflow step by step so let's begin so we have our default workflow I use this default workflow as a last step in my workflow I will build on top of it to have another K sampler dreaming our composited image so that it is more smooth and the Contour of our transparent images is more integrated into uh into the new image so I will start with a load image note to load our background and I will duplicate this to load our wizard now to position this transparent image into the background we need uh image composite absolute node it is uh contained in the allow plugin I will link the GitHub page in the description below we've connect our background to the images a part and for the wizard we want to position in here we need some additional steps so first we I don't know why but um sometimes comfyi is um deleting or not transporting The Mask correctly or the mask as Alpha channel so we need to recombine image and mask so we need the alpha Channel at by mask node and connect our mask we want to scale the image so we use the upscale image now which also can be used to make it smaller this case I choose 333 and TI this is this image is 1,24 to 1,24 and this image as well so this is a good resolution to work with stable diffusion XL um which handles bigger resolutions better than stable defusion 1.5 so now we resize this to make it smaller and position it in front of the tree by connecting this to the images bport in the compositing node and now we have to make some settings so I put the a the settings X and uh y are staying the same but but we need to change the images B coordinates so I choose 330 and 522 this is uh you really have to adjust those values to your needs whatever images you use and now we have to encode this to an latent image to fill it in our K sampler we need to connect the vi and now let's move things a little bit to the side fill it into our latent image I use the Jugger not XL model which is based on stable diffusion XL can delete the empty lat image note and now I like to adjust the prompt let's do wizard inant the forest um I use this Cas sampler and this workflow because uh it's really nice to have stable diffusion dream over our image again so that every gets integrated so it's important that you choose a prompt which describe somehow the image you want to produce or what is visible what you see yeah so in this case wizard in fantasy Forest should do it for now uh you have to really find the right words sometimes and try around a little bit until you have found uh what works for your image combinations so that should be it let's give it a try so now we see a wizard in the forest but it has nothing to do with our images so it is important to decrease the denoise settings I like to do it like let's try 50 this keeps your image alive so you clearly have our fantasy forest and the visard in front and the more you decrease this denoise setting the more you see the original image and if you increase it stable diffusion will generate something new on top of your image that's it um for example you can freely position your image in this Forest if I choose 0 to zero it will be in the left top corner I think this is a standard for comi or maybe also for stable diffusion the zero coordinate of an image is always in the left top corner so if you want to position it you have to keep that in mind so let's create another one so you see the wizard is now in the top left corner and yeah we can position the wizard everywhere you want and we o can position uh several objects for this we have to duplicate this part of the workflow and for example let's copy and paste this one uh this should go in the images a as a background and then if we want to position another with it we have to connect everything like this so let's make some space I don't like it when everything is overlapping and now let's move another wizard into the picture something like 300 like 350 pixels to the right and that should give us a second wizard in inside our image let's have a try so there it is so with this you can make a basic composition with all your transparent images in in front of a background or something like this and that should give you a base for complex composition thank you for watching and hope to see you soon goodbye
Info
Channel: Neuron
Views: 3,064
Rating: undefined out of 5
Keywords:
Id: mAUpDrvs45k
Channel Id: undefined
Length: 9min 59sec (599 seconds)
Published: Fri Mar 08 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.