LLM in ComfyUI Tutorial

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

Key Takeaways

This video teaches how to use LLM in ComfyUI for image AI tasks

Full Transcript

today we're going to be looking at this workflow we have generated a cyber Punk woman here and the specifically the nodes that we are looking at are these so we have Sarge llm node we have the sarge output node here that shows us the output and what's happening here is that we have input a prompt here so I have input cyberpunk woman that's all I've written I'm loading a model here the mistol llm model and then we have instructions down here so you have generate a prompt from prompt which is this right so after that the llm generates this so we have a grest cyber Punk scene unfolds with a fierce female protagonist at its Center the image features a striking woman dressed in Sleek futuristic attire you get the point right so he takes our text cyberpunk woman and gives us an a long prompt which is what flux loves so specifically for flux that actually is trained on Long prompts like this this is very very powerful so you can just and something you know Fantasy Island and if you cue this up oh and if you don't recognize the user interface here uh this is actually the new comy user interface so if you want to see how that works you can just go into the settings down here and here in the menu you can select uh top or bottom here disabl is the old user interface so instead of our Fantasy Island prompt now we got a breathtaking Fantasy Island emerges as a vibrant and Lush setting in this digital illustration yada yada y you can see all the text here I'm not going to waste your time by reading it all and as you can see this is our image so this is super super powerful what we have done is we have connected from the generated to a clip text encoder so usually it would look something like this right so so this is an old um prompt box so if you want to build this yourself you just take one of these and you you convert widget to input convert text to input and then you can drag a text input into that box there are actually three nodes that you can use so let's sort this by alphabetical let's go check sge llm and then you actually have an advanced nodes options as well so you can drag that over there if you want to change some of this but let's get this installed on your machines so I put together a short little guide up on my patreon it's available for everyone right now there's more content over there for paid subscribers so this link is going to be in the description uh the workflow that we saw this one basically without all the mess I made is going to be available for download so just check the link this one down here and what you need to do is go into your manager so let's do all of this right now yeah so here we have a version without the notes installed we're going into the manager up here you can either select install missing customes if you are dragging and dropping the workflow or you can go into the custom nodes manager and actually search for search llm and here you have it install that there are multiple versions of llm nodes the reason I like this one is it's uh simplified it's easy to use doesn't have a lot of feature creep and well I know the developer a little bit and he's a great guy you also need to uh restart your comy and we also need to download this model right here so this is a hugging face link if you click this you'll be able to download that and then you need to create the directory inside confy UI models and this is the directory lmore ggf so it would look something like this you would go into your confy folder models llm uncore GG UF you need to create this directory so make sure you do that and then drop that model in there and that's basically it then you're done and now if you have restarted you need to actually press refresh so either control r or press this little button up here depending on your browser and now your SAR llm should load we can test this out quickly you can see that the model this is loaded here if it is not make sure it's in the folder press refresh which is this button here or in the older interface it was in this little menu on the side it just said refresh so it depends on which version you're at so let's try mercenary cat we're generating this as it's coming in live now we can see we have this a Gran action-packed illustration presents a menacing feline character who m is the essence of a ruthless mercenary y y y and here we have our little mercenary Cat made with the flux and we're actually using the N4 model it's up to you when you want to use but bear in mind this LM model is going to be hugging a little bit extra of your vram so that can be an issue for people now what you can do if you are testing this and you are getting out of memory issues sometimes you can use uh like a EAS Flex model you can use nf4 you can test one of the lighter Q versions but if that's still not enough I recommend that you go try a Cloud solution you have think diffusion for example just launch app uh we have comy here we actually have if you go to the beta version you actually have an ultra 48 GB of vram uh but from 16 gigs to 24 to 48 so that should cover most needs I mean I'm only on 20 4 gigs so that is no issue at all so that should cover most people from local installation to Cloud solution for the people that either don't want to have a local install or can't because of the ram requirements so I think this is super cool to be honest the cool thing about this is this isn't only you know final thing right you can actually change the instructions so I mean you don't have to have a prompt here you can just say generate a random image prompt and if we do this and we press Q you can see here now we got just a completely random prompt so Whimsical DREAM Act landscape unfolds as an ethereal Sunset bathes the scene in a warm Golden Light so let's see the subject is a group of Fantastical creatures among clouds and wild flowers let's see what that looks like so here we have a completely random prompt and we can just go back and we can change um this to whatever we want because this is an llm right so this can take any input write me a short novel about a parrot and if we do that it's going to write me a short novel about a parrot now it has a max tokens here so this is what you can change for the length here we got the title feather taals the Enigma par so I think in our image here we're actually going to get a title but uh let's see about that so you can treat this as your own little chat jpt now we didn't get a title actually in the image but we got a little parot here so that was unlucky but uh it is what it is let's type here octopus with socks title above reads sock socktopus let's see if we can uh get something out of that in an imaginative and whimsicle illustration titled socktopus an octopus is depicted sporting colorful quirky socks so let's see if we get that or it doesn't seem like we are getting that so let's see if we can generate the second time so we got an octopus that is wearing well sort of socks I don't know did that work I don't know what socks on octopus octopi would look like anyway um want to take a moment and remind you guys that we have in my Discord or our Discord the community Discord the weekly challenge that's been going on for 86 weeks now so we are currently on the 87th challenge and these are some of the winners from previous challenges if you want to take part in the challenge just go into the Discord all the links are going to be in somewhere on the channel description or the video description too I guess and every week there is a new challenge and a new winner and let's check out this week so we have this week's challenge is the humanitarianism art and media contest so it runs currently from Wednesday to Wednesday so go check that out it's aailable in Discord and the link in the description as always thanks for watching I'll see you in the next one

Original Description

Guide: https://www.patreon.com/posts/llm-in-comfy-110867830 Chat with me in our community discord: https://discord.gg/dFB7zuXyFY Stable Diffusion for Beginners Playlist https://www.youtube.com/playlist?list=PLXS4AwfYDUi5sbsxZmDQWxOQTml9Uqyd2 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

Related AI Lessons

FREE AI Sin City Photo Generator — Turn Any Photo Into High-Contrast Noir Art (2026)
Transform any photo into a Sin City-inspired high-contrast noir art using a free AI generator
Dev.to AI
Google makes Gemini’s personalized image generation free for all US users
Google's Gemini personalized image generation is now free for all US users, allowing them to generate images informed by their Google data
The Next Web AI
Gemini’s personalized AI image generation is now free for U.S. users
Gemini's AI image generation is now free for U.S. users, allowing for personalized images based on user interests and data
TechCrunch AI
WebP's Compression Secret: How a 1MB PNG Becomes a 200KB WebP
Learn how WebP compresses images more efficiently than PNG and JPEG, and why it matters for web development
Dev.to · swift king
Up next
OpenAI Kills Sora then Descends into Chaos
ColdFusion
Watch →