How to install and use ComfyUI - Stable Diffusion.

Sebastian Kamph · Beginner ·🎨 Image & Video AI ·2y ago

Key Takeaways

The video demonstrates how to install and use ComfyUI, a powerful user interface for creating custom workflows with Stable Diffusion, and showcases its features and capabilities.

Full Transcript

Hello friends. In this video, I'm going to show you how to install Comfy UI and get it running. Comfy UI is an extremely powerful user interface because you have total freedom, total control to create your own workflows. I'm going to give you some advanced workflows you can work with. I'm going to show you some basics and I'm also going to set you up with an advanced extension that you're going to thank me for. By the way, do you know why chickens are so funny? because AI this is Comfy UI and this is what we will be installing today. This is also Comfy UI. Let's delve into this and go over the user interface together. All the links are going to be in the description below. And first of all, we're going to go to GitHub and find the Comfy UI. So, if you scroll down here, you have installing or you can just scroll down even further. Then you have for Windows nowadays, you don't need to get clones. You can just direct link to download. After you download that, you're going to have a seven zip file and you can use winar or you can use seven zip. I personally prefer seven zip. Then you can just either extract to wherever you want or you know just extract in the current location. It's a rather big file. So it'll take you some time. You're going to go into the folder and there's a readme here that says very important. But it basically just says that if you have a Nvidia GPU, you're going to use this BAT file, but if you don't, you're going to run by CPU, which should also be noticeably slower. And there's also some troubleshooting here, like if you get a red error in the UI, make sure you have a model checkpoint. So, we're going to download that as well. If you need to update your Comfy UI, it says so in the readme here, but you can also go you can go into the update here and just press update comfy UI. Now if you are using automatic 1111 or have another installation of stable fusion where you already have models you can go into the conf UI directory here and rename this and just remove the example here. Then you should be able to edit this with notepad and then you can set your base path to where your automatic 11-11 is. Now if you don't have that installed you can just skip that. I do have it installed so I can just like this. That will make sure after I save this that all my models that I'm using in automatic 111 will be used in comy UI as well. Now if you don't have that or any of models at all, I recommend that you download a model from Civiti. So let's do that. Let's take deliberate here for example and we're just going to download that. Then inside your models folder here. So these are all the folders where you're going to be placing your various models. Now, if you have no idea what this is, just go into checkpoints and put your regular safe tensors or CKPT files here. I just dropped my deliberate model into here. Now, you're all set to start Comfy UI. Like we talked about previously, you're just going to run NVIDIA GPU and after a few seconds, you will have Comfy UI launched. And this will be the default interface that you will see. So these are nodes. So similar to other user interfaces like automatic 11-11, the features are the same, but everything is connected by nodes. And really the power of nodes is that you can then take all the features and connect them together basically almost however you want and you can add multiple nodes and create your own workflows. So here we have our load checkpoint or our load models node. And here you can select the model that you want. Now I have a lot of models. But if you just follow this tutorial and don't have anything installed, you should have the deliberate here for example which is the model that we downloaded from Civeti. Now we have a default prompt set here which is beautiful scenery nature glass ball landscape purple galaxy ball. We have a negative prompt here. Now you can't see this is a negative prompt because it just says clip text encode prompt. Uh this can be renamed. So let's just type positive prompt here so you understand what it is what they're doing. Just rename this to negative prompt. Now you don't have to do this. This is just for your sake. And as you can see here the K sampler here we have connections going from the positive prompt here. So you can see that there's a line here and going to the positive and there's a line from negative here going to negative. So that is how the sampler understands what text is the positive prompt and what text is the negative prompt. Now you can switch these around. You can detach these and let's say you want to change this. This is the negative instead. So I just drag this to negative and then you can connect this to the positive if you would want that. So you can switch things up on the fly. Let's put them back into positive and negative. And as you can see, the model here is going straight back to the model here. So from the load checkpoint, we're sending the model line to sampler and the VAE here. And you can't see that because it goes behind, but if you can see that this red goes to this red down here, the VAE decode. So if I were to render this or Q prompt that it says here, it will start rendering similar to as it does in automatic 111 and we would have an image coming into save image here and we can uh open this image and this is just a 512x 512. So it's a small image but uh you get the point. Now in the little node down here you have the width and the height and the batch size which is how many images you will create. And in the K sampler here you have the seed which basically determines the base noise before this image is generated. This can be changed and it can be set to fixed and increment increasing one at a time or decrement decreasing one at a time for example. The number of steps that your image will go through while rendering and the CFG scale which is a mathematical equation between the positive prompt and the negative prompt and the output. But simply put, it's lower CFG means that the AI is listening less to your prompt. I'd say a value between 37ish. It's kind of good. I usually do four or five nowadays. The sampler here is basically what renders your image. Now, for stable fusion 1.5 and 2.0 models, I recommend the DPM plus 2M and then changing theuler to caris. But this is basically the super simple version of conf UI and the nodes. Now you can add more nodes. There are a lot of available. So just rightclick something. You can add a node and there are a lot of nodes to choose from. So let's say here for example this is this K sampler. So this is some of the settings that are used to render an image. If we add an advanced K sampler, you can see here that we're getting some more settings. We can have a start at step and an end at step which means we could run multiple K samplers like one running from 0 to 15 and another from 15 to 30. This is very popular in SDXL where you're running the SDXL model for 25 steps and then the SDXL refiner for the last five steps but again that's a little more advanced so that's uh for another video. Now, another fantastic feature in Comfy UI is that you can actually take an image. So, this is an image I got from a user on my Discord. And if you take this and drag that straight into Comfy UI, well, first of all, it's going to give us some errors. But that's not the point here. What you actually get is the workflow and all the nodes that we use to create this image, all the settings, everything. And that is really powerful. So you can check on other images, find their workflows and um well learn from there and continue iterating. You might be getting errors like I am and that's because you are missing nodes and in this example we're missing custom nodes. We're missing some uh CRG SDL SDXL samplers here. And there's actually something called the Comfy UI manager. So, we're going to download this. That's going to help us install custom nodes. So, we have the zip here and this is our confui folder. We're going to go into conf UI and then into custom nodes. And then we're just going to well basically extract everything. I'm just going to drag and drop that into here. And after that, you need to restart your Comfy UI. So, we're running this again. And now you should have we're still getting the errors, but don't mind that because you have the manager down here. And here you can like it says install custom nodes or install missing custom nodes. So let's press the little install missing custom nodes button here. So this is uh CRGSDXL. We're installing that. Now it says to apply the install custom node, please reinst. So we will do that again. And as you can see now, we have now gotten our new workflow here working. So we just loaded another user's image. And let's cue the prompt here and see if we get a similar result. You can see here that the green border here shows what node is active. So it's actually rendering here now. And here we have. So this is exactly the same image that I got from the user on Discord. So that's pretty cool, eh? But you get the idea of how powerful this nodebased system is. So you get a lot of control and a lot of freedom and a lot of help if you can just load another user's um workflow. And just remember to download that manager so you can install the required custom nodes. Now there are also a lot of other nodes you can check out yourself. So there's a whole list here of custom nodes available similar to the extensions tab in Automatic 111. So I'd recommend looking at the base UI, try to see what node does what. Look at the green border when you're generating an image and then find another image. Check that particular workflow and see how other users are creating their fantastic images. Now, if you want to learn more in depth, Comfy UI has a lot of examples in their GitHub. So, for example, you can see an inpainting node setup right here. So, here's an example of how you would set up a node to inp. So, in the example here, you can see see that image is a cat here and we have first loaded a checkpoint or a model. We have the positive and the negative prompt. We have the sampler and we have also added a VAE end code for inpaint and that runs from the VAE from the checkpoint here and then runs into a load image with the pixels to the image and a mask to the mask and then you're painting on top of the mask here and then that encode for impaint runs back into the latent image for the case sampler here. So you're basically adding on top of current workflow. So this is very similar to what we saw as the default here in the video when we started. And another example here is Laura for example. We have the usual workflow. We have the the checkpoint or the model. We have the positive prompt and the negative prompt and the sampler and the VAD code. And then they've added a separate Laura loader here. So instead of going from the model straight into the K sampler, it goes from the model to the Laura loader and then continues onto the K sampler. And the same goes with the clip. So there are a lot of good examples you can find on the Comfy UI GitHub. So this was a quick guide to get you started with Comfy UI. If you want to learn more about Comfy UI, check out this SDXL workflow in this video. Right. Oh, this side. As always, have a good one.

