Empty Latent Image (Swap)
Empty latent, plus one button that flips landscape/portrait
- LATENT
Here's the entire pitch: it's the stock Empty Latent Image node, with one extra button that swaps the width and height values. That's it. That's the whole node.
If you're always flipping between portrait and landscape while testing prompts - 896×1152 to 1152×896 and back - you already know the pain of clicking into two number boxes every time. This saves you exactly that. One click, width and height trade places, queue. It's a small quality-of-life thing, and it's honest about being one.
The swap node is one of two utility nodes hiding in galigali-san/ComfyUI-ModelDumpster, a pack that's otherwise all SDXL model-analysis heatmaps. So don't let the pack's "model analysis" identity throw you - this node is a plain latent utility and works with any model that uses a standard latent input.
How it works
The Python side is a subclass of ComfyUI's own EmptyLatentImage - the node literally inherits the original generation logic, so the LATENT it produces is byte-for-byte what the stock node would give you. The author says it outright: since it inherits the original, the generation logic is identical and therefore safe. The Swap button is a small JavaScript extension that grabs the width and height widget values, swaps them, and tells the graph something changed.
No hidden behavior, no side effects on batch_size. If you're worried this is some fork that drifts from stock behavior, it isn't.
The inputs and outputs
Same as the core node:
width(default 512, 16–16384, steps of 8)height(default 512)batch_size(default 1, up to 4096)
And one output: LATENT, the empty latent batch, wired into your sampler's latent input.
A tip while you're here: the default 512 is SD1.5-native. If you're on SDXL, you want around 1024×1024 or one of its trained aspect ratios (1152×896, 1216×832, 1344×768...), and the trained ratios come in flipped pairs - which is precisely the swap this button automates. Generating SDXL at 512 will look soft no matter how good your prompt is.
Installing it
Same one-liner as the rest of the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/galigali-san/ComfyUI-ModelDumpster
Restart ComfyUI. No dependencies to install, no models to download - it's pure front-end plus a thin subclass. You can also grab it through ComfyUI Manager by searching ComfyUI-ModelDumpster; the node shows up in the same latent category as the stock empty-latent node.
Should you bother?
If you flip orientations constantly while iterating, this is a genuinely nice little button and it costs nothing. If you set one aspect ratio and leave it, you've learned everything there is to know about this node already. It's not a revolution - it's a three-click annoyance deleted from your workflow, and sometimes that's exactly the right amount of tool.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 51216–16384 | The width of the latent images in pixels. |
| height | INT | 51216–16384 | The height of the latent images in pixels. |
| batch_size | INT | 11–4096 | The number of latent images in the batch. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | The empty latent image batch. |