HomeVideos

ComfyUI Explained: A Beginner's Guide to Local AI Image Generation

Now Playing

ComfyUI Explained: A Beginner's Guide to Local AI Image Generation

Transcript

287 segments

0:00

hello everyone this is Professor

0:01

patterns and in this video we're going

0:02

to be looking at comfy UI now when I

0:05

first saw comfy UI I saw all of these

0:08

different nodes and I got really

0:09

confused like there's so many different

0:10

things that are happening and I thought

0:12

okay this is not really beginner

0:13

friendly and I'm just going to be

0:14

sticking to open ai's Dolly 3 Model it

0:18

was only when one of the subscribers

0:19

from this channel reached out to me and

0:20

said hey can you create a video on comy

0:22

UI and I thought okay well sure uh maybe

0:25

this might be a chance for me to take a

0:27

second look at it and I'm really glad

0:29

that they sent me that comment

0:30

because I could really see exactly how

0:33

powerful um comfy UI really is we can

0:36

use it for creating images obviously

0:38

that look um really good so like this

0:41

for example image was created completely

0:43

locally on my computer using comfy UI um

0:46

you just have to do some prompt

0:47

engineering here and there which I'm

0:48

going to show you uh what that's going

0:50

to look like here in a second um but you

0:52

can also use comfy UI for things like

0:55

text to image generation you can use it

0:57

for things like with the same image you

0:59

can use use it for things like image to

1:01

video generation and you can see how

1:03

realistic this actually looks well

1:05

realistic in terms of the cartoon uh we

1:08

can use it for things like Scribble to

1:10

images so here the input is just a

1:13

simple scribble and it actually creates

1:16

this image uh over here we can see how

1:18

it's using an input image to then create

1:21

everything about this image like the

1:22

outline the background all of those

1:24

things uh this is one where we give it a

1:27

like a set of different poses and then

1:28

it creates uh characters based on those

1:32

poses it allows us to get a lot more of

1:35

a fine grain control on the image

1:37

generation process that's what makes it

1:39

so much more powerful here we can see

1:42

where we provide an input prompt

1:44

something like photograph landscape

1:46

scenery but we can also create nodes

1:48

that allow us to uh do things like add a

1:51

purple Galaxy bottle in this specific XY

1:54

coordinate in the image so we can see

1:56

what that looks like over here we can

1:58

create the sun in this specific XY

2:00

coordinate and that's what it would look

2:01

like there and for all of these

2:03

different images right that you see um

2:06

any image that was created with the

2:08

comfy UI workflow you can just simply

2:09

save that image just as a PNG file right

2:14

and if you open up this file you can go

2:16

over to your comfy UI um desktop

2:19

application you can simply drag and drop

2:24

that image on here and it's going to

2:27

load up the exact workflow that was used

2:29

to create create that image so that's

2:31

what's so powerful you don't need to

2:33

know all of these things you don't need

2:35

to know all of these noes and I think

2:36

that's what really was throwing me off

2:38

the first time I thought okay there's so

2:40

much things so many things that I'm

2:41

going to have to learn and I don't have

2:43

the time for it but I pretty easily

2:46

found out that there's an entire

2:48

community of people that have that are

2:51

really dedicated that have created all

2:52

of these different workflows for people

2:54

like us to really experiment with and

2:56

I'm very grateful for

2:58

them okay so now that we know what comfy

3:02

UI is how do we actually install it well

3:06

the first thing that you'll want to do

3:08

is to go to the comfy UI GitHub

3:10

repository now I know what you're

3:12

thinking no there's no Docker container

3:15

there's nothing like uh complex

3:17

installation process steps or anything

3:19

like that it's actually very simple all

3:22

you would do is just scroll down and

3:24

click on desktop

3:26

application and it's as simple as that

3:28

if you're on a Windows you'll download

3:30

this if you're on a Mac you download

3:31

this and then it's going to create an

3:33

icon on your desktop you can open it and

3:36

you'll get this interface that looks

3:38

just like this if you did want to get a

3:41

lot more of a fine grain control in the

3:44

installation process then what you can

3:46

do is scroll all the way down

3:50

here on whatever operating system that

3:52

you have so for example if you have

3:54

Windows portable you can uh select or

3:57

click on this link it's going to give

3:59

you a file you have to extract that file

4:01

and then you have to do some moving

4:03

around of things but why would you want

4:06

to to do that when there's a very simple

4:09

oneclick uh method of actually

4:11

installing it

4:13

now as soon as you're done installing U

4:16

comfy UI you're going to get this sort

4:19

of like a sample workflow like this is

4:21

not something that I have created this

4:23

is something that came directly when I

4:25

first opened up comy UI now the only

4:28

thing that I needed to do was to

4:30

download a model so the next question

4:32

that comes up is well what sort of model

4:34

should I be using well it really depends

4:37

on your GPU so if you want to create

4:40

really powerful or stunning

4:42

visualizations something that looks like

4:44

this well you're going to need a

4:45

slightly beef your GPU I am actually

4:48

running this on an Nvidia 490 but the

4:52

good thing here is that comy UI also has

4:54

a page that kind of shows you like What

4:57

GPU you should be buying uh for company

4:59

UI so it goes through like all of these

5:01

different tiers for um Nvidia we have

5:04

for AMD the C tier for Mac um and then D

5:08

tier F tier now what model should I be

5:12

using well the site that you can find a

5:14

bunch of these different models on is

5:16

known as civit AI So within civit what

5:20

you would do is you can search for

5:22

models and here you can see a bunch of

5:24

different models that are used for

5:26

creating all sorts of different

5:28

images now initially it might get

5:30

confusing right like okay well do I want

5:32

this model or this model and what's the

5:34

exact purpose or application now the

5:37

tool that I like to use is this one

