⬡ Polyhedron Empty Latent
One empty latent node that knows what every model family actually wants
- positive
- negative
- vae
- clip_vision_output
- start_image
- positive
- negative
- latent
- latent_width
- latent_height
- width
- height
⬡ Polyhedron Empty Latent is the "one empty latent node for every family" answer to a problem you hit the moment you run more than one model architecture: SDXL wants a 2D latent, Wan wants a 5D video latent with its own frame packing, Flux2 wants a different spatial factor, and MiniMax H3 wants a joint audio/video latent. Core gives you a separate node per family. This one gives you a latent_type dropdown.
Pick Image and it emits a 2D latent for any image model - SD, SDXL, SD3, Flux, Flux2, Qwen-Image, whatever shows up later, no new node needed. Pick WAN / Hunyuan / Mochi / LTXV / Cosmos and it switches to that architecture's 5D video latent with the right frame packing, and the length control comes alive. Pick MiniMax H3 AV and you get the video+audio latent - with duration_seconds replacing the Float + Math Expression pair from the stock template (0 = off, length decides; above 0 it's clip length in seconds at 24fps, snapped up to the model's 17k+5 frame grid).
Getting the geometry exactly right
The clean way: wire your VAE in. The node probes it and the emitted latent's channel count and spatial ratio become exact for the loaded model - which also makes non-zero init noise correct (a non-16ch model with random noise but the wrong channel count is a recipe for silent garbage). Without a VAE it falls back to safe /8, 16-channel defaults, which is fine for zeros noise. Width and height snap to the VAE's spatial grid, and the node tells you what your values became via the latent_width/latent_height/width/height outputs - the latent-grid numbers (1024px at /8 = 128) are exactly what ⬡ Polyhedron Seed's preview_width/preview_height want.
The Wan I2V path
For the Wan video types this node carries full I2V wiring. Wire start_image (reference frame(s), VAE-encoded into the concat conditioning with a frame mask) and clip_vision_output (CLIP-vision features injected into both conditionings as semantic guidance), and the positive output becomes the I2V positive. That's the whole first-frame-anchored workflow in one node instead of a four-node tangle - and it matches WanImageToVideo's pin parity, so saved workflows don't break.
Init noise
noise_type writes init noise into the latent: zeros is the standard empty latent (correct at denoise 1.0 - the sampler makes all the noise), gaussian is flat white, pink/brown/blue are coloured (brown biases composition, blue biases detail), fractal is coherent multi-octave structure, and offset/pyramid round it out. noise_seed is CPU-deterministic, so the same seed reproduces across machines and PNG re-loads - set control_after_generate to fixed for a reproducible image. Effect is strongest on flow models (Wan/Flux) and at denoise < 1.0.
Installing it
Part of the ⬡ Polyhedron Suite pack. ComfyUI Manager → "Polyhedron Suite", or:
cd ComfyUI/custom_nodes
git clone https://github.com/PolyhedronAI/ComfyUI-PolyhedronLoRAStack.git
# restart ComfyUI
No extra dependencies.
Gotchas
Don't forget that length=1 on the video types gives a single-frame still - useful, but it's easy to set length on an Image-type latent where it's ignored/greyed and wonder why the video length did nothing. And non-zero init noise on a non-16ch model without a wired VAE is where you'll get weird output; wire the VAE. As with the rest of the pack, blank rendering under Nodes 2.0 means disable Modern Node Design in Settings.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| latent_type | COMBO | Image | What kind of latent to emit. Image -> 2D latent for ANY image model (SD, SDXL, SD3, Flux, Flux2, Qwen-Image/Edit, ...). Future image models need no new entry. WAN / Hunyuan / Mochi / LTXV / Cosmos -> 5D VIDEO latent with that architecture's frame packing; the 'length' control becomes active. Wire the VAE for exact channels/scale; otherwise safe /8 16ch defaults are used (fine for zeros noise). |
| width | INT | 102416–16384 | Pixel width. Snaps to the VAE spatial grid. |
| height | INT | 102416–16384 | Pixel height. Snaps to the VAE spatial grid. |
| length | INT | 811–16384 | VIDEO types only: pixel frame count (packed into latent frames per architecture; length=1 -> a single-frame still). Ignored / greyed for Image. MiniMax H3: length=1 builds a true single-frame IMAGE latent (one latent frame, the mode image datasets train in). Above 1 it is video and Core's grid applies: 2-4 come back as 5, then 22, 39, ... (17k+5). The pill under the fields shows what your value becomes, and duration_seconds above 0 overrides this field. |
| batch_size | INT | 11–4096 | Number of latents in the batch. |
| noise_type | COMBO | zeros | Init noise written INTO the latent. zeros = the standard empty latent (the sampler makes all the noise; correct at denoise 1.0). gaussian = flat white. pink/brown/blue = colored (brown biases composition, blue biases detail). fractal = coherent multi-octave structure. Effect is strongest on flow models (Wan/Flux) and at denoise<1.0. For non-zero noise on a non-16ch model, wire the VAE so the channel count is exact. |
| noise_seed | INT | 00–18446744073709550000 | Seed for the init noise (CPU-deterministic -> reproducible across machines and PNG re-loads). Set control_after_generate to 'fixed' for a reproducible image; drag the preview to scrub it. |
| noise_strength | FLOAT | 1.000–20 | Init-noise scale in units of standard latent noise (1.0 == torch.randn scale). Greyed when noise_type is zeros. |
| duration_seconds | FLOAT | 0.00–3600 | MiniMax H3 AV only. 0 = off, 'length' decides. Above 0 this is the clip length in SECONDS at 24 fps, snapped up to the model's 17k+5 frame grid -- it replaces the Float + Math Expression pair from the stock template. The node prints which of the two won. |
| positiveopt | CONDITIONING | Conditioning to include. On the WAN path this becomes the I2V positive; for every other type it passes through untouched to the output. | |
| negativeopt | CONDITIONING | Conditioning to exclude. Passes through untouched for non-WAN types. | |
| vaeopt | VAE | Optional. When connected, its latent channel count and spatial ratio make the emitted geometry exact for the loaded model (and correct with non-zero noise). Also required on the WAN path if a start_image is provided (to encode it into the I2V conditioning). | |
| clip_vision_outputopt | CLIP_VISION_OUTPUT | WAN only: CLIP-vision features injected into both conditionings (I2V semantic guidance). Ignored for other types. | |
| start_imageopt | IMAGE | WAN only: reference frame(s), VAE-encoded into the concat conditioning with a frame mask (I2V). Ignored for other types. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | Conditioning to include (I2V positive on the WAN path). |
| negative | CONDITIONING | Conditioning to exclude. |
| latent | LATENT | The empty latent. |
| latent_width | INT | LATENT grid width -- the tensor's own last dimension, AFTER the VAE probe / core delegate / spec fallback has had its say. This is the number the Polyhedron Seed node's preview_width wants: it is already divided by the model's spatial factor (1024px at /8 = 128, 1440px Flux2 at /16 = 90). |
| latent_height | INT | LATENT grid height -- see latent_width. |
| width | INT | PIXEL width actually used, after grid snapping. Not the same number as latent_width: this one is what the image comes out as. |
| height | INT | PIXEL height actually used, after grid snapping. |