Nodes/MD Nodes/MD: Empty Latent Ratio Select
ComfyUI Node

MD: Empty Latent Ratio Select

A ComfyUI node in MD_Nodes/Utility with 8 inputs and 3 outputs.

By MDMAchine·Created about a year ago·Updated 2 months ago· 14
MD: Empty Latent Ratio Select
    • latent
    • width
    • height
    ratio_preset16:9 (Standard)
    orientationLandscape (Horizontal)
    base_mp_presetSDXL (1024x1024) - 1.0 MP
    manual_mp_size1.0
    dimension_scale1.00
    batch_size1
    debug_mode0 - Silent
    enable_profilingfalse
    CategoryMD_Nodes/Utility

    Inputs (8)

    NameTypeDefaultDescription
    ratio_presetCOMBO16:9 (Standard)ASPECT RATIO • Purpose: Defines the width-to-height relationship. • Options: 1:1, 16:9, 21:9, 32:9, etc. • Trade-offs: Extreme ultrawide ratios may cause duplicate subjects if model isn't trained for it. ⭐ Recommended: 16:9 for standard outputs, 1:1 for social media.
    orientationCOMBOLandscape (Horizontal)ORIENTATION • Purpose: Rotates the selected aspect ratio. • Options: Landscape (Width > Height) or Portrait (Height > Width). • Trade-offs: Ensure orientation matches prompt intent (e.g., Portrait for character art). ⭐ Recommended: Landscape for environments, Portrait for characters.
    base_mp_presetCOMBOSDXL (1024x1024) - 1.0 MPMEGAPIXEL TARGET • Purpose: Sets the total resolution/quality class of the generation. • Options: SD1.5 (0.26 MP), SDXL (1.0 MP), 1080p (2.0 MP), 4K (8.3 MP), or Custom. • Trade-offs: Higher MP targets exponentially increase VRAM usage and generation time. ⭐ Recommended: Match this exactly to your underlying model's training resolution (e.g., SDXL = 1.0 MP).
    manual_mp_sizeFLOAT1.00.1–16CUSTOM MEGAPIXELS • Purpose: Sets a specific resolution target when 'base_mp_preset' is set to 'Custom'. • Range: 0.1 to 16.0 MP. • Trade-offs: Pushing models beyond their trained MP limit can cause compositional artifacting. ⭐ Recommended: 1.0 (Standard SDXL) or 2.0 (FLUX).
    dimension_scaleFLOAT1.000.1–4DIMENSION SCALE • Purpose: Linear multiplier for the final calculated dimensions. • Options: 0.5 (Half resolution), 1.0 (Default), 2.0 (Double resolution). • Trade-offs: Quickly scales up/down testing renders without changing the MP target logic. ⭐ Recommended: 1.0 for final outputs, 0.5 for rapid testing.
    batch_sizeINT11–64BATCH SIZE • Purpose: Number of latent samples to generate in a single batch. • Range: 1 to 64. • Trade-offs: VRAM usage scales linearly with batch size. ⭐ Recommended: 1 to 4 depending on GPU VRAM.
    debug_modeCOMBO0 - SilentLOGGING VERBOSITY • Purpose: Controls console output and enables analytical reporting. • Options: 0 (Production), 1 (Shows calculated WxH and timing). ⭐ Recommended: 0 - Silent.
    enable_profilingBOOLEANfalseENABLE PROFILING • Purpose: Measure timing of mathematical operations and tensor allocations. • Note: Automatically enabled if debug_mode is 1 - Info. ⭐ Recommended: False.

    Outputs (3)

    NameTypeDescription
    latentLATENT
    widthINT
    heightINT