Init
Load image and make prompt here.
Box controls
If you enable box mask, you will have a box around the segmented character. You can use the sliders to adjust the box's X and Y position, Width and Height.
Resize cropped region
You can set a total megapixel for the cropped region the sampler is going to work with. You can disable resizing by setting the Resize node to False.
Expand mask
You can set manual grow to the segmented region.
Use reference latent
Use the reference latent node from old Flux / image edit workflows. It works well sometimes depending on the model / light LoRA / and cropped are used, sometimes it produces worse results. Experiment with it.
Blur
You can grow the masked are with blur, much like feather. It can help keeping the borders of the changes more consistent, I recommend using at least some blur.
Loader nodes
Load the models, CLIP and VAE.
Prompt and threshold
This is where you set what to segment (eg. Character, girl, car), higher threshold means higher confidence of the segmented region.
LoRA nodes
Decide to use light LoRA or not. Set the light LoRA and add addition ones if you want.
Description
Added fool-proofing and additional masking controls.
Includes a collapsed (simple) version
FAQ
Comments (27)
installed chflame163 / ComfyUI_LayerStyle but it only has CropByMask V2, where did you get V3 from please?
From the manager I installed ComfyUI_LayerStyle nightly version, 1.0.90.
It has CropByMaskV3 listed in the nodes list. If you use ComfyUI manager, try updating to nightly from there.
I'll be uploading an updated version using v2, that also fixes zooming problems as well as offset issues.
For now you can simply swap the nodes of v3 to v2
If have v2 but don't v3. You need to install by download(zip) from GitHub and replace it with file from GitHub.
Could you create another workflow that doesn’t use SAM2? I’d like to use YOLO instead. thanks, you.
Hello!
I'll be uploading one today or tomorrow with another segmenter
@yorgash Thank you! I'm trying to fix this problem with the SAM2 node. I'm looking forward to the new version. https://postimg.cc/RWVTMY3s
Wow. that's amazing. seamless result. Thanks for this workflow
why is every body on this damn website using unique node packs, i have like 9999 custom nodes and endless conflicts cant people just use simple nodes. People be using custom node for an image resize or lora loading which had its last git update 5 years ago
I was trying to only use the most popular and regularly updated nodes the next update, and while I have eliminated some old obscure ones, but still have a good number of custom nodes.
Some very basic nodes are missing from comfy sadly, especially if you want to make proofing as well.
You absolutley can upload content using only standard nodes to solve your problem.
@OMW2FYBR374 Yeah, please show me that, and I'll send you $5000 instantly. WTF
Amazing workflow! Simply amazing! I'm trying to use it without the lightning Lora, but i can't find the node to increase the steps. Could you please help?
hey buddy, there is a 4 step and 8 step lora
This looks like an awesome workflow but unfortunately it is impossible for the average John and Jane to find the missing does. Thank you for sharing regardless.
Can't find SimpleMathSlider+ in the custom nodes :'( Anybody can help ?
Switch the version of Comfyui_essentials to the nightly version in the node manager, it's there somehow :)
Hello! Trying this out has been on my todo list for quite some time. Thank you for creating this VERY extensive inpainting workflow and sharing it. I have done my best to set this up, but have hit a wall if you don't mind helping me out.
When I run the workflow I get a "Cannot execute because node ImageTransformResizeAbsolute does not exist.: Node ID '#69'"
Any pointers would be appreciated, thank you!
I don't understand how the masking works. For example, I want to make the person's eyes close, so I mask the eyes. When I run the workflow, however, it completely ignores my mask, and makes a mask around the entire character. This ends up making so many changes I didn't want. I just needed to target the eyes, since all the details in the image are perfect otherwise.
Am I understanding this workflow incorrectly? What is it supposed to do with my mask? Does it ignore it by design? Someone might say to just use Qwen Image and ControlNet, but the point is that the eyes should be the same as the current eyes, which makes Qwen Edit perfect for the task. I just need to tell it what to leave off-limits to change.
Workflow is fantastic - though it seems to have broken for me in the latest updates. One of the mask nodes can't be found anymore.
Simple, not. Hard to install missing nodes that cant be installed. Looks good but wasnt able to test it due to some nodes cant be installed.
Right now with the current Version is the "Preview_Mask" broken has someone this problem also?
I updated everything, but it gets me an broken github link when i try to update the package.
and also: CropByMaskV3.crop_by_mask_v3() got an unexpected keyword argument 'mask'
Bruh, in all ur workflows u dont give us a gguf loader, this is just for full bf16 file, which majority of us cant even run..
I'm sorry, I had problem with GGUF at the time, but all it should take is replacing "Load diffusion model" node with GGUF loader, if you use GGUF CLIP, then that too.
@yorgash If only mans knew how to do that..
@KoujiAI Here you go, this should be the same but GGUF dragged there:
https://www.dropbox.com/scl/fi/i3t4zyz6vk104252mr7cr/Collapsed-QWEN-segment-inpaint-gguf.zip?rlkey=w55y86glytou1ddz6c8lc1afe&st=e6rzlcsv&dl=0
@yorgash Cant get it to work, it wont install: Installation Error: Installation failed: KayTool@unknown
And ive'got 4 conflicts with comfyui_essentials, which also wont fix them selves..





