So you've been using Fooocus for a little while.
You got a lot of different styles you may not even realize you can actually add your own styles to
Fooocus, and that's what I'm going to show you here: how to create your own custom styles. I
have a video that explains more about styles in Fooocus, and I do recommend watching that to get
a better understanding of how everything works. The first thing to know is that Fooocus V2
is unlike all the other styles. It's created based on your prompt, and when you go to
generate, it adds extra keywords to your prompt. This is different from the other styles,
which are all preset so every time you use those, it'll always add those exact same keywords to
your prompt. The easiest way to see that is if we go in here and enable the metadata tab.
I have my images with the metadata embedded, so when I drop it in here, I can see
all the prompts that have been added. Down at the bottom, we can see
we've added these three prompts. The V2 prompt expansion added this,
and then the styles added these. Now, it added these for the negative prompt, this
one here, and then this one here, because each one of those styles has their own negative
prompts. The same thing with the full prompt, we'll see that our actual prompt was just
that, and everything else was placed around it. It's like a wrapper, and it wraps your
prompt with additional prompt information. Now, I'm going to show you how to create those.
The first thing you want to do to do this, and you can do this with just a text editor, you're
not going to need any special skills. We want to bring up our primary Fooocus folder. Once you go
into there, there's an SDXL Styles folder. We go into there, and these are all your different
style files. You can have them all in one; you can make different files for different
types of styles, that's entirely up to you. The easiest way to do this to get started is just
to take one of these and make a copy of it. So, I'm going to take the Fooocus one, copy
that, paste it. I'm going to rename it, and I'm just going to call this one 'custom_styles.json', and that's it. I'm going to go ahead and open that, and you can open
this with whatever text editor or however you want to use it. We're going to open
this with Notepad++. Looking in here, you'll notice there's an awful lot of stuff in
here we're not going to use; we're going to reuse and delete all these for the most part because
we don't need duplicates. We already have them. Look at the format, all these are in the
same format. You have your name first of the actual style. We have our comma,
and then we have the negative prompt if there's one. This one's only got the
negative prompt, the same with this one; only has a negative prompt. This one has
positive and a negative prompt, and you can have ones that just have the positive prompt.
It's entirely up to you how you want to do this. Let's go ahead and delete most of these because
we do not need those. We do want to make sure we get rid of that last comma because if you
have multiples of these, you would want a comma between them. Follow the format that's originally
in the original file. That's why it's easier just to rename, copy, and rename one so you don't have
to type everything out and then mess something up. In this one, I'm just going to change the
name, let's say 'Custom Battlefield.' So now, whenever I want a battlefield image, I don't
need to type in all the details of what I want. In here, I'm going to leave the Cinematic still
in here. Then you'll notice this here says '{prompt}' — that is the placeholder for where your
prompt is going to go that you type into the box. We're going to leave that, and then everything
after this, we can go ahead and get rid of. Now, in here, I might want to put, well, what
do I want for Battlefield? We're going to do explosions, smoke, fire, dirty, chaotic — yeah,
I think that'll do. And for our negative prompt, I might not normally need something,
but just to show you how it works, we're going to put 'uplifting' and 'peaceful'
— definitely not Battlefield things. Okay, so we have everything set up, we have
our last one without the comma. If we wanted to create more, we'd put a comma, and then we
do the same thing again. You could create a whole bunch in one sheet, one file, or you can
have different files depending on category if you wanted to. We're going to go ahead and save
this, and we've got our custom Styles in here. Wait a second, it doesn't show up. Well,
of course not, because we have to restart Fooocus now to get that to show up. So
let's go ahead and shut down Fooocus, and we'll restart it. Okay, so if we go in,
we have our 'Custom Battlefield' listed, but as you can see, we do not have a preview.
I'm going to show you how to do that in a moment; that's pretty simple to do. I don't have an
image yet; we're going to have to create one. So let's go ahead, and we're going to do 'bird's
eye view tanks.' Now, I do want... okay, we get 1024 by 1024 for this. This one, I'm going to just
change it over to JPEG because that's the format we're going to want for our sample image, although
you can do it with a PNG and just change the name, that'll work as well. Let's go ahead and generate
and test to make sure that the custom style is working. I'm going to disable these, enable
that one, and let's go ahead and generate. Okay, let's go ahead and stop this; I got
what I needed. We can now check to see if this worked. So, let's open up our metadata
tab. I'm going to go find one of those images and bring it in. Now if we look in here, down at
the bottom, we did definitely have it enabled. So, as we can see up here, it added 'uplifting'
and 'peaceful' for the negative prompt, which were added from there, so we know that worked
properly. And if we look at everything else, it added the prompt 'bird's eye view tanks,'
and then it put the rest around it. So, everything seems to be working
here; our custom style is all set. And if you wanted to add more, you could add
more to this; you could create another one, leave the original ones alone, keep your
custom ones in their own files. So now that we have that all set, we know that that
is working, we just need to now get our image in there, and that's pretty simple to do.
So first, we want to go into our Fooocus folder again, and in there, in the Styles folder, you'll
find the samples folder. So if we go into here, you'll notice all of them are named by the style
name with any spaces replaced with underscores. So, I'm going to take that image I just
created, I'm going to drop it in here, and it won't do anything yet; we need to actually
rename this. Since our... and we're going to rename the whole thing because JPEG with the 'e'
in there, it won't recognize that, it's got to be JPG for it to recognize it. So we're going to do
'custom_battlefield.jpg,' which was the name, and then we're going to do JPG, and we're going
to yes, we want to change it. That's all set, and now we didn't need to refresh it in
Fooocus for it to show up, there it is. So we now have our custom sample image, and you
can do that to change any of the other ones that you want if you prefer to have a different image,
that's entirely up to you. And that's all there is to creating your custom styles. You can also
look online; other people have styles they share, and you can put those in that folder as well.
Do be a little careful if you grab one of the very large files that might have hundreds
of styles because the next thing you know, you may have this list so long that you can't
find what you're looking for even with the search function. Hopefully, that should get you
going with your own custom styles in Fooocus, and if you found the video helpful, please
consider hitting the like button or even buying me a cup of electricity. If you want to
learn more about Fooocus, do check out some of my other videos. Thanks for watching, and have
fun creating some of your own custom styles.