Create Canvas
Width/height with a landscape flip
- Width
- Height
Every workflow needs a width and a height, and every workflow ends up with those two numbers typed into five different places. Change your resolution and you're hunting down each one. Create Canvas is the small fix for that: one node that holds Width and Height and hands them out to everything downstream, plus a one-click Landscape switch to swap them.
It's a Util node from ComfyUI_Mira, mirabarukaso's grab-bag of workflow conveniences. Nothing exotic - this is pure quality-of-life plumbing, the same category of "make a big graph tolerable" work that packs like rgthree built their reputation on. You won't brag about it, you'll just quietly stop mistyping 1024 as 1042.
How it works
The node stores two integers and passes them through as outputs. The whole value-add is the Landscape boolean: flip it on and the node swaps Width and Height at the output without you touching the input fields. So you set your resolution once as a portrait pair, and toggling one switch gives you the landscape version - handy when you're batching the same prompt in both orientations, or when a model wants a specific aspect and you don't want to mentally transpose numbers.
Inputs and outputs that matter
Width/Height- your base resolution. Steps of 8, range 16 to 4096, defaulting to 576 x 1024 (a portrait shape).Landscape- off, the outputs match the inputs; on, they come out swapped.
Outputs are just Width and Height as INT. Wire them into your Empty Latent Image, your upscale math, your mask nodes - anywhere a dimension is needed. Because they're plain integers, a single Create Canvas can be the one source of truth for resolution across the entire graph.
Note this is the "Simple/Normal" flavor: width, height, and the landscape flip. Mira also ships a basic variant with no landscape toggle, and an advanced one that adds batch size and a HiRes multiplier - pick the one that matches how much you need. If all you want is the swap, this is it.
Installing it
Through ComfyUI Manager: search ComfyUI_Mira in the Custom Nodes Manager, click Install, restart. Or clone it: cd ComfyUI/custom_nodes && git clone https://github.com/mirabarukaso/ComfyUI_Mira.git, then restart ComfyUI. If the pack complains on load, pip install -r requirements.txt in the folder and restart. No models needed.
Common issues
There's very little to go wrong. The one thing to internalize is what Landscape does - it swaps the two numbers, it doesn't rotate an image or reflow a layout. If you have regional masks or a composition tuned for portrait and you flip to landscape, your masks won't magically follow; they're sized off their own inputs. Drive those from the same Create Canvas outputs and they'll track the swap; leave them hardcoded and they won't.
Otherwise, the usual custom-node caveat applies: if the node doesn't show up after install, you probably didn't fully restart ComfyUI (a browser refresh isn't enough), or the pack hit a dependency error on load - check the console and run the requirements install. Once it's in, it just works, which is the whole idea.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| Width | INT | 57616–4096 | — |
| Height | INT | 102416–4096 | — |
| Landscape | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| Width | INT | — |
| Height | INT | — |