-: All right, so you're running Stable Diffusion.
You've been using 1.5 probably because it's the best version
and version two kind of didn't get great results.
But now you're curious because you're hearing
that people are getting good results with SDXL, the new one.
It is actually very good
and I'm gonna show you how to migrate to that.
Here I have an image of
an anime cat girl, classic Stable Diffusion,
and I'm just gonna save the seed here.
And then we've done 30 sampling steps
and this was a Eular A sampling method.
And we're gonna run the exact same prompt but with SDXL.
So let's get it set up.
So the first thing you need to do is go to the link.
It's in Stability AI on Hugging Face.
You need to download the base model, which is at the bottom.
It's SDXL base 1.0 safetensors.
And then you also need the refiner.
So the way that this works is a little bit different.
The refiner is optional, but it's worth trying out.
In the files and versions, if you are SDXL refiner 1.0
and these are safetensors files
rather than the normal checkpoint files
that you might be used to.
Once you've downloaded them, they do take some time,
so I'm not going to right now, I already have them.
If you go to Stable Diffusion Web UI
and then you go to models.
And then in the models you should have a folder,
which is Stable Diffusion.
You stick 'em in there.
And once they're in there, then they'll show up.
And just also make sure you're on the latest version
of automatic 1111.
Cool, we have that working.
This is version 1.5, let's upgrade to SDXL.
So first thing we need to do is in my terminal,
I'm just gonna Ctrl + C to get rid of that, stop it running.
And normally I run bash webui.sh.
But you want to run it slightly different,
which is no-half-vae.
You need that at least on my Mac.
And obviously these instructions change fairly frequently.
So just look up on the repository for automatic 1111,
you should have a good tutorial,
but that's how I got it working on my Mac.
And it takes a little bit longer to set up.
It is, I think a bit, obviously a bigger model.
So we'll just see how this works.
Pops open here.
So then we're gonna copy across our prompt.
So that one, then this is the negative prompt.
We're gonna do 30 checkpoints.
And then there's one thing we have to change here.
Instead of 512, we need to make it 1024 by 1024.
I just have a preset saved here using an extension.
But you can just type that in.
And then we also need to make sure our seed is in here,
so copy the seed across.
And this means that all things being equal,
it would be the exact same image,
but obviously things aren't equal
because it's Stable Diffusion XL.
That's everything we need to change apart from the refiner.
The refiner model, where that comes in
is if you click in here and choose refiner
and you need to up here, actually, sorry,
change this to the base.
What the refiner does is the base will actually generate
the composition of the image,
but then the refiner, it switches over
to the refiner at some point to add the fine details.
So they've divided and conquered there
with two different models.
And one's really good at generating the base image
and the other is really good at refining the image,
hence the names.
And we're also gonna set this to 0.6.
You can experiment with this,
but basically what this means is
in the 30 sampling steps, when you get 60% of the way
through, it's gonna switch over to the refiner model.
You can experiment with this
and see what type of results you get.
Okay, I'm gonna hit Generate and hopefully this works.
We'll be able to see the image in a few minutes.
Okay, it's almost done.
It's been going for a few minutes now.
It should be done in a second.
You can see here it's been about five minutes.
So it is a bigger model, it does take a lot longer.
But look at those results, right?
Compare this, this looks really childish
and not very good at all.
Take a lot of prompt engineering to get this good.
But look at this and this is fantastic, right?
You can't argue with quality.
Yeah, this is, it's definitely worth the wait.
I'm glad that they finally got a model
that's much better than the original.
And yeah, it's not actually that difficult to change.
There's still some things that aren't compatible,
but there's still some bugs in the system,
but it generally works incredibly well.
So enjoy.