Nodes/Kandinsky T8/Kandinsky 6 Empty Latent (video+audio)
ComfyUI Node

Kandinsky 6 Empty Latent (video+audio)

Kandinsky 6's Empty Latent Is Two Latents in a Trenchcoat

By T8mars·Created 22 days ago·Updated 21 days ago· 6
Kandinsky 6 Empty Latent (video+audio)
    • joint_latent
    • fps
    ◄width864►
    ◄height480►
    ◄length121►
    ◄fps24.00►
    ◄batch_size1►

    Every video workflow starts with an empty latent, and in a joint audiovisual model that latent is not one tensor. Kandinsky 6 samples a video stream and an audio stream at the same time, so the empty latent is a nested latent holding both. This node builds it, sizes the audio to match the video's duration, and hands you back a second output you didn't know you needed: the fps.

    Why it's not just EmptyLatent

    Drop a stock EmptyLatentImage in and you get a 4D tensor the model can't consume. The K6 DiT wants a nested pair: a 5D [B, 16, T, H/8, W/8] video tensor and a 3D [B, T_audio, 40] audio tensor, plus frame_rate and sample_rate on the latent dict itself. That's the contract every other node in this pack validates against, which is why you'll see errors mentioning "joint LATENT containing video and audio streams" if you feed in something else.

    The audio side is derived, not chosen. The node computes how many audio latent frames fit in length / fps seconds of video - 44.1 kHz through a 1024× downsample - so your soundtrack is the same length as your clip by construction. There is no separate audio-length widget to get wrong, and no trimming step in the graph.

    The inputs that matter

    width / height - 864×480 by default, in steps of 16. The hard rule is divisible by 16, and it's not advisory: the node raises before anything loads, with a message naming your numbers. That's 16 pixels of pixel space, on top of the DiT's own patch divisibility on the latent. Stick to multiples of 16 and you'll never see either error.

    length - frames, step 4, default 121. Kandinsky 6 requires 4n+1 frames: 121 = 4×30+1. Ask for 120 and it tells you. 121 frames at 24 fps is five seconds, which is the length the pack validated end to end.

    fps - 24 by default. This is not cosmetic. It feeds the audio latent length here and gets carried on the latent, and the audio decoder uses it to trim the waveform to the right duration. Change fps and the same frame count becomes a different length of clip and a different amount of audio.

    batch_size - locked at 1, min 1, max 1. The node actually refuses anything else; this release only supports a single generation at a time. Don't go looking for the workaround, there isn't one in 0.1.x.

    Two outputs: joint_latent (into the sampler, or into Kandinsky 6 Image to Video+Audio for I2VA) and fps as a FLOAT, which you wire into CreateVideo when muxing frames and audio into the MP4.

    Install

    Same pack as the rest:

    cd ComfyUI/custom_nodes
    git clone https://github.com/T8mars/Comfyui-Kandinsky-T8.git
    cd Comfyui-Kandinsky-T8
    python -m pip install -r requirements.txt
    

    Restart ComfyUI with its own Python environment afterwards. You need ComfyUI 0.39.0+ and comfy-kitchen 0.2.37+, and the DiT itself goes in ComfyUI/models/diffusion_models - Lite (4.87 GB), Lite distill (3.77 GB) or Pro distill (34.97 GB), loaded through the stock UNETLoader with weight_dtype=default. The workflow's Download models button fetches the shared text encoders and VAEs and checks their SHA-256; DiT files are a separate download from the model repo.

    Where it goes wrong

    "width and height divisible by 16." The node's own message, and the fix is arithmetic. 900×500 is a perfectly reasonable resolution that this model cannot do.

    "frame count of the form 4*n+1." 4n+1 frames of 4× temporal compression gives whole latent frames. 121, 81, 41, 161 all work; 100 doesn't.

    Divisible size, still unhappy. There's a second check: after compression the latent dimensions have to divide by the DiT's patch size of (1, 2, 2). Multiples of 16 at pixel level clears this for every standard resolution; if you're doing something exotic, that's the error to read.

    Cranking resolution and length for a "better" clip. Both scale cost, and length scales it in the audio stream too. On a 24 GB card the pack measured ~136–163 seconds for a five-second 864×480 clip on a distilled model, and roughly 745–945 seconds on Pro distill. Doubling the frames doesn't double that, it more than doubles it.

    CategoryKandinsky 6

    Inputs (5)

    NameTypeDefaultDescription
    widthINT864256–2048—
    heightINT480256–2048—
    lengthINT1211–1001Pixel frames. Kandinsky 6 requires 4*n+1 frames.
    fpsFLOAT24.001–120—
    batch_sizeINT11–1—

    Outputs (2)

    NameTypeDescription
    joint_latentLATENT—
    fpsFLOAT—