ComfyUI Node Runs on cloud

easy pixels

Easy pixels – ComfyUI Node Guide

By yolain·Created 3 years ago·Updated 8 days ago· 2,633
easy pixels
    • width_norm
    • height_norm
    • width
    • height
    • scale_factor
    resolution
    width512
    height512
    scale2.000
    flip_w/hfalse

    easy pixels is a resolution calculator - it doesn't touch pixels itself, it just does the arithmetic that decides how many of them you're about to generate or scale to. If you've ever hand-typed "1024 times 1.5 is... 1536, but that's not divisible by 8, round to 1536... wait it is divisible by 8, nevermind" while planning a hires-fix pass, this node exists to stop you doing that math in your head.

    What it does. You pick a resolution from a preset dropdown (the standard SD/SDXL resolution buckets ComfyUI workflows tend to standardize on) or set width/height directly (512 default, in steps of 8, up to 16384 - that step-of-8 constraint isn't arbitrary, it's because the VAE needs dimensions divisible by 8 to decode cleanly). Then scale (default 2) multiplies that base resolution up - the classic use case being "generate at base res, then scale target for an upscale pass." flip_w/h swaps width and height, which sounds trivial until you're switching a workflow from landscape to portrait and don't want to retype both numbers and risk transposing something else in the process.

    Outputs - five of them. width_norm and height_norm are your base width/height, guaranteed normalized to a multiple of 8. width and height are typed * (a wildcard/passthrough type) - they carry the scaled dimensions (base × scale), and the wildcard typing is what lets you wire them into whatever downstream socket expects a number, whether that's an INT widget on an Empty Latent Image or a custom node expecting a float. scale_factor (also *) just re-exposes the scale value itself, handy if you want to display it or feed it into a second node that needs to know the multiplier you used.

    Install. Through ComfyUI Manager (search "ComfyUI Easy Use") or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/yolain/ComfyUI-Easy-Use
    

    then restart ComfyUI. Pure arithmetic, no extra dependencies, no models.

    Common issues. Because width/height/scale_factor are wildcard-typed outputs, ComfyUI will let you wire them into almost anything - including sockets where the resulting number doesn't make sense (like wiring a scaled dimension into something expecting a ratio). The type system won't save you here; it's on you to trace which output is the base (normalized) value and which is the scaled one. The other thing worth internalizing: this node computes numbers, it does not resize an actual image or latent. If you want the scale to happen, those numbers still need to feed into an Empty Latent Image, an upscale node, or similar - easy pixels is the calculator, not the operation.

    CategoryEasyUse/Logic

    Inputs (5)

    NameTypeDefaultDescription
    resolutionCOMBO31 options: width x height (custom), 512 x 512, 512 x 768, 576 x 1024, 768 x 512, 768 x 768, +25
    widthINT51264–16384
    heightINT51264–16384
    scaleFLOAT2.0000.001–10
    flip_w/hBOOLEANfalse

    Outputs (5)

    NameTypeDescription
    width_normINT
    height_normINT
    width*
    height*
    scale_factor*