Nodes/Binyuan Latent Helper/📏 binyuan · 中文Latent快捷助手 v2.0
ComfyUI Node

📏 binyuan · 中文Latent快捷助手 v2.0

Binyuan's Chinese-labeled empty-Latent preset node

By yjitiu·Created 3 months ago·Updated 3 months ago· 1
📏 binyuan · 中文Latent快捷助手 v2.0
    • Latent
    • 宽度
    • 高度
    预设选择
    宽度1024
    高度1024
    批次大小1
    宽高对调false

    Every workflow starts with an empty latent. And every workflow that uses an SDXL-family model needs a specific empty latent - 1216×832 for 3:2, 1152×896 for 4:3, 1344×768 for 16:9 - because these models are trained at native ratios and fight you everywhere else. Memorizing them is a waste of brain space. Binyuan's Latent Helper is a one-node pack that just... keeps them for you.

    There's no model to download, no API key, nothing heavy at all. This is the smallest custom node you'll install all week, and it's genuinely handy if you bounce between aspect ratios and don't want to retype dimensions every time.

    What it actually does

    Pick 📏 binyuan · 中文Latent快捷助手 v2.0 (category Latent助手), choose a preset, and it hands you two things: an all-zero latent tensor and the actual width/height as integer ports. The name says "helper" and it means it - it's a quality-of-life wrapper around ComfyUI's built-in EmptyLatentImage, not a replacement for it.

    The mechanism is about as simple as a custom node gets. The preset is just a lookup; then it builds the tensor with torch.zeros([batch, 4, H//8, W//8]). That //8 is the important bit - it's not arbitrary. VAEs downsample 8× per side, so a 1024×1024 image is a 128×128 latent. You never type the latent dimensions yourself; the node does the division for you, then returns the pixel size on the 宽度/高度 outputs so you can feed the real resolution to anything that needs it.

    The inputs that matter

    • 预设选择 - the whole point. Sixteen presets, including the SDXL standards (1216x832, 1344x768, 1024x1536), phone-wallpaper shapes, 2K sizes, and a 512x512 (老模型专用) for SD 1.5. Pick 自定义 and the width/height inputs take over.
    • 宽度 / 高度 - 64–8192, stepped by 8. Multiple-of-8 matters because it keeps the latent dimensions whole after that /8.
    • 宽高对调 - one toggle to swap W/H. Handy for flipping a horizontal setup vertical; the 宽度/高度 outputs reflect the swap.

    Outputs: Latent (LATENT), plus 宽度 and 高度 (INT). Wire Latent into a KSampler's latent input and you're off. The INT ports are the sleeper feature - feed them into anything that needs the real pixel size instead of hardcoding it.

    Install

    ComfyUI Manager: search Binyuan Latent Helper. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/yjitiu/ComfyUI-Binyuan-Latent-Helper.git binyuan_latent_helper
    

    Restart ComfyUI. That's it - the pyproject declares zero dependencies and there are no model files, so this one can't drag your install into dependency hell. The UI is bilingual (Chinese/English), which is where most of its existing audience is, but nothing blocks you from using it cold.

    Where people get burned

    The one real trap is in the README, stated plainly: this makes a 4-channel latent. That's SD 1.5 and SDXL territory. Flux and the other modern 16-channel models need their loader's own empty-latent node - feed this thing's output into a Flux sampler and you'll get a mismatch error or garbage, not a subtle degradation. Everything else is low-risk because there's almost nothing to break: no dependencies, no separate config. If a preset's numbers look off, remember they're pixel dimensions, and let the node handle the /8.

    CategoryLatent助手

    Inputs (5)

    NameTypeDefaultDescription
    预设选择COMBO16 options: 自定义, 1024x1024 (1:1 正方形), 1024x1536 (2:3 常见竖屏), 1536x1024 (3:2 常见横屏), 1080x1920 (手机壁纸), 1920x1080 (高清横屏), +10
    宽度INT102464–8192
    高度INT102464–8192
    批次大小INT11–64
    宽高对调BOOLEANfalse

    Outputs (3)

    NameTypeDescription
    LatentLATENT
    宽度INT
    高度INT