Control net.
This is the same image as the one we uploaded in terms of the shape, but we're getting a completely
different prompt out of it.
So that's what Control Net can do.
It gives you a bit of control over the result of the final image.
So it's a bit like image to image except when you need to keep the shape the same.
Right?
Let me show you how this works.
I'm going to walk through it.
All right.
First we need to install the client.
So in this case.
It's the client.
And we need to get the API key.
And that's going to pull in from your dot env file.
You need to have one of those.
And then it's just a specific model that we're calling with an existing image.
We need to import from client requests.
Python display.
That's just to show the image going to get the image URL by uploading it to file client.
And then let's just print out this image.
This is a helper function we always use for getting updates when we when we prompt file.
And here we're just saying a pink rhino in a suit.
So it's going to change the rhino across to a different one.
And this is using Foul Flux Pro V1 canny.
And there are other types that you can use as well.
But this is the one that I tend to use.
And then I'm going to print the result.
We're also going to just display the image as well.
This will take the image and we'll use the request library to get the image download it.
And then it's going to show it in our Jupyter notebook as well.
All right let's see.
So that's the original image.
This one I uploaded okay.
And here we go.
Same rhino but it's pink.
And it's changed a lot about the decor in the background as well to match that.
But the shape of everything is exactly the same.
Right.
So we've got the chair in the same space, hands face in the same space.
So it's kept everything really consistent.
And that's because we've taken the outline of that image.
The canny stands for canny edge detection and edge detection method.
And yeah, super simple to use.
And you can use that for some creative uses.
For example, you can make an image with your client's logo or something like that.