Empty Latent Image With Rotate
Flip portrait and landscape without retyping
- LATENT
If you've ever been mid-workflow and wanted to test the same prompt in portrait and landscape, you've stared at the stock Empty Latent Image node and wished there were a button. This is that button. Empty Latent Image With Rotate is ComfyUI's standard Empty Latent Image - same inputs, same output - with a "β³ Swap width / height" button the pack's front-end adds to the node. Nothing else changes, and that's exactly why it's nice: one-trick convenience, zero surprises.
How it works
Under the hood it's the stock node, full stop. generate() builds a zeros latent tensor shaped [batch_size, 4, height // 8, width // 8] on ComfyUI's intermediate device. The 8x per-side downscale is where "latent" comes from: SD/SDXL-class VAEs compress 8x per side into 4 channels, so a 512Γ768 image is a 64Γ96 latent. (Flux and other 16-channel models still work fine here - the KSampler resizes the latent it receives, just as it does with the stock node.)
The rotate button itself is pure browser JavaScript. It reads the width and height widget values, swaps them, and re-fires the widget callbacks so the node runs with the flipped numbers. No backend change, no re-encode, no trickery.
The inputs that matter
Only three, and you'll mostly touch two:
- width / height - INT, 16 to 16384, stepped in multiples of 8, default 512. Values snap to the 8-grid.
- batch_size - INT, 1 to 4096, default 1. Bump it if you're generating a batch.
The swap button does the obvious thing: 512Γ768 becomes 768Γ512, then the node runs. It's a genuine workflow accelerator for img2img and outpainting where you're iterating on orientation with the same seed and prompt - you stop retyping two numbers by hand every time.
Output is a single LATENT, which wires straight into your KSampler's latent input. That's the whole graph.
How to install it
ComfyUI Manager is the easy route: search for "ComfyUI AstroCorp Nodes" and install, then restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/AstroCorp/ComfyUI-AstroCorp-Nodes
Restart ComfyUI and the node appears under the "ππ AstroCorp ππ" category. No model downloads, no real Python dependencies - the pack's pyproject.toml declares zero deps, and the stray tensorrt line in its requirements.txt only exists for the pack's ONNX upscaler nodes. You don't need TensorRT for anything here.
Common issues
The swap button lives in the pack's web/ extension, so if it's missing, the front-end didn't register. Hard-refresh the browser (Ctrl+Shift+R) and restart ComfyUI; a cached old page is the usual culprit.
One quirk to know: the node always emits a 4-channel latent regardless of model family. Like stock Empty Latent Image, that's fine for anything - the sampler normalizes. Don't let a "4 channels vs 16 channels" moment scare you; it's the same as stock behavior, and it works.
It's a small pack from a small author with no community footprint yet, so treat this as a convenience node, not a must-install. But if you live in latent-land, it's the kind of micro-quality-of-life thing you stop noticing - which is the highest compliment a utility node gets.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 51216β16384 | β |
| height | INT | 51216β16384 | β |
| batch_size | INT | 11β4096 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | β |