Nodes/koo-nodes-pack/KoO 4D → Krea Still Latent
ComfyUI Node

KoO 4D → Krea Still Latent

Your 4D Latent Doesn't Fit Krea's Still Pipeline — This Adds the Missing Axis

By kooailab·Created 15 days ago·Updated 4 days ago· 0
KoO 4D → Krea Still Latent
  • latent
  • LATENT
  • shape_report

Two tensors that mean the same thing to you and completely different things to PyTorch. A normal image latent in ComfyUI is [B, C, H, W] - batch, channels, height, width. A Krea 2 still latent comes through as [B, C, 1, H, W], a five-dimensional tensor with a temporal axis that happens to be one frame long. Anything downstream that was written for the 5D shape will choke on the 4D one, usually with a shape error several nodes away from the actual cause, and your first instinct is to blame the model.

This node is the fix, and it's about as close to a no-op as a node gets. Take a standard [B, C, H, W] latent, insert a singleton dimension at index 2. Done. Its twin, KoO Krea Still Latent → 4D, does the reverse squeeze. They ship together in the same file precisely because you'll need both directions depending on which side of the workflow you're patching.

Why the axis exists at all

Video models and image models converged on one latent container with a frame axis, and "one frame" is a legitimate value for it. Once a pipeline is built around 5D, feeding it a clean 4D image latent is an argument about dimensionality, not about content - the node has no idea what you meant. The wider pattern here is the familiar one from the plumbing layer of ComfyUI: tensors are typed loosely, most nodes don't validate shape, so a mismatch surfaces wherever the first view() or reshape() happens to land. A two-line adapter in the right place beats an hour of reading tracebacks.

And yes - this is squarely plumbing. It touches no pixels, changes no values, has no settings.

Inputs and outputs

One input: latent (LATENT). That's it. No widgets, no strength, nothing to tune.

Two outputs:

  • LATENT - the reshaped latent dictionary. The node copies the dict and replaces only samples, so any other keys on the latent (masks, metadata a loader attached) survive untouched.
  • shape_report - a STRING like inserted singleton temporal dimension at index 2: (1, 16, 96, 64) -> (1, 16, 1, 96, 64). Wire it into a text preview the first time you set this up; it's the fastest way to confirm you inserted the axis you thought you did. Unconnected, it costs nothing.

Behaviour is deliberately forgiving in the one direction that matters: hand it a latent that's already 5D with a singleton temporal axis and it passes through unchanged, reporting "already Krea 5D". So you can leave it in the graph permanently without it breaking the runs that don't need it. Hand it a 5D latent where shape[2] != 1 - an actual multi-frame video latent - and it raises rather than guessing, which is the right call.

Installing it

Same pack install as every other KoO node, and this one has no frontend component at all:

cd ComfyUI/custom_nodes
git clone https://github.com/kevintronchin-blip/koo-nodes-pack

Restart ComfyUI. requirements.txt lists torch, numpy, Pillow and aiohttp, all of which ComfyUI already provides, so there is nothing to pip install and no model to download. It lands under KoO → Latent Compatibility. The pack is v1.0.3 from KoO.Ai; Manager/Registry availability depends on moderation approval, so the ZIP-from-source route in the README is the reliable one right now.

Where people get this wrong

Putting it in the wrong slot. Squeezing when you should be unsqueezing is the entire failure mode. If the error says something expected 5D and got 4D, you want this node (4D → Krea). If it says the opposite, you want KoO Krea Still Latent → 4D. Read the arrow in the display name; both nodes are one widget-free socket and they look identical on a canvas.

Expecting it to fix a batch. It moves dimensions, it doesn't reshape a [6, 16, H, W] batch into anything. If your batch of six is arriving where one image was expected, that's a list/batch broadcasting question, not a latent-shape question.

Assuming it changes the image. A [B,C,H,W] and a [B,C,1,H,W] holding the same floats decode to the same picture on the model that wants them. If your output is garbage after this node, the problem is downstream.

The honest summary: this is the least glamorous node in the pack and one of the ones you'll actually reach for, because Krea 2's ecosystem is young enough that half the interesting nodes are still video-shaped. Two of these sockets, one on each side, and you can move latents between the two worlds without editing anyone's code.

CategoryKoO/Latent Compatibility

Inputs (1)

NameTypeDefaultDescription
latentLATENT—

Outputs (2)

NameTypeDescription
LATENTLATENT—
shape_reportSTRING—