Hey it's Bob Duffy from Intel here and
once again we're doing stable diffusion on Intel Arc gpus but here we're going
to battle it out between two WebUIs the fooocus UI and the comfyUI now these are
both very powerful WebUIs in their own right but they couldn't be more
different they are at the extreme ends of the spectrum for user experience so
we're going to kick it off with fooocus first because stable diffusion has been
criticized for being not very consumer friendly. Really a UI developed
for developers rather than consumers well Fooocus is here to challenge that
thinking. It's a super simple interface and then we're going to jump over to
ComfyUI see how that works and how different it is and I guarantee you one
of these uis is the right UI for you. And also look in the description below
because I will have installation instructions or at least links to
installation instructions for you guys to figure out how to get this to work on
your own Intel Arc GPU. So let's start with Fooocus. See you there. Okay so here we are in the Fooocus
WebUI for stable diffusion and like I said a super simple interface you have
this large image preview area here that's there for as when you generate
images or you can click through any images within your gallery that get
generated. Other options are pretty simple. You've got an area for your
positive text prompt and then you have a button to generate. And so that's the
bulk of the the UI. It's it's super simple to use a couple of other options
um you have an"image" input option if you want to do image to image or
inpainting and I'll show you that and then you have "advanced", which is really a
settings area. A lot of things are just set up by default um so we're going
to just kind of keep it as is, and I'm just going to go ahead and click
generate um so we'll get an image here, and I'll walk you through what's going
on. So fooocus is using the Juggernaut XL model and that is by default you
don't have to go to CivitAI or Hugging face to download anything it's already
included so it's super simple, and so you can see it's working here but it had
some overhead up front and you'll notice this as we do things there's a
little bit of an overhead so there's extra time that you'll see in Fooocus
doing things like Refiners. So what it does is it tries to do the things that
would imagine that you'd want to do in order to create a good image and it just
automatically does them for you. And so you can see here. This is just
gorgeous work here. I really love Fooocus because it really takes a lot of the
work out of getting it right. Things just look uh really good most of the
time. So if you want to do a little bit more you could jump into the
advanced features. But what I want to do first is show you kind of the feature
that I love most and it's this um out painting area so I'd already done it
here so let let me show you what I did um you can take an image that you get
generated um select the input image and then drag that down below into this
area here. And then you've got some options here for in paint and out paint
I'm going to show you this very first one here and demonstrate it here but let
me talk you through some of the others you could do improve detail which that
allows you to then go ahead and paint an area and then describe what you want to
see in that area and that's usually what it's going to do is improve that so it's
going to use the information that's already there and try to make it better
and then you have the other area which is modify content again you'd
paint an area and then you describe what you'd want there but it's going to try
to differ the information from what's already there. But what I'm going to
show you guys is the out painting feature. The feature that I really like
So we we've got this set to out painting and I'm going to select the
right and bottom area. So what it's going to do is going to make a picture where
it expands it out to the right into the bottom and it's going to imagine what
could have been there, or what should be there. So let's go ahead and click
generate and it'll run through that. But to prove this is all running on Arc
you can see that will hit my GPU here and also you can see that it is doing
some of that kind of work it's it's taking the model moving it over to the
GPU. Calculating the refiners and then it's going to go ahead and start working
on it. And here we go so we're starting to see this image get created here,
down below and off to the right. Now if you're going to do out painting what I
suggest is you make sure that you're on the "speed" option. So if you go to
advance you'll see some of these preferences. There's "speed", "quality" and
"extreme speed". Speed is set to default and that's going to be doing
sdxl at 30 steps, which is usually what you do in automatic 1111. "Quality" is
going to bump that up to 60 steps. And extreme speed is going to do an LCM fast
LoRA, down to eight steps. But as you can see here it did a really good
job in this out painting. The areas in the background. It kept that out of focus
where it matched the depth of field that was happening in the image. And then
the images or the stuff that's in the foreground. It kept that clean and crisp
And it matched her garments there so a really powerful feature. And if I wanted
to I could take this image, I could drag it down below and I could do more to the
right or the bottom, or I could do top left and bottom. I could you know
try to imagine or see other features that are not in the picture and generate that
So very very powerful, but what I want to show you is the extreme speed
So let's go ahead and jump to that and let's go ahead and do three images there.
We'll go ahead and turn off uh image input and turn off the Advanced,Wait a
minute and let me make sure that I'm on random. There we go, if I wanted to I
could add a negative prompt I didn't show you that but that is a feature
that's available. Tt's hidden in the advanced area there because mostly what
they figure you're just going to type hit the button and there you go. But let
me go ahead and click generate and then it's going to do the LCM now one of the
things that you notice that all I did is I went over to Advanced and I clicked
the extreme speed. If you were going to do LCM on automatic 1111 or comfy UI
what you're used to doing is changing the number of steps say down from 30 to
4 or 8, um setting the CFG to something like 1 to 2, and then you
also be changing the the scheduler. So you'd be changing it from like Euler A or
something like that to LCM. And this is doing all of those things that you
would normally do just in one button, for you, so it's super convenient and great
and the work the stuff that it does is really good. What I notice is when I'm
doing A1111 or ComfyUI and I'm doing fast Laura, to me it's like a-cut-above
what I would typically get if I was doing 512 x 512 at say 20 or 30 steps
but this does it really well and you can see that it it ran through each of
these and when it did those when it was actually generating and was was doing
the diffusion it took about 3 seconds per image. But again it has this overhead
thatFooocus usually has in order to do the things that it thinks that you
should be doing. So there you have it that is the Fooocus UI. Super simple
interface. It takes all the thinking out of it. Takes all the tweaking
configuration out of it. But it allows you to go in and do some of that stuff
if you really wanted to. Anyways we'll contrast that with ComfyUI so
we're going to jump over to ComfyUI. See what that's like. And we'll first do
LCM fast LoRA and you can compare the difference. see you there.
Okay here we are in The Comfy UI interface and we're already generating
images. I thought I'd just get this going and then I can talk through what's going
on. So right now we're generating images using LCM fast LoRA and I'm
using RealisticVision 1.5 so this is SDXL. This is fast. but we're
generating images pretty fast here let go ahead and change and look at
this here. Yeah in less than a second we're generating each image. It's not
loading a model or moving them over to the GPU for every time that it's
running. There's no refiners running. It's just straight happening and it's
happening very fast let me go ahead and turn off this auto queue and I can talk
through what's going on in ComfyUI So you'll notice that the node is
uh that the interface is very different than Fooocus. It's using this node-based
system. So if you're used to Blender or UnReal Engine or other node-based systems
here, this is going to be pretty familiar to you. It's essentially it's like a
visual programming method. Essentially programming without code, but just
connecting the outputs from um one function to the inputs of another. So
the very first thing that you're going to have is something like checkpoint
Checkpoint is that thing where you'd be in automatic 1111 or SDNext and
essentially you're seting which model that you're using. Some of these models
could come from Hugging Face. They could come from CivitAI, and you can choose
from all sorts of models. So I've gone ahead and downloaded a number of models
from CivitAI that I like to use and I've made them available here and I've
selected the RealisticVision Model. Typically clip is going to connect
into, if you follow these yellow lines, into your text prompt and you have a
positive prompt that's going into your sampler and then you have a negative
prompt that's going into your sampler. You also have latent image as part of
the sampler and that's where you're going to specify your resolution. And
then most of the other features that you would have typically within stable
diffusion, like the number of steps the CFG the Sampler Name, all that kind of
stuff is available here in this sampler node. But we were doing LCM fast LoRA
and that's available through this one note here that is essentially
intersecting between the checkpoint in the sampler, and my text
prompts to the sampler. So that's what it allows you to do. It allows you to
establish what's the model so I take the model here and I plug it in and I take
the clip information and I plug it in here. And then the model goes back out to
the sampler. And the Clips connect to your text prompts which then go into the
Sampler here. But I do have an option for 1.5 or XL. So let's go ahead and give
that a shot. I'm going to go and change this over to the JuggernautXL model that
we were using in Fooocus, and then let me go ahead and change this to
SDXL and then I'm going to go ahead and change my image to 1024 and 1024, Okay and that should be all that
I need to do in order to change this to an SDXLmodel using Juggernaut okay now
because I'm doing LCM fast Laura I don't need to really change anything else here
that is all set so let me go ahead and Queue prompt. Now the first time it runs
this it's going to go ahead and load that model and then it's going to move
over to the sampler and get that done. So that's happening pretty quickly and as
you can see we've got an SDXL image here that looks really nice and you can tell
I'll go ahead and queue that up as it's going
on and this is faster than we were seeing withFooocus so Fooocus has this
additional overhead um and we don't see that here these are happening in about
three to three and a half seconds which is about what it took on Fooocus as well
but Fooocus was doing some refiner work as well as moving things over to the GPU um
before it went ahead and worked with the sampler this is just happening licky
split. Things are going really fast but I noticed that you know the quality
maybe not as good as I was getting in Fooocus but it's certainly really nice um
and if I wanted to I could increase the steps or I could you know change the
resolution and hope that I would get that better or what I could do is just
not do LCM fast Laura and essentially bypass that. So let's go ahead and do
that so what I'm going to do is I'm going to disconnect the clip here and
disconnect this clip here from the LoRA and I'm going to connect directly from
the checkpoint node and then I'm going to do the same here for the mod model
disconnect it and connect directly into the model there and then I think uh this
information terms of the latent image is fine but I do have to make some changes
because I'm doing standard um SDXL so I'm going to change this to 30 steps and
I'm going to change this to 7 and I'm going to change my sampler
from LCM to Euler A and then this to Kerras and that's typically what you'd see
these are the standard things no matter what you'd be doing if you're doing SDXL
um and you're doing it in on let's say automatic 1111, this is what you'd
have so I think everything's good so I'm going to go ahead and hit Queue prompt now
this will take longer to do because we're obviously we're now doing 30 steps
we are doing LCM fast low at eight steps so this is going to take more I think
typically this takes usually around 20 seconds that's my experience um 15 to 20
seconds depending if you're doing say uh 15 or 20 steps uh so it's going to go
ahead and get done and we will see that image over here on the right yeah there
we go another beautiful Alchemist image ccoming out of this. And I go ahead and
kick that off again but um that demonstrates the the possibilities
with ComfyUI is you can do ControlNet you know you can do
inpainting. You can do out-painting. You can do image to image. There's a lot that you
can do here and there's even stuff that you can do with custom nodes. And that's
the next thing that I'd love to show you guys is let's step this up a notch. Let's
add in the custom nodes and see what comfyUI is really all about Okay here we are back in stable
diffusion and I'm using one of my other favorite applications and that is
Blender. Blender is being used with a custom node called ToyXYZ which will
capture information from blender and pipe it directly into ComfyUI and that's
using ControlNet in order to influence the outcome of that image. So as you can
see I've got fast LCM LoRA going on here and we're generating a lot of images
really quickly based um that Blender imag,e but it's happening real
time. So I can move this around and I'm going to go ahead and then use that in
order to get new information rendering So you can see the power of this is
quite incredible you can imagine companies like Blender and Autodesk and
how they might actually use artificial intelligence use tools like stable
diffusion as another tool in their toolbox for doing things like fast or
realtime rendering. So we had Fooocus which is super simple to use it takes
a lot of the extra working configuration out and gives you high quality images
and then we have ComfyUI that allows you to really adjust all the knobs bells and
whistles and switches to really influence the outcome with some really
cool custom nodes from the community, So I hope you found this enjoyable, so
especially if you did, please like this video and subscribe to this YouTube
channel. Many more videos like this to come. Until next time I'm your host Bob
Duffy and we'll catch you later. [Music]