Nodes/ComfyUI 1hewNodes/String Resolution Qwen Image 3.0 Pro
ComfyUI Node

String Resolution Qwen Image 3.0 Pro

Two Rungs, Two Megapixels, and a 23,552-Pixel Coin Flip

By 1hew·Created about a year ago·Updated 16 days ago· 35
String Resolution Qwen Image 3.0 Pro
  • image
  • string
◄selection1k►

Qwen's cloud image endpoint only offers two resolution tiers. Two. Which sounds like a node you could replace with a dropdown - until you notice the line between them sits at exactly 2,097,152 pixels, and a 1080p image lands 23,552 pixels under it.

What it is, and when you'd want it

String Resolution Qwen Image 3.0 Pro matches an input image to one of two labels - 1k or 2k - and outputs it as a string. No resizing, no request, no key.

It's a small piece of a bigger story: Qwen-Image won the open editing race with its Apache 2.0 Edit line, but the newer generation went out API-only, so a chunk of Qwen work now has a cloud hop in it. The 1hewOffice pack (same author, different install) wraps the Qwen Image 3.0 Pro endpoint, and its resolution input wants one of these two strings. This node is the interpreter between your pixels and that dropdown.

If you're on local Qwen weights, skip it. This is for the API path, where you're paying per call and want the size class to be right the first time.

How the matching works

Area, in log space: |log(w*h) - log(target_area)|, nearest wins.

| Tier | 1:1 official size | Target area | | --- | --- | --- | | 1k | 1024x1024 | 1,048,576 | | 2k | 2048x2048 | 4,194,304 |

With only two rungs, the boundary is the geometric mean: 2,097,152 pixels, i.e. exactly 2.10 MP. Practical fallout:

  • 1920x1080 = 2,073,600 → 1k. Frames it the other way, and people complain the node "gave them the wrong tier" - but it's a strict midpoint, and 1080p is a hair under it.
  • Padding 1080p out by about 12,000 pixels - a dozen extra rows on a 1920-wide image - flips it to 2k. That's how close this is. If you're hovering near 2 MP and you need 2k, resize deliberately rather than hoping.
  • 2048x2048 and anything above 2.10 MP → 2k.
  • Shape is irrelevant. A 4:3 image and a 16:9 image with the same megapixel count get the same label.

Multi-image batches are matched per frame and joined with newlines, one label per line.

Inputs and output

selection is the COMBO, default 1k. With image unconnected the node just forwards your choice - a plain string constant, which is exactly what text-to-image wants.

image is the optional IMAGE input; connect it and the label is inferred per frame.

string is the output, a STRING for the API node's resolution input, or any other text consumer in the graph.

Installing it

ComfyUI Manager → 1hewNodes → install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/1hew/ComfyUI-1hewNodes

The pack's requirements.txt is a full vision stack - opencv-python, scikit-image, psd-tools, color-matcher, ultralytics, rembg, transparent-background, onnxruntime, av, torchaudio - because this collection also covers masks, video IO, detection and tiling. A two-way string selector needs none of it; they install together regardless. Registration uses the newer comfy_api.latest schema API, so keep ComfyUI reasonably current, and note that an import failure on a node module is logged and skipped - a missing node in the menu, not an error dialog.

Where people get burned

A label is not a resize. If the actual pixels need to move, that's the pack's Image Resize Qwen Image 3.0 Pro, whose 1k/2k presets line up with these names. The API node combines the tier with a ratio string to decide the real output size.

Two tiers means less choice, not less cost. Bumping to 2k on a metered endpoint is the expensive direction; there's no 4k to accidentally ask for, at least.

Batches give you multiple lines - fine for text, wrong for a single field.

auto and dynamic aren't offered here on purpose. The API node infers those from a reference image or prompt; this node emits a concrete label you can log, branch on, or feed in directly.

A workflow from before v3.28.0 may show a missing node. The pack replaced its generic resolution selector with per-model nodes like this one - swap it in rather than reinstalling.

Category1hewNodes/text

Inputs (2)

NameTypeDefaultDescription
selectionCOMBO1k2 options: 1k, 2k
imageoptIMAGE—

Outputs (1)

NameTypeDescription
stringSTRING—