HT Detection Batch Processor
Detect the face, upscale just the face, paste it back
- image
- model
- positive
- negative
- vae
- upscale_model
- detection_model
- segs
- detection_upscale_model
- upscaled_image
- cropped_batch
- scale_info
If you've ever upscaled a whole 2K image just to fix a face that's 200 pixels wide, this node is aimed squarely at you. HT Detection Batch Processor automates the loop that FaceDetailer made famous in ComfyUI - detect regions, crop them, run a proper sampling pass, and paste the results back - except it's built for arbitrary detections and batch upscaling, not just faces. It's the heaviest node in HommageTools, and it's the one that most obviously needs a plan before you wire it up.
What it does
Feed it an image, a detection_model (a BBOX_DETECTOR, which is an Impact Pack type), and a full diffusion setup - model, positive, negative, vae plus the usual steps, cfg, sampler_name, scheduler, denoise - and it:
- Runs detection to get a set of regions (
SEGS). - Bucket-sizes each region so it fits a standard resolution (
use_buckets, default on). - Optionally upscales each region with an
upscale_modelfirst. - Samples each crop with the model you gave it, tiled so you don't blow your VRAM.
- Pastes everything back into the full frame.
The output is three things: upscaled_image (the full frame with processed regions composited), cropped_batch (all the processed regions as a batch, handy for inspection or chaining), and scale_info, a string that tells you what the bucketing did - wire it into a text preview node while you're tuning.
The inputs that matter
The detections are the thing most people fumble. detection_threshold (0.5) controls how confident the detector has to be, crop_factor (3.0) expands each box - that's a big multiplier, so smaller is tighter - and detection_dilation grows the mask around the detected object. If you'd rather skip detection entirely, you can feed an existing segs and flip use_provided_segs on; that's how you'd reuse detections from an earlier node instead of re-running the detector.
The tiling side is the classic Ultimate SD Upscale machinery: tile_width/tile_height of 512 with tile_padding 32 are sane starting points, and seam_fix_mode (None / Band Pass / Half Tile) cleans up the boundaries between tiles. Start with seam_fix_mode off, see if you actually get seams, then turn it on - it's a real time cost.
Installing it
Same as the rest of the pack: ComfyUI Manager → search "HommageTools for ComfyUI", or
cd ComfyUI/custom_nodes
git clone https://github.com/ArtHommage/HommageTools.git
cd HommageTools && pip install -r requirements.txt
then restart ComfyUI. But this node needs more than the pack. The BBOX_DETECTOR and SEGS types come from Impact Pack, so install that too, and you'll want a detection model (an ONNX or Ultralytics bbox detector from Impact Pack's detector menu) plus an upscale_model for the region pass.
Gotchas
- No detections is a handled case, not an error. The source returns a 1×1 black placeholder as
upscaled_image, the original image, andscale_info= "No regions detected". The one time you will see a red pixel is on an actual detection error (it sets the placeholder's first channel to red on exception). Either way, check the console - it logs[USDU]lines as it goes - and if you're getting nothing detected, yourdetection_thresholdis probably too high or the detector model isn't loading. - It's slow. Every detected region is a fresh sampling run. A batch of 20 faces is 20 passes. Use it where you'd use FaceDetailer - targeted regions that actually need the work - not as a blanket pass over everything.
- The pack is flagged "perpetually in alpha" by its author, and this node is the most experimental thing in it. Don't build a production pipeline on it; do keep it for the jobs nothing else does in one node.
If you're new to the detect-crop-refine idea, the KB's upscaling essay is worth a read - tiled diffusion upscaling is where the whole family of nodes comes from, and this one just front-loads the detection step.
Inputs (39)
| Name | Type | Default | Description |
|---|---|---|---|
| console_label | STRING | Detection Batch Processing | — |
| image | IMAGE | — | |
| model | MODEL | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| vae | VAE | — | |
| 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 | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 | |
| denoise | FLOAT | 0.200–1 | — |
| upscale_model | UPSCALE_MODEL | — | |
| mode_type | COMBO | 3 options: Linear, Chess, None | |
| tile_width | INT | 51264–8192 | — |
| tile_height | INT | 51264–8192 | — |
| mask_blur | INT | 80–64 | — |
| tile_padding | INT | 320–8192 | — |
| seam_fix_mode | COMBO | 4 options: None, Band Pass, Half Tile, Half Tile + Intersections | |
| seam_fix_denoise | FLOAT | 1.000–1 | — |
| seam_fix_width | INT | 640–8192 | — |
| seam_fix_mask_blur | INT | 80–64 | — |
| seam_fix_padding | INT | 160–8192 | — |
| detection_model | BBOX_DETECTOR | — | |
| detection_threshold | FLOAT | 0.500–1 | — |
| detection_dilation | INT | 4-512–512 | — |
| crop_factor | FLOAT | 3.01–100 | — |
| drop_size | INT | 101–8192 | — |
| scale_mode | COMBO | max | 4 options: max, up, down, closest |
| short_edge_div | COMBO | DIV_BY_8 | 2 options: DIV_BY_8, DIV_BY_64 |
| mask_dilation | FLOAT | 1.001–2 | — |
| use_buckets | BOOLEAN | true | — |
| force_uniform_tiles | BOOLEAN | true | — |
| tiled_decode | BOOLEAN | false | — |
| bucket_scale_factor | FLOAT | 1.00.1–4 | — |
| segsopt | SEGS | — | |
| use_provided_segsopt | BOOLEAN | false | — |
| segs_upscale_separatelyopt | BOOLEAN | true | — |
| detection_upscale_modelopt | UPSCALE_MODEL | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| upscaled_image | IMAGE | — |
| cropped_batch | IMAGE | — |
| scale_info | STRING | — |