Nodes/zsq_prompt/Pixel Latent
ComfyUI Node

Pixel Latent

The name lies — it's just EmptyLatentImage with a preset menu

By windfancy·Created 2 years ago·Updated 5 months ago· 2
Pixel Latent
    • latent
    resolution1024 x 1024
    batch_size1

    Pixel Latent sounds like something that makes pixels. It doesn't. Read the source and the whole thing is one line of substance: it builds an empty (all-zeros) latent tensor at whatever resolution you pick, on your GPU. That's exactly what core ComfyUI's EmptyLatentImage does - the only real difference is this node hands you a dropdown of 33 common resolutions and a batch slider instead of two number boxes.

    Which is fine, honestly. Every text-to-image workflow starts with an empty latent: you need a blank canvas in latent space for the sampler to denoise from. A resolution menu is a genuine convenience if you keep typing the same SDXL sizes over and over. Just don't expect any new capability - this is a quality-of-life clone, not a feature. If EmptyLatentImage is already in your muscle memory, you can skip it and miss nothing.

    How it works: the source is essentially torch.zeros([batch_size, 4, height // 8, width // 8]). Four channels and the 8x downscale per side are the VAE's doing - the SD1.5, SDXL, and Flux family all compress 8x into 4 latent channels. Zeros, not noise, and that's fine: the sampler adds its own noise at the start of its job, so the "blank" canvas gets its random start from the sampler's seed. The batch_size input (1–20) just gives you N copies in one tensor, which you'd feed to the KSampler's batch dimension to generate several images in one pass.

    Inputs you actually set: resolution - a "width x height" string from the preset list, default 1024 x 1024. Pick something in your model's native range; upsampling a too-small latent later is a fix you don't want to need. And batch_size, if you're batching. Output is one LATENT, which wires straight into KSampler, then VAE Decode, then Save.

    One real limitation to know before you commit: the dropdown is preset-only. You can't type a custom size, so if you want something like 1024 x 1536 that isn't in the list, you're out of luck - reach for core EmptyLatentImage (or this pack's sibling Ratio Latent) instead.

    Install is the same for every node in this pack: ComfyUI Manager, search "zsq_prompt", install, restart. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/windfancy/zsq_prompt
    

    then restart ComfyUI. The requirements.txt pulls in heavy stuff - transformers, opencv-python, onnx, ultralytics, timm - almost all of it for the pack's image and segment nodes rather than this one, but you still pay the install time for the whole pack. No model downloads for this node. The README is basically empty, so expect nothing in the way of docs.

    And the usual pack-level noise: Manager sometimes flags zsq_prompt as conflicting with other packs even when you don't have it installed. If your workflow doesn't use these nodes, ignore that message - it's a false alarm, not a reason to uninstall something.

    CategoryZSQ/utils

    Inputs (2)

    NameTypeDefaultDescription
    resolutionCOMBO1024 x 102433 options: width x height, 128 x 128, 256 x 256, 512 x 512, 512 x 768, 576 x 1024, +27
    batch_sizeINT11–20

    Outputs (1)

    NameTypeDescription
    latentLATENT