Shima SEGSampler
A 'mega node' that wraps the whole detect-refine loop in one box
- image
- segs
- model
- clip
- vae
- modelcitizen.bndl
- shima.samplercommons
- inpaint_model
- image
Impact Pack's DetailerForEach is the canonical detect-refine loop: for every detected region, crop it, run a fresh sampling pass at proper resolution, paste it back. It's powerful and fiddly - two dozen inputs, separate positive/negative conditioning, and most people end up with a wall of nodes to feed it. Shima SEGSampler is this pack's answer: a "mega node" that wraps the whole thing so you hand it an image, SEGS, and one short prompt string, and it does the rest.
The pack's framing is exactly right - it abstracts the DetailerForEach complexity down to a single prompt input. You type what you want in the region into positive_add ("detailed features" by default, with negative_add set to "blurry, generic") and the node CLIP-encodes those strings internally, feeds them into DetailerForEach.do_detail, and returns the stitched result.
The inputs that matter
imageandsegs- the base image and what to refine. Note: single image only; a batch raises an error rather than quietly doing the wrong thing.positive_add/negative_add- the strings appended to the region's re-render. This is the whole ergonomic win: you're writing a description ("detailed features"), not wiring conditioning.seed,steps,cfg,sampler_name,scheduler,denoise- the standard sampling stack.denoisedefaults to 0.5, which is the sane start for a detail pass.model,clip,vae- connect individually, or wire amodelcitizen.bndlbundle and the node extracts all three. A bundle is the tidier path in this ecosystem.inpaint_model- optional dedicated inpainting model; if provided it's used for the detail passes instead of the main model.guide_size(default 512),max_size(1024),feather(5) - the crop/region sizing knobs inherited from the detailer. These control how big the re-rendered region is and how softly it blends back.- The upscale* block -
upscale,upscale_by,upscale_method,upscale_denoise,upscale_steps,upscale_cfg- an optional whole-image upscale pass after detailing.
Output is a single image. That's it. Detail + upscale + stitch, one wire out.
Installing it
Part of KDB-USJP/shima_wf:
cd ComfyUI/custom_nodes
git clone https://github.com/KDB-USJP/shima_wf
Restart ComfyUI. This node imports impact.impact_pack and calls DetailerForEach.do_detail directly, so ComfyUI-Impact-Pack is mandatory (the pack installer clones it). The optional upscale pass uses a standard UPSCALE_MODEL loader from core ComfyUI; no hidden downloads.
The honest trade-offs
If you don't supply a modelcitizen.bndl, you must wire model, clip, and vae individually or it raises a clear error - there's no silent fallback. And "mega node" cuts both ways: the two dozen DetailerForEach knobs are still there, just collapsed, and when a detail pass looks wrong you'll find yourself expanding back out to debug which crop setting did it. It's a great everyday wrapper, but it's a wrapper - the underlying Impact Pack machinery is what's actually doing the work.
Inputs (26)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| segs | SEGS | — | |
| positive_add | STRING | detailed features | — |
| negative_add | STRING | blurry, generic | — |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 8.000–100 | — |
| sampler_name | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| scheduler | COMBO | 17 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +11 | |
| denoise | FLOAT | 0.500.0001–1 | — |
| modelopt | MODEL | — | |
| clipopt | CLIP | — | |
| vaeopt | VAE | — | |
| modelcitizen.bndlopt | BNDL | Bundle containing Model, CLIP, and VAE | |
| shima.samplercommonsopt | DICT | Sampler settings bundle from Shima.SamplerCommons | |
| inpaint_modelopt | MODEL | — | |
| guide_sizeopt | FLOAT | 51264–8192 | — |
| guide_size_foropt | BOOLEAN | true | — |
| max_sizeopt | FLOAT | 102464–8192 | — |
| featheropt | INT | 50–100 | — |
| upscaleopt | BOOLEAN | false | — |
| upscale_byopt | FLOAT | 1.001–8 | — |
| upscale_methodopt | COMBO | 5 options: bicubic, nearest-exact, bilinear, area, lanczos | |
| upscale_denoiseopt | FLOAT | 0.000–1 | — |
| upscale_stepsopt | INT | 201–10000 | — |
| upscale_cfgopt | FLOAT | 8.00–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |