Nodes/ComfyUI-KrakenTools/πŸ¦‘ Kraken Upscale & Tile Calc
ComfyUI Node

πŸ¦‘ Kraken Upscale & Tile Calc

Stop Letting Ultimate SD Upscale Do Nothing β€” This Node Picks the Numbers

By krakenunboundΒ·Created about a year agoΒ·Updated 9 months agoΒ· 3
πŸ¦‘ Kraken Upscale & Tile Calc
  • image
  • image_out
  • upscale_by
  • tile_width
  • tile_height
  • mask_blur
  • tile_padding
  • seam_fix_width
  • seam_fix_mask_blur
  • seam_fix_padding
  • predicted_resolution
  • target_resolution
  • target_preset
β—„resolution_in1024 x 1024β–Ί
β—„preset_inCustomβ–Ί
β—„scale_step0.010β–Ί
β—„crop_margin_px32β–Ί
β—„mask_blur16β–Ί
β—„tile_padding16β–Ί
β—„seam_fix_width64β–Ί
β—„seam_fix_mask_blur16β–Ί
β—„seam_fix_padding32β–Ί
β—„min_upscale_policyautoβ–Ί
β—„min_upscale_custom1.5β–Ί

Ultimate SD Upscale (USDU) is the community's workhorse for getting big images out of small VRAM - it tiles the image, refines each tile with low-denoise diffusion, and blends the seams. It's also got a dirty secret: if the upscale factor is 1.0 because your "target" already equals the source, USDU doesn't really upscale. No enlargement, no added detail. Just a lot of compute for a pass that's basically nothing. That trap is the entire reason this pack exists.

πŸ¦‘ Kraken Upscale & Tile Calc computes the numbers so USDU actually upscales: it enforces a true enlarge pass (1.5–2Γ—), then hands you ready-made tile, overlap, and seam-fix values to wire into the USDU node. It's a calculator node - no heavy lifting, no models - and it's the middle piece of the Kraken workflow: generate small β†’ upscale big β†’ downscale back to exact target.

How it works

Give it the source resolution - feed the latent's resolution string into resolution_in, or drop an actual image in and it measures it. It figures out the target from preset_in, adds a crop_margin_px safety margin so the enlarged version covers the target, computes a uniform upscale factor, and rounds it up to scale_step (0.01) increments. Then it predicts the enlarged dimensions (rounded to 8-pixel multiples) and derives tile settings: roughly half the predicted size plus overlap, clamped between 512 and 2048 and rounded to 64, with overlap around 1.5% of the smaller dimension (clamped 32–96). It even draws a preview showing the predicted box vs. the target box, so you see the plan before USDU runs.

The most important input is min_upscale_policy:

  • auto (default) - 2Γ— for small canvases (target max dimension ≀ 1024, or target ≀ 1 MP, or source ≀ 2 MP), otherwise 1.5Γ—.
  • off - no floor. This is the "do nothing" mode, and honestly, if you pick this you've missed the point.
  • 1.5x / 2.0x - force it.
  • custom - use min_upscale_custom (1.0–4.0) as your floor.

What wires where

The outputs are designed to be dragged straight into USDU:

  • upscale_by β†’ USDU's upscale_by
  • tile_width, tile_height β†’ USDU tile size
  • mask_blur, tile_padding β†’ USDU mask blur and padding
  • seam_fix_width, seam_fix_mask_blur, seam_fix_padding β†’ USDU's seam-fix fields

The mask_blur, tile_padding, and seam-fix values are also pass-through inputs here, so you can tune them in one place without digging through USDU. predicted_resolution, target_resolution, and target_preset are strings - handy for feeding the resolution helper afterwards. image_out just passes your image through unchanged.

Installing it

Same as the rest of the pack - ComfyUI Manager (search Kraken Tools) or:

cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/krakenunbound/ComfyUI-KrakenTools

Restart and you're done. No extra Python dependencies, no model downloads. But USDU itself is a separate node pack you must install on your own - this node only computes numbers, it doesn't tile anything.

The usual frustrations

  • Quilted, patchwork output. If your upscaled image looks like a chessboard, that's tiles diverging, not this node's fault. The reliable fix - per the wider upscaling community - is feeding the original image through a ControlNet Tile preprocessor so every tile stays faithful to the source. USDU alone will drift.
  • "Why is my image bigger than the target?" Because the enlarge pass deliberately over-covers so nothing gets cropped mid-upscale. That's the point: you trim to exact size afterwards with KrakenResolutionHelper, at ~0.2–0.35 denoise on the USDU pass.
  • It's a young pack (MIT, first release late 2025, by "The Kraken"). Small footprint, no community wiki - the code is short and readable if you want to verify what it's doing.

Is it essential? If you only ever upscale big images, USDU's defaults are fine and you don't need this. But if you're doing small-canvas work - Flux portraits at 736Γ—1344 where "final" resolution is small - this is the difference between a real detail pass and a wasted one.

Categorykraken/upscale

Inputs (12)

NameTypeDefaultDescription
resolution_inSTRING1024 x 1024β€”
preset_inoptSTRINGCustomβ€”
imageoptIMAGEβ€”
scale_stepoptFLOAT0.0100.005–0.25β€”
crop_margin_pxoptINT320–128β€”
mask_bluroptINT160–64β€”
tile_paddingoptINT160–256β€”
seam_fix_widthoptINT640–256β€”
seam_fix_mask_bluroptINT160–64β€”
seam_fix_paddingoptINT320–256β€”
min_upscale_policyoptCOMBOauto5 options: auto, off, 1.5x, 2.0x, custom
min_upscale_customoptFLOAT1.51–4β€”

Outputs (12)

NameTypeDescription
image_outIMAGEβ€”
upscale_byFLOATβ€”
tile_widthINTβ€”
tile_heightINTβ€”
mask_blurINTβ€”
tile_paddingINTβ€”
seam_fix_widthINTβ€”
seam_fix_mask_blurINTβ€”
seam_fix_paddingINTβ€”
predicted_resolutionSTRINGβ€”
target_resolutionSTRINGβ€”
target_presetSTRINGβ€”