Trending Model:#1Inklingthinkingmachines⬇16kTrending Model:#2Ternary-Bonsai-27B-ggufprism-ml⬇432kTrending Model:#3Bonsai-27B-ggufprism-ml⬇1405kTrending Model:#4Unlimited-OCRbaidu⬇2237kTrending Model:#5GLM-5.2zai-org⬇545kTrending Model:#6Qwythos-9B-Claude-Mythos-5-1M-GGUFempero-ai⬇2133kTrending Model:#7Qwen3.6-27B-Fable-Fusion-711-Uncensored-Heretic-NM-DAU-NEO-MAX-MTP-GGUFDavidAU⬇63kTrending Model:#8krea2-identity-editconradlocke⬇0kTrending Model:#9Qwen3.6-35B-A3B-Uncensored-HauhauCS-AggressiveHauhauCS⬇1998kTrending Model:#10OvisOCR2ATH-MaaS⬇17kTrending Model:#1Inklingthinkingmachines⬇16kTrending Model:#2Ternary-Bonsai-27B-ggufprism-ml⬇432kTrending Model:#3Bonsai-27B-ggufprism-ml⬇1405kTrending Model:#4Unlimited-OCRbaidu⬇2237kTrending Model:#5GLM-5.2zai-org⬇545kTrending Model:#6Qwythos-9B-Claude-Mythos-5-1M-GGUFempero-ai⬇2133kTrending Model:#7Qwen3.6-27B-Fable-Fusion-711-Uncensored-Heretic-NM-DAU-NEO-MAX-MTP-GGUFDavidAU⬇63kTrending Model:#8krea2-identity-editconradlocke⬇0kTrending Model:#9Qwen3.6-35B-A3B-Uncensored-HauhauCS-AggressiveHauhauCS⬇1998kTrending Model:#10OvisOCR2ATH-MaaS⬇17k

Comfyui-ResolutionAndAspectRatio: Smart Prompt-Based Resolution Picker

Close up object of a futuristic resolution aspect ratio control panel with holographic interface with sliders.

The Comfyui-ResolutionAndAspectRatio custom node for ComfyUI converts a chosen megapixel budget and aspect ratio into precise pixel dimensions. It can automatically detect the aspect ratio from words in your prompt, or you can set it manually using a dropdown. With 23 built-in ratios and a keyword matching system, it hands your image generation a consistent, predictable resolution every time.

Dawncreatescode who also made ComfyUI-Pin-Node-Input and Comfyui-PromptHistory built this node to eliminate the guesswork when setting image resolutions in ComfyUI. It acts as a smart resolution picker that can either follow your prompt’s clues or let you pick a ratio directly. Whether you need a fixed 21:9 cinematic output or want to randomize for variety, the node adapts effortlessly.

How the node picks your aspect ratio

Key Features
  • Converts megapixel target and ratio to exact pixels.
  • Detects aspect ratio automatically from prompt text.
  • Overrides ratio by typing 16:9 or similar in prompt.
  • Maps keywords like cinematic to weighted ratio pools.
  • Randomizes ratio per run with seed control.
  • Edits keyword rules without restarting ComfyUI.

This node is ideal for ComfyUI workflows where prompt text guides the final image dimensions. It covers anything from vertical mobile shots to expansive cinematic landscapes, removing the need to manually compute resolutions. Users can rely on fixed ratios, let the node randomize, or have keywords dictate the format.

Behind the smart detection system

The detection system follows a strict order: explicit ratios written in the prompt always take priority, then keyword matches, then the fallback dropdown. Dawncreatescode chose the Limited keyword mode as default to avoid false triggers from words like "portrait" that might describe a subject rather than a format. Users should note that the divisible_by setting may round dimensions, slightly deviating from the exact ratio for model compatibility.

"The ratio output always tells you what fired - 21:9 (from prompt), 16:9 (cinematic), 4:5 (fallback)." — Source: GitHub