5:39

that's known as imgs y.org the way it

5:43

works is it gives a prompt like this so

5:46

two men in athletic clothing stand side

5:48

by side and you can decide like based on

5:51

these two things which image do you like

5:53

more to be honest I like this image more

5:56

so I'm going to select left and I can

5:57

see that this is the half moon model

5:59

okay that's great let's try a couple

6:01

more images uh so they prompt a black

6:03

and silver skateboard truck uh concave

6:06

bottom this one looks a little bit more

6:08

realistic so I'm going to go right and

6:10

this one was the playground V 2.0 model

6:13

let's try one more so a set of 12

6:15

assorted soap bars wrapped in a red and

6:17

blue ribbon um to me I feel like this

6:20

one looks a little bit more realistic

6:22

and this one was the half moon model so

6:24

you can see that there there are all of

6:26

these people that have gone in and done

6:29

this an ation process and you can find

6:32

all of these different rankings here you

6:34

can just click on hugging face and

6:36

you'll be able to see an entire data set

6:39

of all of the different prompts and

6:41

which model end up winning for each

6:43

prompt if you don't care about that all

6:45

you need really need to do is just look

6:47

at this thing called Rank and then for

6:50

rank you can see exactly what are the

6:52

top ranked models so as an example I can

6:55

see that Flex one Dev Flex one pro these

6:58

are some highly ranked models uh I have

7:01

real Wiz XL 4.0 so suppose this is the

7:03

model that I want right I'm going to

7:05

copy this real Wiz Xcel version

7:09

4.0 I'm going to go to civit Ai and then

7:12

here I'm going to paste uh realz Excel

7:15

4.0 and then it shows up like this now

7:19

here I can see that it's a good thing

7:21

that I actually now have the latest

7:23

version which is version

7:25

5.0 um this is the 4.0 that we were

7:27

looking at before so there are all of

7:30

these different versions for each model

7:32

uh that we can use so suppose I use this

7:35

one the 5.0 model what I would need to

7:38

do is to Simply download this model so

7:42

if you hit download it's going to start

7:43

downloading this model locally on your

7:45

computer and why don't I just go ahead

7:47

and do that and there we go so this file

7:49

6.5 gigs was downloaded and I can see

7:52

what it looks like here on my downloads

7:54

folder now if I want to add this model

7:57

what I can do is just go to the place

7:59

where I had installed comfy UI and in

8:01

this case it's in my

8:03

documents um So within my documents the

8:06

place that I need to drag and drop this

8:08

model file is in the models folder I

8:12

would select checkpoints and then in my

8:15

checkpoints all I would do is just

8:17

simply drag this model place it right

8:19

here once that's done I pretty much will

8:22

now be able to start using this model so

8:25

that is how you can then uh let me open

8:29

up the interface if you if the model

8:31

doesn't show up um like this like the

8:33

checkpoints it should show up if it

8:34

doesn't you can simply load all the

8:36

folders or just hit refresh and then

8:39

after it refreshes it should show up as

8:40

long as the model is in this location um

8:44

for checkpoints it will be able to show

8:46

up

8:47

here okay so so far all we did was we

8:50

looked at a very simple a very basic

8:53

workflow all we would do is this

8:57

particular cell is or note is mostly for

8:59

loading the model from a

9:01

checkpoint this right here is where we

9:03

can put in some sort of an input prompt

9:06

and in my case the input prompt is a

9:07

wolf playing blackjack with three little

9:09

piggies um over here I can add in a

9:12

negative so for example suppose that I

9:14

don't want to see cards right like what

9:17

would that end up looking like um here I

9:20

can control more things so for example

9:23

um what is the length of the images so

9:25

for I can have something like 1024 x

9:27

1024 image sizes and those kind of

9:29

things this are more controls that will

9:32

allow us to create images so I can

9:35

change between different types so um for

9:38

example if you hover over each one of

9:40

these it'll tell you like exactly what

9:41

you would need so if I set the seed

9:44

as fixed that means that any single time

9:47

I I hit run I'm going to be able to get

9:50

the same looking image every single time

9:53

so this is the second time that I run it

9:55

this is the third time that I run it it

9:57

doesn't matter I keep getting the same

9:58

exact image if I set the seed as random

10:03

that way it's going to be able to give

10:04

me a completely new or random looking

10:06

image every single time this gets run

10:09

now I am going to be making a follow-up

10:11

video on comfy UI going exactly through

10:14

all of these different workflows I might

10:16

actually do an entire series on that for

10:18

all these different kinds of purposes

10:20

and application but for now I just

10:22

wanted to show you exactly what comfy UI

10:24

is what you can use it for and how you

10:26

can just generate some really basic big

10:29

beginner friendly images on CY UI

10:32

interface so try it out click the link

10:34

in the description below download comfy

10:37

UI um I want you to give it a prompt and

10:40

then see if you are able to generate an

10:42

image uh in future videos I'm going to

10:45

be showing you how you can create your

10:46

own nodes from scratch as well as how

10:49

you can actually create much more

10:51

complex workflows that you can create by

10:53

yourself or you can just borrow from

10:54

other people's workflows and then start

10:56

implementing that as well within comfyi

10:59

that's it for this video hopefully it

11:01

was useful you got to understand what

11:03

what comy UI is how you can download

11:04

models and how you can create your own

11:06

sort of content uh thank you all for

11:08

tuning in I'll see you in the next one

11:10

goodbye

Interactive Summary

This video introduces Comfy UI, a powerful node-based interface for image and video generation. It covers the platform's versatility, including text-to-image, image-to-video, and fine-grained control features. The guide explains how to install the software easily, how to find and download high-quality models from sources like Civit AI, and how to set up a basic workflow to start generating content locally.

Suggested questions

5 ready-made prompts