ComfyUI - Hands are finally FIXED! This solution works with all models!
Фильм және анимация
Hands are finally fixed! This solution will work about 90% of the time using ComfyUI and is easy to add to any workflow regardless of the model or LoRA you might be using. This is utilizing the MeshGraphromer Hand Refiner, which is part of the controlnet preprocessors you get when you install that custom node suite. We can use the output of this node as well as the mask to help guide correction in any image. I also show some of the issues I ran into while working with this solution.
#comfyui #stablediffusion
Gigabyte 17X Laptop is doing the inference today! Grab one here:
amzn.to/3thtfpR
You can grab the controlnet from here, or use the manager:
github.com/Fannovel16/comfyui...
Interested in the finished graph and in supporting the channel as a sponsor? I will post this workflow (along with all of the previous graphs) over in the community area of KZread.
/ @sedetweiler
Пікірлер: 200
So cool that this works! Love the ingenuity that it must have taken to figure this all out.
@sedetweiler
4 ай бұрын
It was a bit of a pain to watch if you check out the live stream from last Saturday. That seed was the major issue.
Thanks for all your videos. I was a little lost with all those nodes versions but, now, I'm starting to understand better how to use Comfyui
Awesome man, trying this now, your tutorials are great and easy to follow. A godsend!
@sedetweiler
4 ай бұрын
Glad I could help!
Hi That is very cool,and works well for me. Once again your explanations are clear and very simple to follow. As an old guy who learns best by reading these are great.
@sedetweiler
4 ай бұрын
Great to hear!
The best video I have seen so far. Very clear and it gets to the point. Nothing to add. Thanks
very clear and well explained, many thanks for sharing!
Thank you for all the useful information!☺
Very nice tutorial. Looks like compositing^^ so as a comp-artist, i love this workflow :)
Hi Scott! First of all I want to congrats you for yours amazing tutorials. Thank you!! Could you please create another version of this workflow where instead use prompt to create an image we will upload an image?
Nice follow up, thanks Scott
@sedetweiler
4 ай бұрын
Any time!
thank you! i'm getting great results using this...
This is great. Thank you for making it so clear and simple. Would you happen to have any videos on maintaining consistency of characters across multiple renders? Many situations require more than just one shot of a character but I find consistency almost impossible to achieve just by text alone.
Bold choice, spending 5 minutes setting up nodes you explicitly tell us not to do, only to have those nodes be required steps in the tutorial.
Wonderful! Thanks for sharing! 👍
@sedetweiler
4 ай бұрын
Thank you! Cheers!
So grateful I 'm starting to understand how things flow in Comfy UI without feeling too lost. It sounded like Chinese to me a couple of months ago. Now it's like German. Still rough but somehow familiar. 😆 Thank you for this!
@sedetweiler
4 ай бұрын
Glad it was helpful!
@furiousnotch7914
4 ай бұрын
@@sedetweiler I just wanted to know, what's the minimum system requirements for running comfyUi smoothly, without any problem? Appreciate you 🙂
@sedetweiler
4 ай бұрын
Probably 4gb of vram.
@furiousnotch7914
4 ай бұрын
@@sedetweiler I've tried with 4GB VRAM and, 16GB RAM.. it takes 2:16 hours to generate and upscale 1 image. RTX 4060 8GB VRAM with 16GB RAM ✌️or RTX 3060 12GB VRAM with 16GB RAM✌️or RTX 3060 8GB VRAM with 16GB VRAM✌️.... (I have i7 12th gen) Which one do you prefer between these three? Don't know which one would be the best for faster image generation and upscaling.... Thanks for your earlier response 🙂
@Renzsu
4 ай бұрын
@@furiousnotch7914 VRAM takes priority, the more the better. Then think about the speed of the card. The new 4070 Super seems to be a happy middle ground of the latest generation. Smaller budget? 4060 Ti 16 Gb. Bigger budget? Think 4080 Super or 4090. Of the 30 series, I would take the fastest one with at least 16 Gb. But honestly, I would save up a bit more and go straight to 40 series.
Thank you for making a tutorial by building nodes manually, it really helps clarify each function of the nodes, unlike other channels which present workflows with ready-made nodes
Thanks for the tutorial!
@sedetweiler
4 ай бұрын
You are welcome! Thanks for taking the time to leave a comment. Cheers!
Thank you very much for this!
@sedetweiler
4 ай бұрын
You're very welcome!
super specific use case, when the subjects hands are literally like the image your using, if not the depth maps it comes up with a straight trash.
Thank you, that works perfectly!
@sedetweiler
3 ай бұрын
Glad it helped!
Hi! Thank you so much! I just became a sponsor! Your videos are so useful as I'm trying to figure out solutions to these types of issues and I was wondering if you had any ideas for how to fix exposed feet as these often are in the same place as hands on initial generation and I haven't seen any similar depth rec or masking for this particular use case. Would love to hear your thoughts!
@sedetweiler
4 ай бұрын
I have not seen much of a call for that, but civit probably has some for models and you could just use a different mask creation method and this same solution
@sedetweiler
4 ай бұрын
Thank you for the sub!
😯so simple. I love ComfyUI
@sedetweiler
4 ай бұрын
It really is, for such a terrible issue. Cheers!
Amazing video! Learnt so much from this Scott! A new random question arises, what's the name of the plugin that gives you info on which node is executed at runtime on the top left? :)
@sedetweiler
4 ай бұрын
That is from the PythonGoSsssss pack.
Thanks for this video. Have you tried to see if this works with SDXL workflows?
Great video, thanks for making it! Have you tried it with a person holding something? I’m wondering how well it works if part of the hand is meant to be not visible 🤔
@sedetweiler
4 ай бұрын
Not sure, but it is worth trying!
Thanks for your video. You can use the global seed if you set the seed in an extra primitive node and fix it
@sedetweiler
2 ай бұрын
Cool, thanks
now that's pretty cool!
@sedetweiler
4 ай бұрын
I am loving it!
Great vid, thanks Scott. Guys, if your using A1111.. It takes just two clicks to enable Hand Refiner in Controlnet and fix hands lol But the noodles are much more fun, if you have time to kill.
@sedetweiler
4 ай бұрын
The difference for me is I know how it works. with much of A1111 you check a box and the magic happens. With Comfy you actually control and learn how it all goes together. It is the difference from just eating in a restaurant and knowing how to cook as well.
@traugdor
4 ай бұрын
The Hand Refiner in ControlNet isn't as powerful as the fine control you have in ComfyUI. One-button solutions always have issues. I've used both and always get better results with ComfyUI.
Good job!
@sedetweiler
4 ай бұрын
Thank you! Cheers!
I've noticed that this functions well with open hands but not as effectively with hands in a relaxed, close-to-the-body position. Do you have any insights on fine-tuning it to address these scenarios? Thanks a bunch for the excellent tutorials!
@goodie2shoes
2 ай бұрын
same here. it's not the solution I was hoping for. It erh.. kinda sucks
It cannot be completely eradicated. Only post processing with pts AI can help, and sometimes when the hand is quite stable , it may provide an additional glove or piece of steel on the hand,
Thank you! Can you share how to do this with moving hands in a video?
@b4ngo540
4 ай бұрын
use the "image batch to image list" node as input for this hand fixer
Well, that works fine with big hands but not very good with like 3-4 characters in the picture and little hands, closed hands, specific poses. Somewhat the MeshGrapher gives bad results. But it's definitely this path to use for correcting details without altering too much of the original seed. I'm impressed how that works.
Great stuff! Do you know if there’s a community node for Invoke for this? I’m not sure how interchangeable or inter-compatible the nodes are.
@sedetweiler
4 ай бұрын
I don't know. I love the Invoke project for a lot of reasons, but I just have not used it lately as I live in comfy most of the day.
Please try different hand poses you will know it never fix hand. When the ControlNet depth preprocessor gives you bad depth hand, you will still get bad hand. Even it gives you good preprocessed depth hand, for different hand poses it will still generate flip, or reverse bad hand. I am so sorry to tell the true.
@sedetweiler
4 ай бұрын
It isn't perfect, but again this works in 90% of the situations where we get bad hands.
@DanielWoj
2 ай бұрын
I would say that it improves 50% in the photo-like images. But maybe 10-20% in painting or some low CFG styles.
Thanks for this video
@sedetweiler
4 ай бұрын
Most welcome
One more thing that you can do is send the final image to fooocus image prompt > inpaint>improve face, hands (2nd option), paint both hands, and use the quick prompt called detailed hand. Edit: This is AFTER you have refined the hands using the above tutorial.
@sedetweiler
4 ай бұрын
Thanks for sharing!
@b4ngo540
4 ай бұрын
@@sedetweiler this sounds interesting, if you tested this and you think it's effective, we would love to see a part 2 of this video doing these extra steps for a perfect result
Hey Scott, really suprised you're not ahead of the curve with somethging about a SD3 howto.
ty for sharing !
@sedetweiler
4 ай бұрын
My pleasure!
Thank you so much for another amazing tutorial! I’m trying to figure out what the best way is to combine this with the refiner. Would I go through both the base and the refiner for the full image first, and then do base and refiner again for only the hands? I tried something like that, but the results are not that great as the hands don’t really match the visual quality of the rest of the picture.
@sedetweiler
4 ай бұрын
I would refine at the very end.
@alexanderschlosser7987
4 ай бұрын
@@sedetweiler Refine everything together you mean? How would you do that if you want to do 80% of the processing in the base and 20% in the refiner? Fix the hands even with some noise of the base left?
@sedetweiler
4 ай бұрын
yup. that is what I would do. Since the position of the fingers is probably already determined by that time, additional refinement isn't going to undo that.
@alexanderschlosser7987
4 ай бұрын
Thank you, I really appreciate your input!
hi. Great content. Thank you . where is the workflow json for the video? thank you
@sedetweiler
2 ай бұрын
They are in the community tab here on KZread. That is the only method they give us for communication, unfortunately. Thank you for supporting the channel!
Scott great stuff! I ran into some snags applying this to a workflow with 2 other controlnets ( Depth + Openpose) Im not using Advanced contronet for the other 2 and 1 Ksampler. Do I need 2 Ksamplers like your video?
@sedetweiler
4 ай бұрын
The first one creates the flawed image, and the graphformer can then spot the hands and the second sampler fixes them. So, I am using 2 samplers for that reason. Because this works so well with just depth, I am not throwing all the controlnets at it, as it just works as is quite often.
@scottownbey9340
4 ай бұрын
I got my workflow to work with one KSampler using 1.5 model ( Im using Controlnet for the body (DWopenpose + Depth) and now MeshGraphomer) and got to that point where i generated great hands but the image totally changed , so I added the Set Latent noise mask with samples going into a empty latent image (replacing the one from the KSampler) and the image is totally gone. So frustrating as i was almost there.. Any guidance would be appreciated
@scottownbey9340
4 ай бұрын
Got it working! thanks@@sedetweiler
@sedetweiler
4 ай бұрын
awesome! it sounded like you were SO close! that is great news!
@RhapsHayden
17 күн бұрын
@@scottownbey9340did you end up adding another ksampler or staying with one?
all models! nice
@sedetweiler
4 ай бұрын
cheers!
HUGE THANKS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@sedetweiler
4 ай бұрын
sure! happy Friday!
Hi Scott, thanks for the update. I'm also trying this with img2img but I can't get it to work propperly. Maybe an idea for another video?
@sedetweiler
4 ай бұрын
Sure! that should be as simple as replacing the empty latent with a VAE Encoded image and use the samples off of that.
@BrunoBissig
4 ай бұрын
Hi Scott, now it works. I think my input image was not the right choice for that. I changed it now to the girl in your video with six fingers as input, and now its fixed and i get five fingers. Thanks! @@sedetweiler
Is there a way to split the image to background and person, fix the hands and then recombine? Maybe also model a the pose (body and hands), so any animation of that can be done very precise and consistent?
I got to the point where the Meshgraphormer is added to the Ui , however all it generates is a black box. I installed the comfyui manager and such. Are there some videos I should go back and watch before trying the methods in this video?
I would like to try it, but I can't see the workflow attached here or in the community tab. Although I'm not sure if it will work due to hardware limitations (rx580) and software differences (sd 1.5, torch, nodes).
i have some problems, i dont seem to find out why the hands are smaller in the mask and when impaiting its like they render smaller
I made it to 4:30 and then nothing shows up in Controlnet Models, "undefined". I went to manager > install custom nodes > Fannovel16 which says "NOTE: Please refrain from using the controlnet preprocessor alongside this installation, as it may lead to conflicts and prevent proper recognition." Not sure how to proceed. Is my ComfyUI installation bad?
@LGCYBeats
4 ай бұрын
Same here, not sure what im doing wrong
Hello! Is there a way to integrate two json files with different functions in comfyui? One is to do the inpaint function, and the other is to maintain a consistent character through faceid, but I'm having trouble linking the two.
Thanks man
@sedetweiler
4 ай бұрын
Any time
@sedetweiler
4 ай бұрын
yup!
Do you have any solution if im getting "new(): expected key in DispatchKeySet(CPU, CUDA, HIP, XLA, MPS, IPU, XPU, HPU, Lazy, Meta) but got: PrivateUse1" error while using MeshGraphormer? PS. Greate video, i just would make it run on my amd pc xD
I use to enjoy your mid journey tutorials and workflow. Can I ask why you stopped? Now that the models are even more powerful, i wish we can turn to expert like you.
@sedetweiler
4 ай бұрын
I guess I just need to make some. I have a few ideas on them they I have not seen covered. Thank you for the suggestion!
amazing! i couldn't get it to work though, it won't detect the hands (the "display mask" box is just a black square every time, and i can't work out why). still.. something to work on :)
Can you next time go more on SD3 Creative upscaler? IK don't find much info on it. So you don't use it with a 2k image? it sats 1000 or less? I'm trying to figure out if it is worth it at 25 cents per upscale. Thanks!
This may be a dumb question but does this process also work for cartoon/anime models?
How do you make it so you don't see the 2 squares in your end image where it repainted the hands? can even see them in your youtube video.
does it also work on hands which dont wave directly at the camera or for cartoon models ? i dont think so
Should I run Meshgraphormer before or after ReActor?
How do you get this level of control though with colab notebooks and python code?
Hi thank you for this idea, but i had problem. i generated 3 persons but the refiner only got 1 person hand left and right, the second and third person's hands are not detected. So i only fixed one person hand. What is the problem here?
For some reason the hands from the picture I am trying this on don't get detected. I guess this method only works for hands that are already clear enough they are hands.
does that work for all kind of hand positions? e.g. hands grabbing a handle, hands tipping on a keyboard or piano, hands clapping ....
Can you share a downloadable workflow for this
It doesn't work with every model either. Graphormer has its problems with hands that originate from 2D, 2.5D models. Apparently the depth information that Graphormer needs to recognise that they are fingers is missing.
@sedetweiler
4 ай бұрын
So far I have had great luck with it, even using non-AI images as starting points. I think it is a pretty flexible tool.
This only seems to detect 1 set of hands even when there's multiple people and it doesn't detect parts of fingers or hands that are occluded. And there is very often noticeable artifacts around the bounding boxes themselves even if the hands are done well. Any ideas how to refine this?
I can use it normally under the SD1.5 model, but I always get an error when I use the SDXL model.
Can this be used with a image as input?
I have installed the ControlNet but that node not appears to me
Is this possible to be done with other WebUi, like Forge WebUI?
i clicked update all in the manager, now my comfy doesn't work anymore. i get this error: raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled any ideas how to solve this? everything worked fine before the update
The control net model doesn't work with an amd setup, save the time homies.
Funny how I have the proper controlnet installed but I don´t have this specific one for hands.... What am I doing wrong? thx.
@sedetweiler
4 ай бұрын
check that you are up-to-date and restarted.
can this handle an image of a couple holding hands? Thanks. its impossible in Krita and Firefly I tried it already..
Is there anything similar in the works for FEET?!
I am getting an error "Error occurred when executing KSampler: mat1 and mat2 shapes cannot be multiplied (308x2048 and 768x320)" Does anyone know what this is? am running the inpaint depth hand control model that is recommended on the github Seems to be an error with the Ksample
I have two GPU's how do make sure comfyui is using the most powerful of the two nvidea cards.
I can't figure out how to make this work. Even if the MeshGraphormer produces good results and the hands look nice in the depth map, the hands in the final image often look worse than in the image before MeshGraphormer. It seems that the second KSampler does mess up the hands again. Is there anything to avoid this?
@sedetweiler
Ай бұрын
you can always use a different model for the 2nd sampler. Be sure you use a different seed! That was one I tripped over.
@chucklesb
Ай бұрын
@@sedetweiler wish this helped. I'm using the same model you are in the video and it just makes it worse.
Hi Scott, where is the wf please?
@sedetweiler
4 ай бұрын
wf? sorry, not sure I follow.
@___x__x_r___xa__x_____f______
4 ай бұрын
@@sedetweiler that’s ok, I tedter your workflow for graphormer
my controlnet model list is empity snd I can't find where to download them
@sedetweiler
4 ай бұрын
If you go to the git for any node suite by clicking on the name in the manager, it will tell you what additional files or models are needed and where to get them.
@Catapumblamblam
4 ай бұрын
@@sedetweiler @ 4:20 when you are selecting your model in the controlnet list, you are full of models, my list is empity!
@Catapumblamblam
4 ай бұрын
@@sedetweiler and, another question: Is it working on text video?
@gelisob
3 ай бұрын
same, "load controlnet model" box list empty. Did get mesh things when installing fannovel16 pack but that list is empty.. continuing to loo for answer.
The meshgraphormer puts put only a black Image. I have everything installed and updated. Any help?
@sedetweiler
4 ай бұрын
Hmm, is it not seeing the hands at all? If they are really messed up, it will not see them. I would just check the mask to see if it found them.
@beatemero6718
4 ай бұрын
@@sedetweiler i tested it again with a simple prompt of a waving woman, using empty latent Image and a resolution of 832x1216 (using a custom sdxl merge) and it works fine. The First Time I tried I did img2img of a stylized toon character which output hands already look quite alright. However the meshgraphormer refuses to recognize the hands of said character.
@sedetweiler
4 ай бұрын
It might not be good with cartoons. Not sure, I don't tend to go for that type of artwork personally.
@beatemero6718
4 ай бұрын
@@sedetweiler yeah, thats what I expected and it seems to be the case. It doesnt properly recognize cartoony proportions, even though in my opinion cartoony hands come out better in general, due to the fact that they are bigger and give stable diffusion more space to generate them a bit better.
@dflfd
4 ай бұрын
@@beatemero6718 maybe you could try DWPose?
Hi Scott
@sedetweiler
4 ай бұрын
hi there!
can you pastebin the workflow?
@sedetweiler
4 ай бұрын
It is in the community area on youtube for channel sponsors.
@alexlovsky7217
4 ай бұрын
@@sedetweiler ugh
Hi Scott, any new videos? Theres some new stuff we need to learn
meshgraph hand refiner not work ...
HI Scott. IS it possible to use ComfyUI to do inpainting on the pre-existing image?
make a video about upscale
@sedetweiler
4 ай бұрын
I did a few of those. something specific you want to see?
@VigneshoViyan
4 ай бұрын
@@sedetweiler Like magnificAi, upscale with extra details
Not trying to sound facetious here but surely it would be far less of a ballache just to photoshop extra fingers out, far quicker 🤷♂️
@DaemonJax
3 ай бұрын
Yeah, those original image hands were already pretty great -- I'd just fix it in photoshop. I guess this method is fine for people with ZERO artistic ability.
Thx sir!
Thanks, this video made me realize SD isn't for me. This is WAY too complicated. It's no wonder now why most AI art at high res looks like crap if you look closely at the details.
anyone compared this to handdetailer?
@sedetweiler
4 ай бұрын
no idea. this seems to be super simple to deploy and works on anything I have thrown at it.
I generated woman face that i very like. Is any way to apply this face to rest of images which i will generate? Reactor or other face replace nodes makes face very bluury when image is bigger than 512x512.
@dflfd
4 ай бұрын
use IP adapter
@goliat2606
4 ай бұрын
@@dflfd I tried IPAdapter too and results are similar. The face is either blurry or much different than source face :(.
Try GroundingDinoSam
Does not work well at all, sorry.
@crazyaz7161
7 күн бұрын
What do you mean? It fixes hands like 80% of the time.
e ainda não ficou bom ..
Great videos, but those live streams in the playlist exclusive to members are really annoying. I love the way you explain things, but those really kill the vibe for me. More than half of the playlist are those live streams and almost every video includes "if you watched the last live stream...". I wish I did, but I don't have the money. Thanks for what you do, but I'm going to look elsewhere.
it's not a fix, that's a hack
@sedetweiler
4 ай бұрын
True. We are working around a weakness. But as the models get better, we can probably stop needing to rely on things like this.
@VanillaIceCoffee
4 ай бұрын
@@sedetweiler unless it gets heavily trained on high definition hands it's not gonna get any better, we need a bit larger encoding (at a cost) and decoder trained on hands, too much details getting lost.
After switching to ComfyUI, I realized just how ugly and clunky A1111 is :)
@sedetweiler
4 ай бұрын
It is also pretty restrictive. Yea, people have the noodles, but it is actually cleaner in the long run as you know exactly what is going on.
Not a particularly useful workflow. Only fixes the most simplistic hand deformations, such as open hand poses as in this example. Any form of gesture complexity and it doesn't work (ex., deformed hand holding onto a sword hilt or similar cases of occlusion such as a subject placing their left hand on top of their right).