Nodes/Painting Coder Utils/Image Latent Creator Plus ✨
ComfyUI Node

Image Latent Creator Plus ✨

Empty latents in SDXL *and* Midjourney aspect ratios, batch included

By jammyfu·Created 2 years ago·Updated 2 years ago· 16
Image Latent Creator Plus ✨
    • latent
    • resolution
    • width
    • height
    • batch_size
    mode
    style
    resolution
    batch_size1
    scale_factor1.0

    Image Latent Creator Plus is what you get when the pack's plain latent creator grows a second dimension catalog. Same "empty latent, ready for the KSampler" job as its non-Plus sibling, but the resolution dropdown now carries the Midjourney-standard aspect ratios alongside the SDXL ones - so if you're building a canvas that matches a reference composition or a specific platform crop, there's a preset for it instead of you hand-typing dimensions.

    It's the latent version of Image Size Creator Plus ✨ in the Painting Coder Utils pack, and it's the newest node family (added in v0.3.5).

    How it works

    A style selector (SDXL or Midjourney) picks which resolution catalog you're choosing from. SDXL gives you the nine training-optimal buckets (1:1 at 1024×1024, 3:2 at 1216×832, 7:4 at 1344×768, and so on); Midjourney adds its own standard set like 16:9 (1456×816), 2:1 (1536×768), and 5:6 (992×1200). The front-end filters those options by your mode (Landscape / Portrait / Square), so you only see ratios that fit the orientation you picked.

    Under the hood it's the same deal as the non-Plus node: scale_factor multiplies the chosen resolution, batch_size (1–64) sets how many samples go in the tensor, and the node allocates a zero-filled latent of shape [batch_size, 4, height/8, width/8] - the 8× downsample per side being the VAE's compression into the latent space the diffusion model works in.

    Inputs and outputs that matter

    • mode - Landscape, Portrait, or Square.
    • style - SDXL or Midjourney resolution catalog.
    • resolution - the preset list (19 options after de-duplication).
    • scale_factor - 0.1 to 10, default 1.
    • batch_size - 1 to 64.
    • Outputs: latent for the KSampler, plus resolution, width, height, and batch_size as numbers you can route to conditioning or metadata nodes.

    Where it earns its keep

    If you mostly generate square or the classic SDXL ratios, the plain creator is enough and this is overkill. Where Plus pays off is when you care about a specific composition or aspect - matching a Midjourney reference, hitting a 16:9 or 2:1 crop for a platform - and you want a one-click preset instead of arithmetic. It's also the one to reach for if you're building a batch at a non-square ratio and want the width/height outputs feeding the rest of the graph.

    Install

    ComfyUI Manager → search Painting Coder Utils, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/jammyfu/ComfyUI_PaintingCoderUtils.git
    

    Restart ComfyUI. Nothing to download - the pack's dependencies (numpy, Pillow, torch, gradio) are already in any working ComfyUI, and there are no model files. Old-workflow gotcha is the same as the rest of the pack: pre-v0.3.0 class names fail to resolve, and jammyfu's fixer tool at docs/fix/workflow_fixer.html repairs the JSON.

    Category🎨Painting👓Coder/🖼️Image

    Inputs (5)

    NameTypeDefaultDescription
    modeCOMBO3 options: Landscape, Portrait, Square
    styleCOMBO2 options: SDXL, Midjourney
    resolutionCOMBO19 options: 6:5 (1200x992), 4:3 (1232x928), 7:4 (1344x768), 7:9 (896x1152), 2:3 (832x1216), 16:9 (1456x816), +13
    batch_sizeINT11–64
    scale_factorFLOAT1.00.1–10

    Outputs (5)

    NameTypeDescription
    latentLATENT
    resolution*
    widthINT
    heightINT
    batch_sizeINT