Nodes/fxai-toolkit/凤希AI - 宽高-按比例V2
ComfyUI Node

凤希AI - 宽高-按比例V2

The ratio node with half-dimensions baked in, for split-layout workflows

By fxai666·Created 4 months ago·Updated 4 days ago· 35
凤希AI - 宽高-按比例V2
    • 宽度
    • 高度
    • 半宽
    • 半高
    • 对齐基数
    最大边长1300
    宽比例3
    高比例4
    对齐基数64

    FxAiMaxRatioSizeV2 (凤希AI - 宽高-按比例V2) is the sequel to the ratio calculator, and the only real difference is the outputs: V1 gives you width, height, and the alignment base; V2 gives you width, height, half-width, half-height, and the alignment base - plus it defaults to a 64 alignment instead of 32. Same ratio-in, grid-aligned-dimensions-out math (scale to fit the max edge, floor to the base multiple), one extra set of outputs that exists for a very specific reason: split-layout and multi-crop workflows.

    When do you actually need half dimensions? Any time you're building a two-panel composite - a before/after comparison, a stereo pair, a split-screen video layout - you reach for "half the width at the same height" constantly. V2 hands you both halves precomputed so you don't wire the width through a divide node and hope integer division lands where you want. The 对齐基数 default bump to 64 matters too: modern video latents (and the H3/LTX families this pack is built around) like 64-aligned dimensions, and the default now matches that instead of making you remember to change it. If you're on an older image model that wants 8 or 16, drop it yourself - the field's still there.

    Inputs are identical to V1: 最大边长 (default 1300), 宽比例 / 高比例 (default 3:4), 对齐基数 (default 64). Note V2 dropped the 尺寸反转 toggle from V1 - if you wanted swapped dimensions, you swap the ratio numbers yourself; the trade for the extra half-dimension outputs.

    Outputs: 宽度, 高度, 半宽, 半高 (all INT), plus 对齐基数 passthrough. For most people this is a strictly-better version of V1 - the only reason to stay on V1 is the 尺寸反转 toggle or a fondness for 32-aligned defaults.

    Install: ComfyUI Manager → search "fxai-toolkit", or cd ComfyUI/custom_nodes && git clone https://github.com/fxai666/fxai-toolkit, restart. Pack auto-installs soundfile/psutil, wants FFmpeg on PATH for the audio paths, and - the standing gotcha - every label is Chinese (凤希AI builds for a Chinese-speaking community; help in QQ group 775649071 and Bilibili). 半宽/半高 are "half width"/"half height."

    The one thing to keep straight: half-width is width // 2, plain integer division. If you need a model-friendly half (i.e. the half itself aligned to 64), the node won't do that for you - it halves the already-aligned full dimension, and the half may not land on the same grid. For composite layouts that's usually fine; for feeding the half directly into a latent, add your own align. Beyond that it's a two-second node that does exactly what it says: ratio in, ready-to-use sizes out, both full and half.

    Category凤希AI/工具

    Inputs (4)

    NameTypeDefaultDescription
    最大边长INT130064–4096
    宽比例INT31–20
    高比例INT41–20
    对齐基数INT642–128

    Outputs (5)

    NameTypeDescription
    宽度INT
    高度INT
    半宽INT
    半高INT
    对齐基数INT