WEBVTT

00:00.270 --> 00:02.340
-: All right, so you're running Stable Diffusion.

00:02.340 --> 00:06.420
You've been using 1.5 probably because it's the best version

00:06.420 --> 00:09.120
and version two kind of didn't get great results.

00:09.120 --> 00:11.370
But now you're curious because you're hearing

00:11.370 --> 00:15.090
that people are getting good results with SDXL, the new one.

00:15.090 --> 00:16.800
It is actually very good

00:16.800 --> 00:19.140
and I'm gonna show you how to migrate to that.

00:19.140 --> 00:20.890
Here I have an image of

00:20.890 --> 00:24.750
an anime cat girl, classic Stable Diffusion,

00:24.750 --> 00:28.680
and I'm just gonna save the seed here.

00:28.680 --> 00:31.110
And then we've done 30 sampling steps

00:31.110 --> 00:34.230
and this was a Eular A sampling method.

00:34.230 --> 00:37.020
And we're gonna run the exact same prompt but with SDXL.

00:37.020 --> 00:38.970
So let's get it set up.

00:38.970 --> 00:42.900
So the first thing you need to do is go to the link.

00:42.900 --> 00:45.270
It's in Stability AI on Hugging Face.

00:45.270 --> 00:48.570
You need to download the base model, which is at the bottom.

00:48.570 --> 00:52.530
It's SDXL base 1.0 safetensors.

00:52.530 --> 00:54.210
And then you also need the refiner.

00:54.210 --> 00:57.153
So the way that this works is a little bit different.

00:58.080 --> 01:02.100
The refiner is optional, but it's worth trying out.

01:02.100 --> 01:05.970
In the files and versions, if you are SDXL refiner 1.0

01:05.970 --> 01:08.358
and these are safetensors files

01:08.358 --> 01:11.190
rather than the normal checkpoint files

01:11.190 --> 01:13.080
that you might be used to.

01:13.080 --> 01:15.909
Once you've downloaded them, they do take some time,

01:15.909 --> 01:18.630
so I'm not going to right now, I already have them.

01:18.630 --> 01:20.970
If you go to Stable Diffusion Web UI

01:20.970 --> 01:22.440
and then you go to models.

01:22.440 --> 01:25.530
And then in the models you should have a folder,

01:25.530 --> 01:27.570
which is Stable Diffusion.

01:27.570 --> 01:28.830
You stick 'em in there.

01:28.830 --> 01:30.630
And once they're in there, then they'll show up.

01:30.630 --> 01:33.540
And just also make sure you're on the latest version

01:33.540 --> 01:35.588
of automatic 1111.

01:35.588 --> 01:37.815
Cool, we have that working.

01:37.815 --> 01:41.970
This is version 1.5, let's upgrade to SDXL.

01:41.970 --> 01:46.110
So first thing we need to do is in my terminal,

01:46.110 --> 01:49.803
I'm just gonna Ctrl + C to get rid of that, stop it running.

01:51.450 --> 01:54.528
And normally I run bash webui.sh.

01:54.528 --> 01:57.930
But you want to run it slightly different,

01:57.930 --> 02:01.050
which is no-half-vae.

02:01.050 --> 02:03.480
You need that at least on my Mac.

02:03.480 --> 02:06.510
And obviously these instructions change fairly frequently.

02:06.510 --> 02:09.900
So just look up on the repository for automatic 1111,

02:09.900 --> 02:11.411
you should have a good tutorial,

02:11.411 --> 02:14.470
but that's how I got it working on my Mac.

02:14.470 --> 02:17.310
And it takes a little bit longer to set up.

02:17.310 --> 02:20.281
It is, I think a bit, obviously a bigger model.

02:20.281 --> 02:25.173
So we'll just see how this works.

02:27.000 --> 02:28.950
Pops open here.

02:28.950 --> 02:31.893
So then we're gonna copy across our prompt.

02:33.930 --> 02:38.930
So that one, then this is the negative prompt.

02:39.360 --> 02:42.840
We're gonna do 30 checkpoints.

02:42.840 --> 02:44.940
And then there's one thing we have to change here.

02:44.940 --> 02:49.940
Instead of 512, we need to make it 1024 by 1024.

02:50.490 --> 02:53.790
I just have a preset saved here using an extension.

02:53.790 --> 02:55.410
But you can just type that in.

02:55.410 --> 02:59.310
And then we also need to make sure our seed is in here,

02:59.310 --> 03:00.600
so copy the seed across.

03:00.600 --> 03:02.610
And this means that all things being equal,

03:02.610 --> 03:04.950
it would be the exact same image,

03:04.950 --> 03:06.210
but obviously things aren't equal

03:06.210 --> 03:09.540
because it's Stable Diffusion XL.

03:09.540 --> 03:12.990
That's everything we need to change apart from the refiner.

03:12.990 --> 03:15.070
The refiner model, where that comes in

03:15.910 --> 03:17.760
is if you click in here and choose refiner

03:17.760 --> 03:20.070
and you need to up here, actually, sorry,

03:20.070 --> 03:22.140
change this to the base.

03:22.140 --> 03:25.530
What the refiner does is the base will actually generate

03:25.530 --> 03:27.330
the composition of the image,

03:27.330 --> 03:29.090
but then the refiner, it switches over

03:29.090 --> 03:32.310
to the refiner at some point to add the fine details.

03:32.310 --> 03:34.800
So they've divided and conquered there

03:34.800 --> 03:36.030
with two different models.

03:36.030 --> 03:38.730
And one's really good at generating the base image

03:38.730 --> 03:40.920
and the other is really good at refining the image,

03:40.920 --> 03:42.450
hence the names.

03:42.450 --> 03:44.360
And we're also gonna set this to 0.6.

03:45.660 --> 03:47.250
You can experiment with this,

03:47.250 --> 03:48.780
but basically what this means is

03:48.780 --> 03:52.140
in the 30 sampling steps, when you get 60% of the way

03:52.140 --> 03:54.750
through, it's gonna switch over to the refiner model.

03:54.750 --> 03:55.800
You can experiment with this

03:55.800 --> 03:57.930
and see what type of results you get.

03:57.930 --> 04:01.620
Okay, I'm gonna hit Generate and hopefully this works.

04:01.620 --> 04:04.143
We'll be able to see the image in a few minutes.

04:06.180 --> 04:08.190
Okay, it's almost done.

04:08.190 --> 04:10.590
It's been going for a few minutes now.

04:10.590 --> 04:12.603
It should be done in a second.

04:14.519 --> 04:16.819
You can see here it's been about five minutes.

04:19.740 --> 04:21.930
So it is a bigger model, it does take a lot longer.

04:21.930 --> 04:24.300
But look at those results, right?

04:24.300 --> 04:27.240
Compare this, this looks really childish

04:27.240 --> 04:29.880
and not very good at all.

04:29.880 --> 04:32.490
Take a lot of prompt engineering to get this good.

04:32.490 --> 04:35.673
But look at this and this is fantastic, right?

04:36.690 --> 04:39.270
You can't argue with quality.

04:39.270 --> 04:41.280
Yeah, this is, it's definitely worth the wait.

04:41.280 --> 04:43.298
I'm glad that they finally got a model

04:43.298 --> 04:46.530
that's much better than the original.

04:46.530 --> 04:49.591
And yeah, it's not actually that difficult to change.

04:49.591 --> 04:52.530
There's still some things that aren't compatible,

04:52.530 --> 04:54.420
but there's still some bugs in the system,

04:54.420 --> 04:56.880
but it generally works incredibly well.

04:56.880 --> 04:58.113
So enjoy.