Original Description

In this ComfyUI Tutorial we'll install ComfyUI and show you how it works. See part 2 here https://youtu.be/23VkGD-4uwk ComfyUI https://github.com/comfyanonymous/ComfyUI Download a model https://civitai.com ComfyUI Manager https://civitai.com/models/71980 ComfyUI Examples https://github.com/comfyanonymous/ComfyUI_examples ComfyUI in the Cloud 20% off (Pre-installed): https://www.thinkdiffusion.com/sebastiankamph FREE ComfyUI workflow for 1.5 models here: https://www.patreon.com/posts/comfyui-1-5-86145057 FREE ComfyUI Workflow for SDXL here: https://www.patreon.com/posts/comfyui-workflow-86104919 Prompt styles for Stable diffusion here: https://www.patreon.com/posts/sebs-hilis-79649068 Support me on Patreon to get access to unique perks! https://www.patreon.com/sebastiankamph Chat with me in our community discord: https://discord.gg/sebastiankamph My Weekly AI Art Challenges https://www.youtube.com/playlist?list=PLXS4AwfYDUi7RvFm4K6lKBH_acaZQMKY4 My Stable diffusion workflow to Perfect Images https://youtu.be/4u-Ytioi3DM ControlNet tutorial and install guide https://youtu.be/vFZgPyCJflE Famous Scenes Remade by ControlNet AI https://youtu.be/wVbWZ-Ph9lE
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Sebastian Kamph · Sebastian Kamph · 0 of 60

