Nodes/Shima/Shima SEGSampler
ComfyUI Node

Shima SEGSampler

A 'mega node' that wraps the whole detect-refine loop in one box

By KDB-USJP·Created 6 months ago·Updated 6 months ago· 2
Shima SEGSampler
  • image
  • segs
  • model
  • clip
  • vae
  • modelcitizen.bndl
  • shima.samplercommons
  • inpaint_model
  • image
positive_adddetailed features
negative_addblurry, generic
seed0
steps20
cfg8.00
sampler_name
scheduler
denoise0.50
guide_size512
guide_size_fortrue
max_size1024
feather5
upscalefalse
upscale_by1.00
upscale_method
upscale_denoise0.00
upscale_steps20
upscale_cfg8.0

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

  • image and segs - 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. denoise defaults to 0.5, which is the sane start for a detail pass.
  • model, clip, vae - connect individually, or wire a modelcitizen.bndl bundle 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.

CategoryShima/SEGs

Inputs (26)

NameTypeDefaultDescription
imageIMAGE
segsSEGS
positive_addSTRINGdetailed features
negative_addSTRINGblurry, generic
seedINT00–18446744073709550000
stepsINT201–10000
cfgFLOAT8.000–100
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO17 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +11
denoiseFLOAT0.500.0001–1
modeloptMODEL
clipoptCLIP
vaeoptVAE
modelcitizen.bndloptBNDLBundle containing Model, CLIP, and VAE
shima.samplercommonsoptDICTSampler settings bundle from Shima.SamplerCommons
inpaint_modeloptMODEL
guide_sizeoptFLOAT51264–8192
guide_size_foroptBOOLEANtrue
max_sizeoptFLOAT102464–8192
featheroptINT50–100
upscaleoptBOOLEANfalse
upscale_byoptFLOAT1.001–8
upscale_methodoptCOMBO5 options: bicubic, nearest-exact, bilinear, area, lanczos
upscale_denoiseoptFLOAT0.000–1
upscale_stepsoptINT201–10000
upscale_cfgoptFLOAT8.00–100

Outputs (1)

NameTypeDescription
imageIMAGE