Nodes/ComfyUI_UnfakePy_Warpper/Image Upscale By Integer
ComfyUI Node

Image Upscale By Integer

Blow up sprites 2x, 4x, 8x — every pixel becomes a clean block

By AhBumm·Created 11 months ago·Updated 9 months ago· 2
Image Upscale By Integer
  • image
  • out_img
  • width
  • height
scale_int1

Pixel art has its own upscaling rules, and they're the opposite of everything you've heard about Lanczos and ESRGAN. You don't want an interpolator that fakes smooth edges - you want each pixel to become an exact square block, hard edges and all. That's this node: scale by an integer (2x, 3x, 4x…) using nearest-neighbor resampling, so a 128x128 sprite becomes a 512x512 image where every original pixel is a perfectly crisp 4x4 block. No blur, no invented detail, no color shift. This is the "display upscaler" - the thing you run so your clean sprite is actually visible instead of a tiny postage stamp.

How it works

Dead simple under the hood: each frame in the batch goes through Pillow's Image.Resampling.NEAREST with both dimensions multiplied by scale_int. Nearest-neighbor means each output pixel just copies the value of its source pixel - which is exactly why integer scales are mandatory here. A 1.5x nearest-neighbor upscale would create uneven block sizes and wreck the grid; that's what the integer-only design prevents. An input of scale_int 1 (or less) short-circuits and returns the image untouched, which is a nice safety if a workflow feeds it a computed value.

Inputs and outputs

  • image - the sprite or pixel render.
  • scale_int (INT, default 1, range 1–64) - the multiplier. 2 and 4 are the workhorses; 8 is plenty for display; 64 is there if you want to make a wall mural from a 32x32 sprite.

Outputs: out_img, plus width and height reporting the actual resulting dimensions - useful when you're wiring into an image-size-expecting node or just checking your math.

Installing it

Standard for this pack:

cd ComfyUI/custom_nodes
git clone https://github.com/AhBumm/ComfyUI_UnfakePy_Warpper

or ComfyUI Manager → Install Custom Nodes → search ComfyUI_UnfakePy_Warpper, then restart. Requirements are unfake==1.0.7 and nest_asyncio (unfake pulls opencv, Pillow, NumPy; Python 3.10+). No models, CPU-only, effectively instant.

Where this fits

The classic combo is Unfake Pixelate ToolsImage Upscale By Integer: the first node detects the real pixel grid and quantizes to a clean palette, and since it outputs at the sprite's true scale - a "128x128" render stays 128x128 - you then need this node to make the result presentable. One honest note: don't reach for it expecting detail recovery. On the upscaling spectrum this is pure "more pixels," category one; if you want a tiny soft render rebuilt into something with real definition, you want a generative upscaler like SeedVR2 or SUPIR, not this - those will happily add detail, and will also happily smear your pixel grid into soup. For pixel art, hard integer scaling is the correct aesthetic choice, and this is the correct tool.

CategoryBillBum/PixelTools

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
scale_intINT11–64

Outputs (3)

NameTypeDescription
out_imgIMAGE
widthINT
heightINT