ComfyUI 13 img2img Workflow (free download)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] welcome to this video in which I like to share my imageo image workflow well you could ask yourself if I already have an image why would I make an AI version of it well there can be good reasons this for instance is one of the first images that I took with my very first digital camera which had a whooping 640 by 480 pixels uh so so it made actually terrible images if we blow it up a bit we will see how ugly this is well uh comy UI image to image can come to the rescue uh look what happens if we run it through comfy UI and all of a sudden it is a beautiful picture uh another example uh you have an image and well if we have a look at the left side we see a lot of J back artifacts and pixelation that is not quite nice and on the right side it is run through uh the comi UI and there is no pixelation left at all image to image also is a great way to generate a lot of subtle V variations in in yeah in a very easy way and that can of course be very nice if you are on the lookout for the perfect picture and just generate 100 and you will have a couple of nice ones if you have a picture of your dog for instance and you would like to have a painting of it well that is quite easy with image to image and also suppose you find a picture on the internet that you really need for a presentation or report or whatever but it has a little text uh in it uh well just run through image to image and you can get rid of that text these are just a couple of examples what we can do with image to image let's have a look at the workflow this is our default workflow in which the first three blocks generate an image and then we have an upscaler that we can conveniently switch on or off what we have here is a empty latent image that is gener ated by the loader on of a given size and is sent to the sampler what we want now with image to image is to insert our own image over here so what we need to do is uh move these blocks away a little bit and insert over here an image loader uh where is it image image loader load image there it is and then we have to uh make that image latent so we do a vae en code and that vae encode latent output we sent to the simpol that essentially is it uh and of course I prepared a wordflow that looks a bit nicer neat and tidy that's this one and well let's put it to the test by simply clicking uh Co prompt and then we see what happens we get this uh lady but now in a in a variation with the denoise slider we can determine how close the uh rendering will stay to the original image let's put it on .4 we give it less the lower the number the less Freedom we give it and we will see that now the uh outcome is very close to the image we uh offered it and if we would go to the other end let's say 0.8 and we will see something strange it is not looking like the image at all we have have given the uh stable diffusion sampler a lot of freedom uh the composition is is the same but the image is totally different that is because we have not entered any text prompt we can still use use this image as a base and add a text prompt here let's say photo of a woman with o burn hair which is well really a minimal prompt and let's see what we get uh with this and it will obviously be a lot closer uh yeah that's a photo of a woman with oburn hair with that composition and that color uh so that is all working nice the size of the image is determined by the input image that we offer it and our uh let's zoom out a bit our uh size input does not do anything it is only this latent image over here that is fed to the sampler and that has these Dimensions that goes okay as long as you use as an input image uh the sizes that are well known to sdxl but it will go wrong if you have for instance the very tiny uh picture that we saw of that pink rose that was a very small image uh let me put here the text uh pink rose and see what happens I give it 0.8 dooo a lot of freedom uh but we will see that uh yeah it will be a pink rose but entirely not according to my input image that is and and also uh the colors are very strange that is because this image is not known a known size for sdxl we can change that by putting in the middle here a image resizer I have put an extra note over here called upscale image well it can also downscale um it receives this input image and no matter the size it's going to listen to the size input that we give over here because these width and height outputs are connected to the width and height inputs of this resizer so in this setup everything will go automatic no matter what scale of image you put in uh you can get a correct situation uh from the sampler let's have a look if we sample it again this rose that does not qu look quite well uh well it comes out uh really nice and uh fully automatic resized let's now load our our girl with cowboy hat image and see what happens uh with that um we give it a little bit Freedom 065 and well we should get a similar image and uh with a little difference well one difference for instance is that she lost her necklace over here she does have a necklace and over here that's gone uh so yeah we again have to help this image a little bit with uh our text prompt so we can say over here woman uh cowboy hat and necklace let's try that and see if that uh is enough to get our necklace back yeah we we have our necklace back again so that's nice there is a way to get that done automatically because there's an tagger that can uh give the prompt from an image so let's add that okay here in this workflow we have the input image the resaler and the encoder but we added a wd14 tagger that gets the image as input and that comes out with a string with all the keywords that it found in this image uh let me just start it then then we can see how it works um what then uh is another extra note is uh to combine the text that the tagger finds with our own text we can still add our own prompt if we want to but it finds this prompt already fully automatic uh if I would zoom in a little it says I found a girl solo long hair uh blah blah blah jacket belt necklace lips denim hands on hips everything that it see in this image it fully automatically uh prompts it and well we get out uh without having uh told anything here about a necklace we get out a girl with with a necklace uh that's because necklace was meant already here fully automatically in that prompt so this is a workflow yeah that can do it all automatic and that of course is uh is nice uh let's do our dog we wanted to make a watercolor painting of this dog uh let's do it with the tagger so it will automatically find out that this is a dog it is a golden retriever I'm curious if it can uh find that out um oh and of course I have to tell that I want a watercolor painting uh because now I get an image of a dog well a similar dog yeah why would I do this with AI if I already have a picture of a dog no I want a watercolor painting so in my Styler I'm going to say uh art style watercolor there it is art style watercolor and let's see if uh I think I want to give it a little bit more freedom with that watercolor otherwise it's going to look too much like a non watercolor painting so I give it a lot of freedom and let's see what happens uh by the way I see over here in the prompt that uh it says it has has found a dog it says that over here but it does not say that it is a golden retriever so we might get a dog that is a little bit more yeah not entirely like a golden retriever well that's in indeed what we get it could become nicer I bet if I now add myself that this is a golden retriever okay let's try it again and see if we now get a very nice watercolor painting of our dog yeah that looks more like it it has much longer hair and uh well there's maybe a little bit too much of an open mouth yeah that's because I gave it a lot of freedom maybe go back to 0.7 and then it will look more like the image you can play with that D noise factor of course to see uh what you get and at some point you get what you like well this is more like it the uh mouth is more closed now so this this is it image to image there are a lot of options and a lot of possibilities uh to uh improve the quality of an existing image or to change the character of an existing image while keeping the colors and the content and the composition intact maybe see you back in the next video in the meantime have fun
Info
Channel: Rudy's Hobby Channel
Views: 10,159
Rating: undefined out of 5
Keywords: comfyUI, stable diffusion, img2img, image to image, workflow
Id: mWVRQmkIyHI
Channel Id: undefined
Length: 12min 11sec (731 seconds)
Published: Wed Jan 10 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.