Nodes/Kraken Tools/πŸ™ Kraken Image Processor
ComfyUI Node

πŸ™ Kraken Image Processor

The clean-up pass before and after your upscale, all in one node

By krakenunboundΒ·Created 8 months agoΒ·Updated 8 months agoΒ· 2
πŸ™ Kraken Image Processor
  • image_input
  • processed_image
  • processing_log
  • quality_metrics
β—„processing_modepre_processβ–Ί
β—„source_modeupstreamβ–Ί
β—„image_uploadβ–Ύβ–Ί
β—„enable_denoisingtrueβ–Ί
β—„denoise_methodbilateralβ–Ί
β—„denoise_strength0.30β–Ί
β—„enable_contrast_enhancementtrueβ–Ί
β—„auto_contrastfalseβ–Ί
β—„contrast_factor1.05β–Ί
β—„brightness_factor1.10β–Ί
β—„enable_pre_sharpeningtrueβ–Ί
β—„sharpening_methodunsharp_maskβ–Ί
β—„sharpening_strength0.50β–Ί
β—„sharpening_radius0.90β–Ί
β—„enable_color_correctionfalseβ–Ί
β—„color_saturation1.05β–Ί
β—„gamma_correction1.10β–Ί
β—„enable_film_grainfalseβ–Ί
β—„grain_amount0.05β–Ί
β—„grain_size1.00β–Ί
β—„preserve_alphatrueβ–Ί
β—„processing_precision16bitβ–Ί
β—„custom_sharpen_kernel0,-1,0;-1,5,-1;0,-1,0β–Ί

There's a version of upscaling where you drag in an image, run an upscaler, and accept whatever comes out. There's a better one where you de-noise the source first, upscale, then sharpen and regrade the result. πŸ™ Kraken Image Processor is the second workflow, wrapped into a single node with a processing_mode switch that changes what it does depending on where it sits in the graph.

It's part of Kraken Tools (krakenunbound/comfyui-kraken-tools), the pack's image pipeline front-and-center: the README's recommended flow is USDU upscale β†’ Kraken Resolution Helper β†’ this node β†’ Save. The idea is that you don't need five separate filter nodes cluttering the canvas - one node with honest toggles does denoise, contrast, sharpen, color, and optional film grain, and tells you what it did.

How it works

