Nodes/comfyui-jk-easy-nodes/JK Easy Detailer (Context)
ComfyUI Node

JK Easy Detailer (Context)

The detect-crop-refine pass for context-pipe graphs

By kostenickj·Created 2 years ago·Updated 2 years ago· 8
JK Easy Detailer (Context)
  • ctx
  • detailer_hook
  • IMAGE
  • SEGS
  • CTX
detector
denoise0.50
cfg8.0
threshold0.50
dilation10
crop_factor3.0
drop_size10
feather5
noise_masktrue
force_inpainttrue
guide_size512
guide_size_fortrue
max_size1024
noise_mask_feather20
iterations1
extra_positive_text
extra_positive_conditioning_modereplace
extra_negative_text
extra_negative_conditioning_modereplace
bleh_sampler_overridedisabled

Same job as JKEasyDetailer - detect a region (a face, typically), crop it, re-sample it at real resolution, and composite it back in, the same detect-crop-refine loop Impact Pack's FaceDetailer made standard practice in ComfyUI - but wired for this pack's bundled-context style instead of six separate model/clip/vae/positive/negative inputs. If you're not already carrying a JK_CONTEXT through your graph, use the plain JKEasyDetailer instead; this version has nowhere to pull model/clip/vae/conditioning from without one.

What it does differently from the plain version

The context (ctx, JK_CONTEXT) supplies model, clip, vae, positive, and negative - you don't wire those here. Everything detection- and sampling-specific still lives on this node directly: detector (populated from your installed Impact Pack detector models - face/hand YOLO weights or a SAM provider are the common ones), denoise (default 0.5), cfg, threshold (confidence cutoff for a detection), dilation (grow or shrink the detected mask), crop_factor (padding around the crop), drop_size (ignore detections below this pixel size), feather (blend softness at the seam), guide_size / max_size (the resolution the crop gets resampled at - this is the actual point of the technique, giving a small region real pixel budget), noise_mask_feather, and iterations (run the loop more than once).

Two optional fields - detailer_hook, explicitly documented as coming "from impact pack," and extra_positive_text / extra_negative_text with a _conditioning_mode (replace/combine/concat/average) - let you plug in an Impact Pack detailer hook or nudge extra wording into just the detail pass. There's also an optional bleh_sampler_override, a hook into the separate ComfyUI-bleh pack's sampler presets - leave it disabled unless you've actually set those up.

The outputs that matter

Three outputs: IMAGE (the composited result), SEGS (the raw detection data, for chaining into another detailer or a mask tool), and - the reason this context version is worth using over the plain one in a longer graph - CTX, the same JK_CONTEXT you fed in, passed back out. That means you can chain this straight into EasyHRFix_Context or JKEasyKSampler_Context afterward without re-bundling model/clip/vae/conditioning a second time.

Installing it

Same pack as everything else here: pre-installed on comfy.icu, or cd ComfyUI/custom_nodes && git clone https://github.com/kostenickj/jk-comfyui-helpers.git and restart. What this specific node needs beyond the pack itself is Impact Pack, installed separately, plus at least one detector model downloaded through it - without that, the detector dropdown has nothing to show. Impact Pack is common, well-established infrastructure, so it's a straightforward ComfyUI Manager install if you don't already have it.

Common issues

  • Empty detector dropdown. No Impact Pack detector models installed. Install Impact Pack (and, since v8.0, its separate detector Subpack if you need YOLO models) and download at least one.
  • ctx arrives incomplete. This node needs model, clip, vae, positive, and negative from the context; if your upstream JKLilContext or JKBigContext didn't populate all of those, this node has nothing to sample with.
  • Grey box or visible seam around the refined region. The usual VAE encode/decode artifact on the crop - raise feather and noise_mask_feather.
  • Style mismatch on the detailed area. Lower denoise toward 0.3–0.4 and keep cfg close to your main pass.
CategoryJK Comfy Helpers

Inputs (22)

NameTypeDefaultDescription
ctxJK_CONTEXT
detectorCOMBO0 options:
denoiseFLOAT0.500.0001–1
cfgFLOAT8.00–100The Classifier-Free Guidance scale balances creativity and adherence to the prompt. Higher values result in images more closely matching the prompt however too high values will negatively impact quality.
thresholdFLOAT0.500–1
dilationINT10-512–512
crop_factorFLOAT3.01–100
drop_sizeINT101–16384
featherINT50–100
noise_maskBOOLEANtrue
force_inpaintBOOLEANtrue
guide_sizeFLOAT51264–16384
guide_size_forBOOLEANtrue
max_sizeFLOAT102464–16384
noise_mask_featherINT200–100
iterationsINT11–10
detailer_hookoptDETAILER_HOOKOptional detailer hook from impact pack
extra_positive_textoptSTRINGif non empty, will be encoded and used depending on the value of extra_positive_conditioning_mode
extra_positive_conditioning_modeoptCOMBOreplace4 options: replace, combine, concat, average
extra_negative_textoptSTRINGif non empty, will be encoded and used depending on the value of extra_negative_conditioning_mode
extra_negative_conditioning_modeoptCOMBOreplace4 options: replace, combine, concat, average
bleh_sampler_overrideoptCOMBOdisabledoptional bleh sampler preset override

Outputs (3)

NameTypeDescription
IMAGEIMAGE
SEGSSEGS
CTXJK_CONTEXT