BMAB Detail Anything
The detect-crop-resample-paste loop, on any mask you give it
- bind
- masks
- image
- lora
- BMAB bind
- image
If you've used Impact Pack's FaceDetailer, or ADetailer back on Automatic1111, you already understand the core trick this node runs - it's the same idea, generalized to any region you can mask rather than just faces.
What it is and why you'd reach for it
Small regions in a large image get mangled. A face that's 80x80 pixels of a 1024x1024 frame only gets 80x80 pixels' worth of the model's attention, and it shows - melted eyes, smudged hands, whatever detail you actually cared about. The fix that the whole detailer-node category exists for is: crop that region out, run a fresh sampling pass on it at proper resolution, then paste the result back into the full image. BMAB Detail Anything is BMAB's version of that loop.
The difference from a dedicated face detailer is right there in the name - this node doesn't do its own detection. You hand it a mask, from wherever you got it: BMAB's own BMAB Detect And Mask node, a manually painted mask, a SAM segmentation, anything. That makes it genuinely general-purpose rather than face-specific - hands, an object, a section of background, whatever your mask covers gets the detail pass. The trade-off is that you're responsible for producing a decent mask; this node just does the crop-resample-paste work once it has one.
How it works
For each masked region: pad it out (so the crop has some breathing room around the actual mask edges), optionally dilate the mask itself (grow it slightly so the resample doesn't produce a visible seam right at the mask boundary), crop to a working resolution, run a KSampler-style pass at that resolution with your specified steps/CFG/sampler/scheduler/denoise, then paste the refined result back into the original image. If there are multiple disconnected regions in your mask, limit caps how many of them get processed.
Inputs and outputs
- bind (required) - the BMAB bind carrying model/clip/vae/conditioning to sample with.
- masks (required, MASK) - the region(s) to detail. This node does not detect anything itself.
- steps / cfg_scale / sampler_name / scheduler / denoise - standard sampler controls for the detail pass.
sampler_nameandschedulerboth offer a "Use same sampler/scheduler" option to inherit your first pass's settings. Denoise defaults to 0.4, which is the same range you'd use for any hires-fix-style refinement - high enough to actually add detail, low enough not to redraw the region from scratch. - padding (default 32, 8–128) - extra margin cropped around the mask before resampling.
- dilation (default 4, 4–32) - how much to grow the mask itself before applying it.
- width / height (default 512, range 256–2048) - the working resolution for the detail pass.
- limit (default 1, 0–20) - maximum number of separate regions to process in one run.
- Optional image - feed a specific image directly rather than relying on the bind's.
- Optional lora (BMAB lora) - swap in a different LoRA just for this detail pass, wired from BMAB's own LoRA-loading node.
Outputs: a BMAB bind and the resulting image.
Installing it
Through ComfyUI Manager: search comfyui_bmab, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/portu-sim/comfyui_bmab.git
cd comfyui_bmab
pip install -r requirements.txt
This node doesn't itself need comfyui_controlnet_aux or ComfyUI_IPAdapter_plus - but whatever produces your mask might. If you're feeding it a mask from BMAB Detect And Mask, check that node's own dependency needs.
Common issues
- A face already large in frame gets a second pass that changes it without improving it. This is the standard detailer trap across every tool in this category, not specific to BMAB - if the region is already well-resolved, running a detail pass on it just introduces drift for no visible gain. Reserve this for genuinely small, mangled regions.
- Bad or noisy input mask. Since this node has no detection of its own, its output quality is entirely downstream of whatever mask you hand it. A loose, over-inclusive mask produces a soft, blended-in refinement; a too-tight mask can leave a visible seam even with padding and dilation working in your favor.
limittoo low for a multi-region mask. If your mask covers several disconnected areas and only some get refined, check thatlimitis set high enough to cover all of them.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| bind | BMAB bind | — | |
| masks | MASK | — | |
| steps | INT | 200–10000 | — |
| cfg_scale | FLOAT | 8.00–100 | — |
| sampler_name | COMBO | 45 options: Use same sampler, euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, +39 | |
| scheduler | COMBO | 10 options: Use same scheduler, simple, sgm_uniform, karras, exponential, ddim_uniform, +4 | |
| denoise | FLOAT | 0.400–1 | — |
| padding | INT | 328–128 | — |
| dilation | INT | 44–32 | — |
| width | INT | 512256–2048 | — |
| height | INT | 512256–2048 | — |
| limit | INT | 10–20 | — |
| imageopt | IMAGE | — | |
| loraopt | BMAB lora | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| BMAB bind | BMAB bind | — |
| image | IMAGE | — |