← Previous Next →
1 How to install stable diffusion tutorial (automatic1111)
How to install stable diffusion tutorial (automatic1111)
Sebastian Kamph
2 Inpainting in Stable diffusion for beginners.
Inpainting in Stable diffusion for beginners.
Sebastian Kamph
3 OpenAI NEW Whisper is AMAZING!
OpenAI NEW Whisper is AMAZING!
Sebastian Kamph
4 Tutorial - Free AI Game assets in Stable diffusion. Episode 1: Sword
Tutorial - Free AI Game assets in Stable diffusion. Episode 1: Sword
Sebastian Kamph
5 Game assets in Stable diffusion. Ep 2: Jewelry
Game assets in Stable diffusion. Ep 2: Jewelry
Sebastian Kamph
6 Stable diffusion Animation tutorial with AUTOMATIC AUDIO SYNC. Make your own AI music video!
Stable diffusion Animation tutorial with AUTOMATIC AUDIO SYNC. Make your own AI music video!
Sebastian Kamph
7 Stable diffusion img2img tutorial.
Stable diffusion img2img tutorial.
Sebastian Kamph
8 Stable diffusion tutorial - AI Game assets. Episode 3: Treasure chest
Stable diffusion tutorial - AI Game assets. Episode 3: Treasure chest
Sebastian Kamph
9 Stable diffusion animation tutorial. Deforum ALL settings explained. Make your own AI video!
Stable diffusion animation tutorial. Deforum ALL settings explained. Make your own AI video!
Sebastian Kamph
10 Dreambooth tutorial for stable diffusion. Quick, free and easy!
Dreambooth tutorial for stable diffusion. Quick, free and easy!
Sebastian Kamph
11 Dreambooth to CKPT. NEW VERSION! Dreambooth locally on potato pc.
Dreambooth to CKPT. NEW VERSION! Dreambooth locally on potato pc.
Sebastian Kamph
12 Stable diffusion tutorial. ULTIMATE guide - everything you need to know!
Stable diffusion tutorial. ULTIMATE guide - everything you need to know!
Sebastian Kamph
13 AI music video. Neffex - Winning
AI music video. Neffex - Winning
Sebastian Kamph
14 Stable diffusion video input tutorial. How I made this music video singing animation.
Stable diffusion video input tutorial. How I made this music video singing animation.
Sebastian Kamph
15 Stable diffusion color grading tutorial. Quick trick!
Stable diffusion color grading tutorial. Quick trick!
Sebastian Kamph
16 Prompt Editing and Alternating Words in Stable Diffusion.
Prompt Editing and Alternating Words in Stable Diffusion.
Sebastian Kamph
17 Stable diffusion gui most important setting. Live render preview.
Stable diffusion gui most important setting. Live render preview.
Sebastian Kamph
18 NEW Voice2img prototype! This AI assistant is using Stable diffusion!
NEW Voice2img prototype! This AI assistant is using Stable diffusion!
Sebastian Kamph
19 Prompts and FREE ONLINE stable diffusion. OpenArt AI tutorial
Prompts and FREE ONLINE stable diffusion. OpenArt AI tutorial
Sebastian Kamph
20 Stable diffusion Halloween concept art tutorial.
Stable diffusion Halloween concept art tutorial.
Sebastian Kamph
21 Stable diffusion GTA 6 style image tutorial. Quick and EASY!
Stable diffusion GTA 6 style image tutorial. Quick and EASY!
Sebastian Kamph
22 Stable diffusion prompt tutorial. NEW PROMPT BOOK released!
Stable diffusion prompt tutorial. NEW PROMPT BOOK released!
Sebastian Kamph
23 Stable diffusion GTA 6 style image tutorial. Quick and EASY!
Stable diffusion GTA 6 style image tutorial. Quick and EASY!
Sebastian Kamph
24 How to install Deforum locally. Stable diffusion animation.
How to install Deforum locally. Stable diffusion animation.
Sebastian Kamph
25 Dreambooth in Automatic1111. Cpu only & gpu option.
Dreambooth in Automatic1111. Cpu only & gpu option.
Sebastian Kamph
26 Nvidia's NEW text to image AI eDiff-I. Will it dethrone Stable diffusion?
Nvidia's NEW text to image AI eDiff-I. Will it dethrone Stable diffusion?
Sebastian Kamph
27 NEW VR in Stable diffusion? The future is now!
NEW VR in Stable diffusion? The future is now!
Sebastian Kamph
28 Motion capture workflow implementation with Stable diffusion
Motion capture workflow implementation with Stable diffusion
Sebastian Kamph
29 Don't make these 7 mistakes in Stable diffusion.
Don't make these 7 mistakes in Stable diffusion.
Sebastian Kamph
30 Stable diffusion up to 50% faster? I'll show you.
Stable diffusion up to 50% faster? I'll show you.
Sebastian Kamph
31 Stable diffusion 2.0 Released
Stable diffusion 2.0 Released
Sebastian Kamph
32 Top 5 Stable diffusion tips for newcomers.
Top 5 Stable diffusion tips for newcomers.
Sebastian Kamph
33 3 AMAZING Stable diffusion models that will change your life!
3 AMAZING Stable diffusion models that will change your life!
Sebastian Kamph
34 Best NEW AI tool? InvokeAI tutorial for Stable diffusion.
Best NEW AI tool? InvokeAI tutorial for Stable diffusion.
Sebastian Kamph
35 Monetize your AI art on Creative Fabrica with CF Spark.
Monetize your AI art on Creative Fabrica with CF Spark.
Sebastian Kamph
36 NEW Stable diffusion 2.1 RELEASED!
NEW Stable diffusion 2.1 RELEASED!
Sebastian Kamph
37 Stable diffusion 2.1 is GREAT. At this one thing. 2.1 install tutorial.
Stable diffusion 2.1 is GREAT. At this one thing. 2.1 install tutorial.
Sebastian Kamph
38 Your face in AI images? The EASY way.
Your face in AI images? The EASY way.
Sebastian Kamph
39 3 FANTASTIC Stable diffusion models you don't know about!
3 FANTASTIC Stable diffusion models you don't know about!
Sebastian Kamph
40 Unstable diffusion JUST GOT BANNED! 😲
Unstable diffusion JUST GOT BANNED! 😲
Sebastian Kamph
41 The end of AI Art? Lawsuit against Stable diffusion
The end of AI Art? Lawsuit against Stable diffusion
Sebastian Kamph
42 Stable diffusion TIER LIST. Best GUI ranked.
Stable diffusion TIER LIST. Best GUI ranked.
Sebastian Kamph
43 Google's ChatGPT rival Bard. Is it better?
Google's ChatGPT rival Bard. Is it better?
Sebastian Kamph
44 7 Secrets in ChatGPT (Don't tell your boss!)
7 Secrets in ChatGPT (Don't tell your boss!)
Sebastian Kamph
45 How to ChatGPT? Chat GPT explained!
How to ChatGPT? Chat GPT explained!
Sebastian Kamph
46 How to ChatGPT in 20 seconds!
How to ChatGPT in 20 seconds!
Sebastian Kamph
47 Midjourney 4C Features
Midjourney 4C Features
Sebastian Kamph
48 NEW ControlNet for Stable diffusion RELEASED! THIS IS MIND BLOWING!
NEW ControlNet for Stable diffusion RELEASED! THIS IS MIND BLOWING!
Sebastian Kamph
49 Revealing my Workflow to Perfect AI Images.
Revealing my Workflow to Perfect AI Images.
Sebastian Kamph
50 LIVE Pose in Stable Diffusion's ControlNet.
LIVE Pose in Stable Diffusion's ControlNet.
Sebastian Kamph
51 Control Light in AI Images
Control Light in AI Images
Sebastian Kamph
52 Multi-ControlNet tutorial.
Multi-ControlNet tutorial.
Sebastian Kamph
53 Control Text in AI Images
Control Text in AI Images
Sebastian Kamph
54 Full AI Art Workflow. ControlNet & Stable diffusion.
Full AI Art Workflow. ControlNet & Stable diffusion.
Sebastian Kamph
55 ControlNet Guidance tutorial. Fixing hands?
ControlNet Guidance tutorial. Fixing hands?
Sebastian Kamph
56 Illuminati Model with Noise Offset & Weekly AI Art Challenge
Illuminati Model with Noise Offset & Weekly AI Art Challenge
Sebastian Kamph
57 Paint&Text2Image - MultiDiffusion Region Control.
Paint&Text2Image - MultiDiffusion Region Control.
Sebastian Kamph
58 Style2Image in ControlNet (T2I)
Style2Image in ControlNet (T2I)
Sebastian Kamph
59 Gen-1 AI Animation is WILD
Gen-1 AI Animation is WILD
Sebastian Kamph
60 Famous Scenes Remade by ControlNet AI
Famous Scenes Remade by ControlNet AI
Sebastian Kamph

This video tutorial teaches users how to install and use ComfyUI, a powerful user interface for creating custom workflows with Stable Diffusion, and demonstrates its features and capabilities for image generation.

Key Takeaways
  1. Download Comfy UI from GitHub
  2. Extract the 7-zip file
  3. Run the Comfy UI application on CPU or GPU
  4. Load models and select prompts to generate images
  5. Connect positive and negative prompts to the K sampler
  6. Adjust width, height, and batch size in the node
  7. Import an image into Comfy UI
  8. Download and install the Comfy UI manager
  9. Extract custom nodes into the Comfy UI custom nodes folder
💡 ComfyUI provides a node-based system for creating custom workflows with Stable Diffusion, allowing users to design and connect nodes, load and edit workflows, and generate images with high degree of control and flexibility.

Related Reads

📰
I Put Google’s Squoosh Codecs in the Browser — and Cut My Image Bill Before the Upload Even…
Learn how to use Google's Squoosh codecs in the browser to compress images before upload and reduce costs
Medium · Programming
📰
I Put Google’s Squoosh Codecs in the Browser — and Cut My Image Bill Before the Upload Even…
Learn how to use Google's Squoosh codecs in the browser to compress images before upload, reducing costs and improving performance
Medium · JavaScript
📰
Which AI tools can generate ready-to-use 3D character models for games, animation, or 3D printing?
Learn about AI tools that generate ready-to-use 3D character models for games, animation, or 3D printing and how to evaluate them for different use cases
Reddit r/artificial
📰
A Practical QA Pipeline for Real Estate Image Deliveries
Learn to build a practical QA pipeline for real estate image deliveries to ensure error-free and efficient file handling
Dev.to · Eric PixelShouters
Up next
Make AI AVATARS with your PHONE 🤫🤩 (Step-by-Step) #ai #aiavatar #aivideo
Raj Photo Editing and Much More
Watch →