CivArchive
    UW Custom Node - Prompt Aspect Size Resolver — Wildcard [W:H] → Latent W/H (ComfyUI) - v1.0
    Preview 137158655

    Prompt Aspect Size Resolver (ComfyUI)

    v1.0.0 · Companion node for aspect-marked wildcard prompts

    A small ComfyUI utility that sits after Impact Pack wildcard expansion.

    It:

    1. Reads a trailing aspect marker like [3:4] or [16:9] from the expanded prompt

    2. Strips that marker so it never hits CLIP

    3. Computes width / height from your megapixel target

    4. Optionally restores JSON braces ([[[ / ]]]{ / }) for JSON-style templates

    Built to pair with UW Modular NSFW Wildcards (Advanced zip), but it works with any prompt that ends in [W:H].

    Wire it like this

    ImpactWildcardProcessorPrompt Aspect Size Resolver → CLIP (cleaned_text) + Empty Latent (width / height)

    Optional: send detected_ar to a ShowText node for debugging.

    Widgets

    • megapixels — target image size budget (set per model / workflow)

    • default_aspect_ratio — used when no trailing marker is present (default 3:4)

    • divisible_by — snap W/H (default 16)

    • restore_json_braces — on by default for JSON wildcard templates

    Install

    1. Download the zip from this page

    2. Extract into ComfyUI/custom_nodes/ComfyUI-PromptAspectSize/

    3. Restart ComfyUI

    4. Add node: Prompt Aspect Size Resolver (category utils/prompt)

    Works with

    • ComfyUI + Impact Pack (ImpactWildcardProcessor)

    • UW Modular Advanced wildcards (markers already in templates)

    • Any hand-written or wildcard prompt ending in [W:H]

    Supported marker examples: [9:16], [2:3], [3:4], [4:3], [3:2], [16:9], [23:9]

    For the full photoreal Krea 2 wildcard framework (Basic + Advanced), see my UW Modular NSFW Wildcards model page and use the Advanced zip with this node.

    Notes

    • If you skip this node, use the Basic wildcard zip (no markers) or markers may leak into CLIP text.

    • This node does not generate images by itself — it’s prompt post-processing + size math only.

    Changelog

    v1.0.0 — Initial public release: PromptAspectSizeResolver (clean text + W/H + detected AR + optional JSON brace restore).


    Version notes / changes field (short)

    v1.0.0

    • Prompt Aspect Size Resolver node

    • Strip trailing [W:H] from expanded prompts

    • Output cleaned text + width + height + detected AR

    • Megapixels / default AR / divisible_by widgets

    • Optional [[[/]]]{/} JSON brace restore

    • Companion for UW Modular Advanced wildcards (works with any [W:H] prompt)


    File note on the upload

    ComfyUI-PromptAspectSize-v1.0.0.zip — Extract to custom_nodes/ComfyUI-PromptAspectSize/. Requires ComfyUI restart. Use after ImpactWildcardProcessor.

    Description

    v1.0.0

    • Prompt Aspect Size Resolver node

    • Strip trailing [W:H] from expanded prompts

    • Output cleaned text + width + height + detected AR

    • Megapixels / default AR / divisible_by widgets

    • Optional [[[/]]]{/} JSON brace restore

    • Companion for UW Modular Advanced wildcards (works with any [W:H] prompt)

    Other
    Krea 2

    Details

    Downloads
    33
    Platform
    CivitAI
    Platform Status
    Available
    Created
    7/19/2026
    Updated
    7/22/2026
    Deleted
    -

    Files

    uwCustomNodePromptAspectSize_v10.zip

    Mirrors