WEBVTT

00:00.120 --> 00:01.120
Control net.

00:01.160 --> 00:08.840
This is the same image as the one we uploaded in terms of the shape, but we're getting a completely

00:08.840 --> 00:10.280
different prompt out of it.

00:10.600 --> 00:12.600
So that's what Control Net can do.

00:12.640 --> 00:17.800
It gives you a bit of control over the result of the final image.

00:17.800 --> 00:22.000
So it's a bit like image to image except when you need to keep the shape the same.

00:22.560 --> 00:22.840
Right?

00:22.880 --> 00:24.440
Let me show you how this works.

00:24.440 --> 00:25.600
I'm going to walk through it.

00:26.280 --> 00:26.760
All right.

00:27.520 --> 00:29.560
First we need to install the client.

00:29.600 --> 00:31.800
So in this case.

00:35.200 --> 00:36.520
It's the client.

00:36.520 --> 00:38.680
And we need to get the API key.

00:39.320 --> 00:41.640
And that's going to pull in from your dot env file.

00:41.680 --> 00:42.800
You need to have one of those.

00:43.240 --> 00:48.800
And then it's just a specific model that we're calling with an existing image.

00:49.480 --> 00:54.520
We need to import from client requests.

00:54.560 --> 00:55.520
Python display.

00:55.520 --> 01:00.680
That's just to show the image going to get the image URL by uploading it to file client.

01:01.120 --> 01:03.280
And then let's just print out this image.

01:04.760 --> 01:10.440
This is a helper function we always use for getting updates when we when we prompt file.

01:11.160 --> 01:13.600
And here we're just saying a pink rhino in a suit.

01:13.600 --> 01:17.590
So it's going to change the rhino across to a different one.

01:17.590 --> 01:22.350
And this is using Foul Flux Pro V1 canny.

01:22.390 --> 01:24.990
And there are other types that you can use as well.

01:25.430 --> 01:28.030
But this is the one that I tend to use.

01:28.750 --> 01:31.350
And then I'm going to print the result.

01:31.350 --> 01:34.630
We're also going to just display the image as well.

01:34.630 --> 01:39.230
This will take the image and we'll use the request library to get the image download it.

01:39.430 --> 01:44.350
And then it's going to show it in our Jupyter notebook as well.

01:45.110 --> 01:45.990
All right let's see.

01:46.750 --> 01:48.270
So that's the original image.

01:48.590 --> 01:50.990
This one I uploaded okay.

01:51.030 --> 01:51.910
And here we go.

01:52.310 --> 01:53.990
Same rhino but it's pink.

01:55.670 --> 02:00.390
And it's changed a lot about the decor in the background as well to match that.

02:00.390 --> 02:02.750
But the shape of everything is exactly the same.

02:02.790 --> 02:02.990
Right.

02:03.030 --> 02:07.870
So we've got the chair in the same space, hands face in the same space.

02:08.070 --> 02:10.110
So it's kept everything really consistent.

02:10.590 --> 02:13.630
And that's because we've taken the outline of that image.

02:13.990 --> 02:19.070
The canny stands for canny edge detection and edge detection method.

02:19.350 --> 02:21.150
And yeah, super simple to use.

02:21.190 --> 02:23.630
And you can use that for some creative uses.

02:23.630 --> 02:27.230
For example, you can make an image with your client's logo or something like that.
