00:00I think you got your weekend I thought I throw a quick video together here on how to do image to image with SDXL
00:02If you want to skip ahead a bit because you've seen me do this a thousand times it's fine but I think it's a good practice is kind of see it repeatedly so you understand it
00:12But I'm going to move a little bit quickly here so we're going to load in our checkpoint here
00:15And pick the base
00:19And we're not going to use a refiner on this one
00:21I mean you could but I think for just the clarity of of the process I'm not going to worry about it
00:25So I've got this here and I obviously need to encode this clip here so let's load those in
00:31So I'm just going to type in SDXL and load in color
00:38Over here grab this
00:38And just like before we want to convert these to our positive prompts
00:44So we'll just convert these to text cuz I don't want to deal with them
00:49So this is going to be a primitive
00:55Here
00:56And that's going to be our positive prompt we're going to use that in both of the areas here
01:02And these are both going to be set to green because I know it's my positive prompt
01:05Colors
01:07Green
01:08And I want to do the exact same thing but I'm going to do it for the negative prompt so I'm just going to make sure I hold down the shift key when I paste and that will allow it to take everything in its connections
01:18So there we go we have our positive and negative prompt
01:20We're going to use a cyborg picture today so I say I'm going to spell the word cyborg correctly
01:30And then down in the negative prompt I don't really have a compulsion to put anything so I'm just going to leave it blank
01:35Okay so here's where we're going to kind of vary what we would do normally
01:39So we have our case sampler that we would load in
01:44And we would normally use the advanced case sampler but today we're going to use the simple one
01:49And we would bring our model in just like we would normally
01:51Here's our positive and our negative prompt
01:55And then we would normally have a latent latent noise
01:57So let's just let's just hook this up the way we normally do it
02:01Um so actually we used to add noise going to latent empty latent
02:04Here we would do again 1024 because that's what SDXL is good at
02:13That's the optimal size of the train size and here's our latent
02:17So you're with me already
02:17We've probably done this graph a few times, but we're almost done
02:20And then over here we want to VAE decode it
02:21So we want to turn it back from a latent into a picture
02:27So we'll go here and then we can pull this out and do your image
02:32Okay
02:34Basic graph
02:34Now, how do we image to image with this? Really the secret is we're going to instead of pushing an empty latent in, we're going to push in a latent that is from an image
02:45So there is a an add-on I would recommend you get
02:47Um so in the manager, which by the way the manager if you don't have that, it's over on Civit as well
02:52And then if you're on Civit search over there, there's a group of nodes on there called the Derfu nodes here
03:04Uh so this Derfu nodes and you can also just get these over on GitHub
03:06If you click on this, it'll open it in GitHub and you can see where those are
03:10And those are the ones you want to go grab and uh you're going to install those
03:14Now what those do is they give you some capabilities for image sizing and that's really kind of the biggest problem you're going to face here cuz the rest of this is kind of easy
03:23Uh so first of all, let's bring an image in and to do that, we're just going to add a node, go on to image and then we're going to load an image
03:30And I have one here that I like, but I'm going to grab another one here real quick
03:34I have all these women cyborgs that I've created over the months since I've been doing this and this this image is huge
03:39Uh just huge
03:42If we probably pull this out for example, you see it's going to be it's going to be gigantic
03:46And that's the the problem is is that these things have all been scaled up because I planned to retouch them and finish them and do something with them
03:53And I just never got around to them
03:54So, what I want to do is I want to play with this image, but it's gigantic
03:57And that's where those Derfu nodes come in here
03:59So, let's do add node, Derfu nodes, and we'll go to modded nodes, image, and then this is the one we're looking for is image scale to side
04:08It's pretty simple concept
04:11It basically says the image you drag in here, I'm going to scale the longest side to 1024
04:18So, we know that this will now fit into this model
04:22Otherwise, it's going to be several thousand pixels on the long edge, and that's not useful
04:26Uh so, this will do all the heavy lifting for us, and I'm just going to leave the rest of these all set because I don't mind, you know, it's the longest edge
04:33Uh I really don't care about the upscale method, and so on
04:36What I want to do is I want to feed this in, and I want to put it into this latent
04:40Well, there's a way to do that
04:41If you drag this out, for the suggested nodes is a VAE encode node
04:47So, as I said, what's your VAE? Well, it's this one
04:50So, it's it's the pretty much the exact opposite of this thing over here, where we take the latent and we take a VAE and we create an image
04:56In this case, it's taking an image and a VAE and turning it back into a latent
05:00Well, look at that
05:01Just plug that right in there
05:03And then the denoise here is how much of it do you want to keep? Uh so, it's backwards
05:07So, 100% means 100% get rid of the image, and then uh 0% would mean we want to see uh exactly the same image
05:15So, in this case, let's say we get rid of um we'll get rid of uh 35% of the image, and the rest of the image will will stay the same
05:23Uh so, I I this is a pretty good amount for denoise, I think, in general
05:28Uh so, we're going to start there
05:31And then uh let's just see what we end up with
05:40And there we go
05:41So, we could put these down next to each other
05:45Neat
05:48Obviously, one is much larger than the other one
05:54Try this one
05:54Get them
05:56So, pretty similar
05:57The detail in the hair, the face is better now
06:01SDXL is just better at faces
06:01And I do like what it did to some of the circuitry here
06:05It looks a little bit more form-fitting
06:07So, yeah, I'm I it's satisfactory
06:10But we could go ahead and play with this
06:11Against this, the number you're really working with here is this D noise here
06:15So, if we go Yeah
06:17This is what I do
06:17I kind of get my my interface and so it's kind of what I can see before and after-wise
06:21And then I'll just play with this thing
06:23So, let's say we go and we want say 45%
06:29All right, again
06:30And I like the speed of this because it doesn't have to reload all those nodes again
06:34Um but it's going to look a little bit different now because we're allowing it to change nearly half of the image
06:40There we go
06:41So, kind of fun
06:41Being able to take a concept you had and then image to image it
06:46Then again, using the prompt to guide this
06:50I'm not looking to perfect this into something that's more usable
06:52Like I liked so much about this image, but it just wasn't good enough
06:56And now I have the ability to kind of take that and run with it
06:59And again, because we're dealing with images that are much larger than we used to have, this is a pretty forgiving
07:06And we can even take this larger
07:08And I'll cover some other things about scaling this in another video
07:09But I wanted to give you this quick one for the weekend so you understand how image to image works
07:14And again, that Derfu node suite is really handy
07:15Otherwise, we have to do some math
07:18And math is fine
07:20There's math nodes available, but realistically, that node is just so simple
07:25And I love it
07:25Why not? And of course, just like everything else here, it's free and open source
07:28And it is over on Civit as well
07:32So, if you want to grab them from there or and get Anyway, that's what I had for today
07:35Everybody take care, stay safe, and have a great weekend.