Nodes/Chye ComfyUI Toolset/πŸ”Ή CYH Latent | Social Media Aspect Ratio
ComfyUI Node

πŸ”Ή CYH Latent | Social Media Aspect Ratio

All 12 social-media sizes in one dropdown

By chyerΒ·Created about a year agoΒ·Updated 6 months agoΒ· 1
πŸ”Ή CYH Latent | Social Media Aspect Ratio
    • LATENT
    β—„aspect_ratioInstagram Square (1:1) - 1080Γ—1080β–Ί
    β—„orientationLandscapeβ–Ί
    β—„multiplier1.0β–Ί
    β—„batch_size1β–Ί

    If you generate social content, you know the drill: Instagram square is 1080Γ—1080, stories are 1080Γ—1920, Twitter headers are a weird 1500Γ—500, and remembering all of them on demand is a small recurring tax. This node is that list turned into a dropdown - twelve platform formats, each with the resolution baked into the label, producing an empty latent.

    It's the social-media member of the Chye ComfyUI Toolset latent family, and the biggest preset list of the bunch. Everything else about it works like the pack's other aspect nodes.

    How it works

    Standard pack pattern: the label carries the size (Instagram Square (1:1) - 1080Γ—1080), the node parses it, applies orientation and multiplier, rounds to a multiple of 32, and makes a zeroed tensor:

    latent = torch.zeros([batch_size, 4, final_height // 8, final_width // 8])
    

    A LATENT out, straight into a KSampler. Nothing platform-aware about it - these are just resolutions, not exports; the node won't resize your final image to fit Instagram's upload rules.

    The presets

    • Instagram - Square 1080Γ—1080, Portrait 1080Γ—1350, Landscape 1080Γ—608, Stories/Reels 1080Γ—1920
    • TikTok - Standard 1080Γ—1920, Wide 1920Γ—1080
    • YouTube - Standard 1920Γ—1080, Shorts 1080Γ—1920
    • Facebook - Feed 1200Γ—630, Stories 1080Γ—1920
    • Twitter/X - Tweet 1200Γ—675, Header 1500Γ—500

    That's a genuinely useful lookup table, and the 1500Γ—500 Twitter header is the kind of number nobody keeps in their head.

    The inputs that matter

    • aspect_ratio - the twelve presets above.
    • orientation - Portrait/Landscape, default Landscape. Same caveat as the rest of the pack: the default is static. The README again promises platform-smart orientation ("Portrait for Instagram Stories, Landscape for YouTube Standard") but the code just defaults the dropdown to Landscape - it won't flip when you pick a portrait format. Set it yourself, especially for anything 9:16.
    • multiplier - 0.1–10.0. Watch the megapixels: most of these are right around 1–2MP. On a 1MP-native model, 1080Γ—1920 (2MP) wants a ~0.7 multiplier and an upscale later; on newer 1–2MP-band models it's fine as-is.
    • batch_size - 1–64. Genuinely nice here: build a batch of blank latents and run a whole platform's worth of images in one grid.

    Install

    ComfyUI Manager (search "Chye ComfyUI Toolset"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/chyer/Chye-ComfyUI-Toolset
    cd Chye-ComfyUI-Toolset
    pip install -r requirements.txt
    

    Restart ComfyUI. Deps: scipy, opencv-python plus requests/coloredlogs; torch and numpy are already there. Zip installs need the .git/.cnr-id file (Chye-ComfyUI-Toolset) per the README.

    Honest verdict

    The best use of this node is the batch workflow: pick a format, set batch to 4, get four images in the right aspect for your campaign in one pass. For a single image you could just type the numbers - but the header size you always forget is right there in the label.

    Categorylatent

    Inputs (4)

    NameTypeDefaultDescription
    aspect_ratioCOMBOInstagram Square (1:1) - 1080Γ—108012 options: Instagram Square (1:1) - 1080Γ—1080, Instagram Portrait (4:5) - 1080Γ—1350, Instagram Landscape (1.91:1) - 1080Γ—608, Instagram Stories (9:16) - 1080Γ—1920, TikTok Standard (9:16) - 1080Γ—1920, TikTok Wide (16:9) - 1920Γ—1080, +6
    orientationCOMBOLandscape2 options: Portrait, Landscape
    multiplierFLOAT1.00.1–10β€”
    batch_sizeINT11–64β€”

    Outputs (1)

    NameTypeDescription
    LATENTLATENTβ€”