Nodes/ComfyUI-PolyhedronLoRAStack/⬡ Polyhedron Empty Latent
ComfyUI Node

⬡ Polyhedron Empty Latent

One empty latent node that knows what every model family actually wants

By PolyhedronAI·Created 3 months ago·Updated a day ago· 2
⬡ Polyhedron Empty Latent
  • positive
  • negative
  • vae
  • clip_vision_output
  • start_image
  • positive
  • negative
  • latent
  • latent_width
  • latent_height
  • width
  • height
latent_typeImage
width1024
height1024
length81
batch_size1
noise_typezeros
noise_seed0
noise_strength1.00
duration_seconds0.0

⬡ 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.

CategoryPolyhedron/Latent

Inputs (14)

NameTypeDefaultDescription
latent_typeCOMBOImageWhat 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).
widthINT102416–16384Pixel width. Snaps to the VAE spatial grid.
heightINT102416–16384Pixel height. Snaps to the VAE spatial grid.
lengthINT811–16384VIDEO 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_sizeINT11–4096Number of latents in the batch.
noise_typeCOMBOzerosInit 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_seedINT00–18446744073709550000Seed 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_strengthFLOAT1.000–20Init-noise scale in units of standard latent noise (1.0 == torch.randn scale). Greyed when noise_type is zeros.
duration_secondsFLOAT0.00–3600MiniMax 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.
positiveoptCONDITIONINGConditioning to include. On the WAN path this becomes the I2V positive; for every other type it passes through untouched to the output.
negativeoptCONDITIONINGConditioning to exclude. Passes through untouched for non-WAN types.
vaeoptVAEOptional. 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_outputoptCLIP_VISION_OUTPUTWAN only: CLIP-vision features injected into both conditionings (I2V semantic guidance). Ignored for other types.
start_imageoptIMAGEWAN only: reference frame(s), VAE-encoded into the concat conditioning with a frame mask (I2V). Ignored for other types.

Outputs (7)

NameTypeDescription
positiveCONDITIONINGConditioning to include (I2V positive on the WAN path).
negativeCONDITIONINGConditioning to exclude.
latentLATENTThe empty latent.
latent_widthINTLATENT 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_heightINTLATENT grid height -- see latent_width.
widthINTPIXEL width actually used, after grid snapping. Not the same number as latent_width: this one is what the image comes out as.
heightINTPIXEL height actually used, after grid snapping.