Nodes/ComfyUI_Mira/Create Canvas Advanced
ComfyUI Node

Create Canvas Advanced

Dimensions + hi-res sizes from one node

By mirabarukaso·Created 2 years ago·Updated 5 days ago· 206
Create Canvas Advanced
    • Width
    • Height
    • Batch
    • HiRes Width
    • HiRes Height
    • HiResMultiplier
    Width576
    Height1024
    Batch1
    Landscapefalse
    HiResMultiplier1.5

    This is a size hub. You set your base width, height, and batch once, and the node spits out both your generation dimensions and the pre-computed hi-res-fix dimensions, so you're not maintaining the same numbers in three places across a workflow. It's a small convenience node, but the class of annoyance it kills - "I changed the width but forgot to update the hires pass" - is a real one.

    It shines in the standard two-pass anime/SDXL workflow. You generate at native resolution, then do a hi-res fix pass at some multiplier to add coherent detail, because generating directly above native duplicates anatomy. That means every workflow has a base size and a scaled size that must stay in lockstep. This node computes both from a single multiplier and a Landscape switch, and it snaps the hi-res dimensions to a multiple of 8 for you.

    How it works

    You give it a Width, Height, Batch, and a HiResMultiplier. It passes the base width/height straight through (swapping them if Landscape is on), and it multiplies them by the multiplier to produce the hi-res width and height - then rounds those to the nearest multiple of 8, which is what latent-based nodes need. Note the readme's own caveat: the hi-res outputs are not a naive product of your inputs, they're the nearest multiple of 8 to that product, so don't be surprised if it's off by a pixel or two from what you'd get on a calculator.

    The inputs that matter

    • Width / Height - your base generation size.
    • Landscape - a one-click orientation swap. Enable it and Width/Height trade places, so you don't hand-edit two fields to rotate.
    • Batch - batch size, passed through to the output for wiring into an empty latent.
    • HiResMultiplier - the upscale factor for the second pass (0.1–8.0, default 1.5). 1.5–2x is the usual hi-res-fix range.

    Outputs, all ready to wire: Width, Height, Batch (feed these to your Empty Latent), HiRes Width, HiRes Height (feed these to your upscale/latent-resize before the second pass), and HiResMultiplier (passed through so downstream nodes can reuse the same factor).

    Where it fits

    Put it near the front of the graph as the single source of truth for size. Base outputs go to your first-pass latent; HiRes outputs go to the upscale step before the second sampler. Because everything derives from one multiplier, changing your target size is a single edit instead of a scavenger hunt. If you don't need the batch/hi-res machinery, the pack also has a plain Create Canvas node; this "Advanced" one is for when you're running a hi-res-fix pipeline.

    Install

    ComfyUI Manager → Custom Nodes Manager → search ComfyUI_Mira → Install → restart. Or by hand: cd ComfyUI/custom_nodes && git clone https://github.com/mirabarukaso/ComfyUI_Mira.git, then restart. If the pack errors on load, run pip install -r requirements.txt in its folder. No downloads.

    Common issues

    If the hi-res dimensions don't exactly equal width × multiplier, that's expected - they're rounded to the nearest multiple of 8 on purpose, and that rounding is what keeps downstream latent nodes from erroring. If your orientation is wrong, it's the Landscape toggle, not the width/height fields - flip the switch rather than swapping the numbers by hand. And make sure you're actually wiring the HiRes outputs into your second pass; the node computes them, but it can't force your workflow to use them.

    CategoryMira/Util

    Inputs (5)

    NameTypeDefaultDescription
    WidthINT57616–4096
    HeightINT102416–4096
    BatchINT11–16
    LandscapeBOOLEANfalse
    HiResMultiplierFLOAT1.50.1–8

    Outputs (6)

    NameTypeDescription
    WidthINT
    HeightINT
    BatchINT
    HiRes WidthINT
    HiRes HeightINT
    HiResMultiplierFLOAT