Everything is toggle-gated, and the tooltips are the author's own descriptions, so they're trustworthy. The inputs that actually matter:

  • processing_mode - pre_process or post_process. Pre-process prepares the source for upscaling (noise removal so the upscaler doesn't amplify artifacts); post-process refines the output. The same toggles apply gentler default behavior in post mode.
  • source_mode - upload (use a file picker) or upstream (accept an image_input from the graph). You'll almost always use upstream in a workflow.
  • enable_denoising + denoise_method - the filter behind it: bilateral (edge-preserving, the default), gaussian (fast), gaussian_torch (GPU-accelerated), median (good for JPEG artifacts), or non_local_means (heavy, for genuinely noisy photos). denoise_strength 1.0 is normal; above that is aggressive.
  • enable_contrast_enhancement - with auto_contrast for the lazy option, or manual contrast_factor / brightness_factor (1.0 = no change).
  • enable_pre_sharpening - unsharp_mask (professional), edge_enhance (simple), or custom_kernel where you paste a 3x3 kernel like 0,-1,0;-1,5,-1;0,-1,0 into custom_sharpen_kernel. sharpening_strength 0.3 is subtle, 1.0 is strong; sharpening_radius small = fine detail, large = broader.
  • enable_color_correction - saturation and gamma, for faded source material.
  • enable_film_grain - post-processing only, per the tooltip: grain_amount 0.05 (subtle) to 0.5 (strong), grain_size 1.0 fine to 3.0 coarse. This is a texture finish, not a fix.
  • preserve_alpha - keeps transparency through the pipeline if the source has it.
  • processing_precision - 8bit or 16bit. 16-bit is higher quality and slower, the "don't round-trip through 8-bit before the upscaler sees it" choice.

Outputs

  • processed_image (IMAGE) β†’ your upscaler or Save node.
  • processing_log (STRING) - what actually ran, for a text display.
  • quality_metrics (STRING) - a metrics report (sharpness/noise estimates) you can inspect instead of trusting your eyes.

Install

Part of the pack, standard install. ComfyUI Manager β†’ search "Kraken Tools" β†’ Install β†’ restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/krakenunbound/comfyui-kraken-tools
cd comfyui-kraken-tools
pip install -r requirements.txt

The pack pulls in opencv-python and scipy - that's where the denoise/sharpen machinery comes from. ComfyUI Manager will handle those deps; on a manual install make sure they're present or the node's imports will fail.

Where people get burned

  • Stacking everything on. Every toggle on at 16-bit on a 4K source is slow for no reason. Denoise + light sharpen pre, gentle sharpen + grain post, and turn the rest off until you know you need it.
  • Grain in pre-process does nothing. enable_film_grain is gated to post-processing by design; if you flip it on in pre mode it's ignored, which confuses people for exactly one workflow.
  • Non-local means is a time sink. It's the "real" denoiser but it's dramatically slower than bilateral. On anything above 1MP, treat it as a deliberate choice, not a default.
  • Upscaling amplifies everything. The whole point of the pre-pass is that an upscaler faithfully upscales your noise and halos along with your image. If you've been fighting "why does my upscale look gritty," the answer is usually that the source needed this node before the upscaler ever ran.

This is one of those nodes you don't need every day - until you're upscaling a phone photo or a JPEG that's been compressed twice, and suddenly it's the whole difference between "bigger" and "better."

CategoryKraken/Image

Inputs (24)

NameTypeDefaultDescription
processing_modeCOMBOpre_processPre-process: Prepare image for upscaling | Post-process: Refine upscaled image
source_modeCOMBOupstreamUpload: use uploaded image | Upstream: receive from connected node
image_uploadCOMBOSelect uploaded image (only used when source_mode = upload)
enable_denoisingBOOLEANtrueRemove noise/artifacts (recommended for pre-processing)
denoise_methodCOMBObilateralbilateral (edge-preserving) | gaussian (fast) | gaussian_torch (GPU) | median (JPEG artifacts) | non_local_means (heavy)
denoise_strengthFLOAT0.300.1–3Denoising intensity (1.0 = normal, higher = aggressive)
enable_contrast_enhancementBOOLEANtrueOptimize contrast and brightness for detail visibility
auto_contrastBOOLEANfalseAutomatically optimize contrast range
contrast_factorFLOAT1.050.5–2Manual contrast adjustment (1.0 = no change)
brightness_factorFLOAT1.100.5–1.5Brightness adjustment (1.0 = no change)
enable_pre_sharpeningBOOLEANtrueSharpen edges (pre: before upscale, post: subtle refinement)
sharpening_methodCOMBOunsharp_maskunsharp_mask (professional) | edge_enhance (simple) | custom_kernel (advanced)
sharpening_strengthFLOAT0.500–2Sharpening intensity (0.3 = subtle, 1.0 = strong)
sharpening_radiusFLOAT0.900.5–3Sharpening radius (smaller = fine detail, larger = broader)
enable_color_correctionBOOLEANfalseApply color corrections (useful for faded/poor colors)
color_saturationFLOAT1.050–2Color saturation (1.0 = normal, >1.0 = vibrant)
gamma_correctionFLOAT1.100.5–2Gamma correction (1.0 = normal, <1.0 = brighter)
enable_film_grainBOOLEANfalseAdd film grain for artistic texture (post-processing only)
grain_amountFLOAT0.050–0.5Grain intensity (0.05 = subtle, 0.5 = strong)
grain_sizeFLOAT1.000.5–3Grain size (1.0 = fine, 3.0 = coarse)
preserve_alphaBOOLEANtruePreserve transparency channel if present
processing_precisionCOMBO16bitProcessing bit depth (16bit = higher quality, slower)
image_inputoptIMAGEInput image from upstream node (used if source_mode = upstream)
custom_sharpen_kerneloptSTRING0,-1,0;-1,5,-1;0,-1,0Custom sharpening kernel (format: row1;row2;row3)

Outputs (3)

NameTypeDescription
processed_imageIMAGEβ€”
processing_logSTRINGβ€”
quality_metricsSTRINGβ€”