Nodes/ComfyUI-MaxedOut/Wan 2.2 Empty Latent Image MXD
ComfyUI Node

Wan 2.2 Empty Latent Image MXD

The image latent WAN 2.2 I2V actually wants

By Maxed-Out-99·Created about a year ago·Updated 21 days ago· 9
Wan 2.2 Empty Latent Image MXD
    • LATENT
    resolutionSquare (1:1) 960×960
    verticalfalse
    batch_size1

    WAN 2.2's video latent isn't the only latent WAN 2.2 needs. The image-to-video pipelines also use a single-image latent at video-friendly resolutions - and while you can brute-force one with the core Empty Latent Image node, you'll be doing the bucket math yourself. Wan 2.2 Empty Latent Image MXD is the preset version: it generates an empty image latent at exactly the WAN 2.2 bucket sizes, with a vertical toggle, so your I2V latent matches the bucket your frames got scaled to.

    What it is

    A small, focused utility in the MaxedOut pack's WAN 2.2 toolkit: pick a resolution, set batch_size, get a LATENT. Its sibling WAN2.2 Empty Latent Video MXD handles the video latent (with a frame length); this one produces the image latent - the t=1 case - that image-to-video conditioning starts from.

    The presets are the two buckets that matter:

    • 720p: Widescreen 1280x720
    • 480p: Widescreen 832x480, Square 624x624

    Default is Square (1:1) 960×960 per the tooltip's default - though note the resolution list itself tops out at the 720p/480p tiers; the dropdown includes section headers (- 720p -) that aren't selectable resolutions.

    How it works

    Mechanically it's WAN's 8x VAE compression in a dropdown:

    • Latent shape: [batch, 16, 1, h//8, w//8] - 16 channels, 8x spatial, and a t of exactly 1 because it's a single image, not a clip.
    • vertical swaps width and height before the division.
    • There's a hard guard: the resolution must be divisible by 8, or it raises instead of silently making a misaligned latent.

    That t=1 shape is the detail that separates this from the video-latent node - mix them up and your sampler gets a latent with the wrong temporal dimension and tells you off with a shape error.

    Inputs and outputs

    • resolution - the dropdown; pick a real preset, not a section header.
    • vertical - swap to portrait.
    • batch_size - 1 unless you're batching.
    • Output: LATENT, wired to your WAN 2.2 I2V sampler.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/Maxed-Out-99/ComfyUI-MaxedOut.git
    

    Restart, or ComfyUI Manager → search "Maxed Out" → install. No extra dependencies.

    Troubleshooting

    • " is a header or invalid option" - you picked - 720p -. Choose the actual resolution below it.
    • "Resolution must be divisible by 8" - you somehow fed in a non-multiple. The presets are all safe; this guard exists for edge cases.
    • Shape mismatch with the video latent - you used the wrong sibling node. Image latent = this one (t=1), video latent = WAN2.2 Empty Latent Video MXD (with length). Each has its job.

    It's a thin utility - but in a WAN 2.2 I2V workflow, "the right image latent, with the right shape, zero thought" is exactly the kind of thing that keeps a graph from turning into a debugging session.

    CategoryWAN2.2/Latent

    Inputs (3)

    NameTypeDefaultDescription
    resolutionCOMBOSquare (1:1) 960×960Select target resolution preset.
    verticalBOOLEANfalseSwap width/height for vertical orientation.
    batch_sizeINT11–4096Number of latents to generate.

    Outputs (1)

    NameTypeDescription
    LATENTLATENT