Sign In

UW Custom Node - Prompt Aspect Size Resolver — Wildcard [W:H] → Latent W/H (ComfyUI)

Download

1 variant available

Archive Other

ComfyUI-PromptAspectSize-v1.0.0.zip

4.06 KB

Verified:

Type
Other
Stats

37

Reviews
Published

Jul 19, 2026

Base Model

Krea 2

Hash
AutoV2
89D7BE5C91
default creator card background decoration
Followers - 2

2

Likes - 18

18

krea2_painterly_scene_00018_clean.png

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.