Nodes/Radiance/Resolution
ComfyUI Node

Resolution

One dropdown that sets your resolution, latent channels, and even video length

By FXTD-Studios·Created 9 months ago·Updated 3 days ago· 249
Resolution
    • latent
    • width
    • height
    • channels
    • info
    • frame_rate
    • frame_count
    • latent_format
    • duration_sec
    • crop_bbox
    ◄presetCustom►
    ◄width1024►
    ◄height1024►
    ◄orientationAs Preset►
    ◄model_typeManual►
    ◄batch_size1►
    ◄scale_factor1.00►
    ◄latent_channels0►
    ◄mp_target0.0►
    ◄mp_aspect_ratio16:9►
    ◄enable_videofalse►
    ◄crop_to_resfalse►
    ◄frame_computationManual (Frames)►
    ◄duration_seconds5.0►
    ◄video_frames81►
    ◄frame_rate24►
    ◄model_meta►

    The boring-but-constant ComfyUI task is getting your empty latent to the right resolution and the right channel count. Get the resolution wrong and you waste VRAM; get the channels wrong and you get noise or flat color instead of an image, because a 16-channel Flux latent fed to a 4-channel SDXL setup doesn't gracefully degrade. ◎ Radiance Resolution bundles both decisions into one node: pick a preset, and it hands you a correctly-dimensioned, correctly-channelled empty latent plus every number you might need downstream.

    If you've been hand-typing width and height into Empty Latent Image every time, this is the upgrade. It's the kind of node you don't miss until you realize you've memorized "1024x1024, 16 channels, Flux" as a sequence you type into three different widgets.

    How it works

    It's a resolution calculator that returns a ready-made empty LATENT. Pick a preset from 43 built-ins - 4K DCI, 2K DCI, anamorphic 2.39:1, Super 35, IMAX, plus Flux/SDXL/SD1.5 quick picks and social ratios - and the node aligns the dimensions to 8-pixel steps, selects the right channel count from model_type (Flux/SD3 = 16 channels, SDXL/SD 1.5 = 4), and builds the latent tensor. An internal preview card shows you the aspect ratio, megapixels, and latent info before you commit.

    Three clever optional modes: orientation overrides a preset's native orientation (flip a landscape preset to portrait), scale_factor multiplies the whole thing (0.5 for a half-res test pass), and mp_target + mp_aspect_ratio let you say "give me 2 megapixels at 16:9" and have it solve for width and height. There's also a video mode: flip enable_video on and the same node produces a frame-count latent with a frame_rate, so a single node feeds both image and video pipelines.

    The inputs that matter

    • preset - the big dropdown. Set it and the width/height widgets are ignored (they only apply when preset is Custom).
    • model_type - Auto (Flux 16ch), Flux / SD3 (16ch), or SDXL / SD 1.5 (4ch). Get this right; it decides the latent channels.
    • batch_size - frames in the batch for images; flip enable_video and instead set video_frames and frame_rate.

    Outputs: the latent itself, then a small library of useful numbers - width, height, channels, info (a human-readable string), frame_rate, frame_count, duration_sec, and latent_format (a string like flux_16ch that you wire into Radiance Sampler Pro or Unified Loader's latent_format input so the sampler can validate channels).

    How to install it

    Part of the radiance pack. ComfyUI Manager → search "Radiance", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/fxtdstudios/radiance.git
    cd radiance
    pip install -r requirements_windows.txt
    

    Restart, and it's under FXTD Studios/Radiance/Image. It has an internal preview, so if that card isn't rendering, a hard refresh of your browser tab usually fixes it.

    Common issues

    Channel confusion is the classic trap, and it's worth spelling out because it's the reason this node exists: a 1024x1024 latent is meaningless without its channel count. If your output comes back as noise or a color wash, check that model_type matches the checkpoint you loaded - this is the modern, labeled version of the old "you loaded the wrong VAE" moment from the KB's VAE essay. Also note mp_target silently overrides preset and manual W/H whenever it's above 0, so if the node "ignores" your preset, a leftover megapixel target is why.

    For single-image tinkerers this is a convenience. For video or multi-res pipelines - where resolution, channels, and frame count all have to agree - it turns three error-prone widgets into one.

    CategoryFXTD STUDIOS/Radiance/Generate

    Inputs (17)

    NameTypeDefaultDescription
    presetCOMBOCustomResolution preset (Cinema or Social). The final width/height are automatically aligned for the selected 'model_type'. Select 'Custom' to use manual width/height.
    widthINT102464–16384Custom width (only used when preset is 'Custom'). Auto-aligned to 8px (32px for LTX Video).
    heightINT102464–16384Custom height (only used when preset is 'Custom'). Auto-aligned to 8px (32px for LTX Video).
    orientationCOMBOAs PresetOverride orientation. 'As Preset' uses the preset's native orientation.
    model_typeCOMBOManualDrives pixel alignment, video-latent shape, frame-count rules, latent_format, and the Est. VRAM readout. Flux/SD3/Cosmos = 16ch. SDXL/SD 1.5 = 4ch. Mochi = 12ch. MiniMax H3 = 24ch video-only (fixed 24fps, 17k+5 frame grid); pair with an audio latent + 'Concat AV Latent' for the full AV pipeline. 'Manual': no alignment/frame-count constraints; use 'latent_channels' for experimental/unlisted models. With model_meta connected it follows the Loader (🧲); a manual choice shows ✎. Est. VRAM assumes a full load; actual usage may be lower with DynamicVRAM/CPU offload active.
    batch_sizeINT11–64Number of latent frames in batch.
    scale_factoroptFLOAT1.000.1–4Scale the resolution by this factor after preset/custom. 0.5 = half res, 2.0 = double res. Applied before alignment.
    latent_channelsoptINT00–256Override latent channel count. 0 = use model_type default. Common: 4 (SD/SDXL), 12 (Mochi), 16 (Flux/SD3/Cosmos). Set manually for custom architectures.
    mp_targetoptFLOAT0.00–64MEGAPIXEL TARGET: When > 0, auto-calculates W×H from this MP target and mp_aspect_ratio. Overrides preset and custom W/H. 0 = disabled.
    mp_aspect_ratiooptCOMBO16:9Aspect ratio for megapixel target mode (only used when mp_target > 0).
    enable_videooptBOOLEANfalseEnable video sequence mode (replaces batch parameter).
    crop_to_resoptBOOLEANfalseMake crop_bbox the requested size inside the model-aligned one (e.g. 1920x1080 in LTX's 1920x1088, its 32px grid), so VAE Decode (HDR)'s crop_bbox input crops the alignment padding off. Off: crop_bbox is the full frame.
    frame_computationoptCOMBOManual (Frames)How the video frame count is set (video only). Manual uses video_frames as typed; Auto (Seconds) uses duration_seconds x frame_rate snapped to the model's stride*k+1 grid.
    duration_secondsoptFLOAT5.00.1–100000Target video duration in seconds (used when frame_computation = 'Auto (Seconds)'). Combined with frame_rate this must stay within video_frames' 100000 ceiling; a longer request is clamped with a warning.
    video_framesoptINT811–100000Total number of video frames. 5D-latent models require (stride*k+1) — e.g. 4k+1 for WAN/HunyuanVideo (1, 5, 9, 13...), 8k+1 for LTXV (1, 9, 17...), 6k+1 for Mochi (1, 7, 13...). MiniMax H3 uses its own 17k+5 grid instead (5, 22, 39, 56...). A warning is logged if this constraint is violated. Ignored when frame_computation = 'Auto (Seconds)'.
    frame_rateoptFLOAT241–120Playback frame rate.
    model_metaoptSTRINGOptional: connect the Loader's model_meta output, and model_type follows the loaded model.

    Outputs (10)

    NameTypeDescription
    latentLATENTEmpty latent tensor at the selected resolution.
    widthINTFinal image width (pixels).
    heightINTFinal image height (pixels).
    channelsINTLatent channel count.
    infoSTRINGResolution info string.
    frame_rateFLOATPlayback frame rate. Always the widget value — never 0.0.
    frame_countINTTotal video frames (or batch size for images).
    latent_formatSTRINGLatent format string, for reference.
    duration_secFLOATDuration in seconds (video_frames / frame_rate). 0.0 for images.
    crop_bboxBOUNDING_BOXCrop box {x, y, width, height} to remove model-alignment padding. Wire into RadianceHDRVAEDecode's crop_bbox input.