Nodes/ComfyUI 1hewNodes/String Resolution Doubao Seedream 5.0 Pro
ComfyUI Node

String Resolution Doubao Seedream 5.0 Pro

1080p Counts as 1.5k on Seedream — Resolution Matching, Explained

By 1hew·Created about a year ago·Updated 16 days ago· 35
String Resolution Doubao Seedream 5.0 Pro
  • image
  • string
◄selection1k►

Hand a 1920x1080 image to an API model with a resolution dropdown and most people pick 2k, because 1080p feels like a big number. On Doubao Seedream 5.0 Pro, it isn't. That image is a 1.5k image, and this node will tell you so before you spend a credit finding out.

What it is, and when you'd want it

String Resolution Doubao Seedream 5.0 Pro looks at each input image and outputs the nearest resolution tier label from the three Seedream 5.0 Pro accepts: 1k, 1.5k, 2k. One string out. It doesn't resize, it doesn't call anything, and it needs no key.

Why it exists: Seedream is a ByteDance API product - the whole Seedream line is closed, no weights, so there's no local option at any VRAM - and such endpoints generally bill and shape output by a tier label, not by your pixel dimensions. The 1hewOffice pack's Doubao Seedream 5.0 Pro node has a resolution input that wants one of those labels; this node's string output goes there. Two packs, one author, same idea: describe the image in the API's vocabulary so nothing gets silently reinterpreted between your canvas and the server.

You'd also use it with Image Resize Doubao Seedream 5.0 Pro, the pixel-side sibling, so the image you upload and the tier you request agree.

How the matching works

This one doesn't look at shape at all - it compares total pixel area to each tier's target area, again in log space: |log(w*h) - log(target_area)|. The targets are the official 1:1 sizes for each tier.

| Tier | 1:1 official size | Target area | Band (geometric midpoint to midpoint) | | --- | --- | --- | --- | | 1k | 1024x1024 | 1,048,576 | below ~1.57 MP | | 1.5k | 1536x1536 | 2,359,296 | ~1.57 MP to ~3.15 MP | | 2k | 2048x2048 | 4,194,304 | above ~3.15 MP |

Those band edges are exact geometric means, not rounded marketing numbers: the 1k/1.5k boundary sits at 1,572,864 pixels (1024x1536) and the 1.5k/2k boundary at 3,145,728. In practice:

  • 1920x1080 = 2.07 MP → 1.5k.
  • 1024x1024 → 1k. 2048x2048 → 2k.
  • 1500x1000 = 1.5 MP, just under the line → 1k. Yes, really.
  • Because it's log area, 4:3 and 16:9 images of the same megapixel count land in the same tier - shape is irrelevant here.

Batch input is matched frame by frame, and the labels come out newline-joined, one per image.

Inputs and output

selection is the COMBO, default 1k. Leave image unconnected and the node simply emits what you picked - a string constant you can point at, useful for a fixed tier across a whole session, or for text-to-image where there's nothing to infer.

image is the optional IMAGE input. Connect it and the nearest tier comes out per frame.

string is the output, a STRING for the API node's resolution input - or anything else downstream that takes text.

Installing it

ComfyUI Manager → search 1hewNodes → install → restart. By hand:

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

The pack's requirements are heavy for what this node does - opencv-python, scikit-image, psd-tools, color-matcher, ultralytics, rembg, transparent-background, onnxruntime, av, torchaudio - because it's one pack covering image, video, mask and detection nodes. You get all of it for one string helper. Node registration goes through the newer comfy_api.latest schema API, so keep ComfyUI reasonably current; if a dependency fails, the pack logs the import error and the affected node just won't appear in the menu.

Where people get burned

It reports, it doesn't resize. The tier label describes the size class your image belongs to. If you want the actual pixels to sit at that tier, use Image Resize Doubao Seedream 5.0 Pro; the API node then combines the label with the ratio string.

Bigger tier, bigger bill. On metered API nodes the tier is a price signal as much as a size. Getting the label right is the cheapest way to avoid paying for a 2k render of a 1.5 MP source.

Batches produce multi-line strings. One line per image. A single resolution field wants one value.

It's area, not longest edge. A 2048x512 strip is 1.05 MP → 1k, even though one side is 2048. Nothing is wrong; you're just asking a different question than you thought.

Old workflows break on upgrade. v3.28.0 replaced the generic String Resolution node with per-model selectors. A workflow saved before that will show a missing node until you drop in this one.

Category1hewNodes/text

Inputs (2)

NameTypeDefaultDescription
selectionCOMBO1k3 options: 1k, 1.5k, 2k
imageoptIMAGE—

Outputs (1)

NameTypeDescription
stringSTRING—