Hint Image Enchance JK๐
The ControlNet-map upscaler that keeps your edges crisp
- hint_image
- IMAGE
- METADATA
- MODE
The spelled-off-by-a-friend name is HintImageEnchance JK, and it exists because of a quiet disaster in ControlNet and video workflows: you preprocess a pose, depth, or canny map, then resize it to generation resolution with a naive resize, and the edges go mushy. For canny that's fatal - a smeared edge map is a worse control signal than no map at all. This node is a port of the high-quality hint-resize logic from ControlNet AUX (originally written by Lvmin Zhang), wrapped up as a JakeUpgrade node, and it's the difference between "good enough" and "actually clean" control maps.
How it works
You feed it a hint_image - your preprocessed control map - plus the target image_gen_width and image_gen_height. Then you pick a resize_mode:
- Just Resize - stretch to the target dimensions. Fast, but distorts aspect ratio.
- Crop and Resize - inner-fit: scale up so the whole target is covered, then crop the overflow.
- Resize and Fill - outer-fit: scale to fit inside the target, then letterbox with a border color sampled from the image edges.
The "high quality" part is the resize itself. The node detects whether the map is binary, a one-pixel-edge map, or a segmentation map and picks the interpolation accordingly, so thin canny lines and pose skeletons don't blur into 3px smudges when you blow them up 4ร. It also handles 4-channel inpaint masks correctly (the alpha channel is treated as a mask, not blended like a color).
There are two extra outputs worth knowing: METADATA and MODE, both strings describing what was done - handy if you're building API workflows and want a record of the processing in your logs.
Inputs and outputs
hint_image- the control map to enhance.image_gen_width,image_gen_height- the target size (defaults 512ร512).resize_mode- Just Resize / Crop and Resize / Resize and Fill.IMAGE- the resized map.METADATA,MODE- descriptive strings.
Installing it
Ships in ComfyUI-JakeUpgrade, which pulls in opencv-python as a dependency - that's the heavy one this node rides on:
- ComfyUI Manager โ search "JakeUpgrade" โ install โ restart.
- Or:
cd ComfyUI/custom_nodes
git clone https://github.com/jakechai/ComfyUI-JakeUpgrade
cd ComfyUI-JakeUpgrade
pip install -r requirements.txt
Windows portable: run install.bat or ../../../python_embeded/python.exe -s -m pip install -r requirements.txt. If the node errors on cv2, the opencv install didn't take - pip install opencv-python directly.
Common issues
- Edges still blurry. If you're feeding a pre-thinned edge map, "Just Resize" may still soften it - the high-quality path helps but doesn't perform miracles. Re-thin after resize, or preprocess at the target resolution directly.
- Mistaking it for a controlnet loader. This node only resizes/enhances the map. The actual ControlNet application happens in a
ControlNet Apply-family node downstream. Feed this node's output there. - Aspect distortion. "Just Resize" stretches. If your pose comes out squashed, switch to "Crop and Resize" or "Resize and Fill" - that's what they're for.
- Video frame counts. It processes every frame in a batch with the same settings, which is what you want for video control maps - just remember it's per-frame, not temporal. Jitter between frames comes from your preprocessor, not this node.
This is a specialist tool. If you run pose/depth/canny-controlled video generation at all, it's the difference between control maps that survive upscaling and ones that dissolve. For plain image gen at fixed resolution you can skip it - but you'll know exactly when you need it.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| hint_image | IMAGE | โ | |
| image_gen_width | INT | 51264โ16384 | โ |
| image_gen_height | INT | 51264โ16384 | โ |
| resize_mode | COMBO | Just Resize | 3 options: Just Resize, Crop and Resize, Resize and Fill |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | โ |
| METADATA | STRING | โ |
| MODE | STRING | โ |