Skip to content
Node packVerifiedExternal
Open source

random_resolution_picker

ComfyUI custom node: weighted multiline resolution picker

Maintainer@JakoErrorUnratedgrade

Package profile

Status
Verified
Publisher
@JakoError
Source
GitHub

README

Random Resolution Picker

A ComfyUI node that randomly picks a width and height from a user-defined list on every generation.

Inputs

InputTypeDescription
resolutionsSTRING (multiline)One width,height per line (see format below)
auto_randomizeBOOLEANWhen true, picks a new pair every queue run (ignores seed)
seedINTFixed seed for deterministic picks when auto_randomize is false

Outputs

OutputTypeDescription
widthINTPicked width in pixels
heightINTPicked height in pixels
labelSTRINGHuman-readable label, e.g. 1664x928

Resolution list format

# Lines starting with # are comments and are ignored.
# Blank lines are also ignored.
1328,1328
1664,928
928,1664

Weighted entries

Duplicate lines intentionally increase probability. List a size twice to make it twice as likely:

# 1328x1328 is 2× more likely than 1664x928
1328,1328
1328,1328
1664,928

PNG metadata

When a Save Image node is downstream, this node writes its pick into the PNG metadata under the key RandomResolutionPicker:

{
  "resolution": "1664x928",
  "resolution_width": 1664,
  "resolution_height": 928,
  "resolution_seed": 1234567
}

Usage tip

Wire width and height directly into Empty Latent Image's width/height inputs.
With auto_randomize=true, every queue run picks a fresh resolution from your list.

Nodes in this pack

1 node
  • RandomResolutionPicker

Sources

3 sources
GitHubSourceVersion 73aaedda7ecec3bbad7d8a88ebddde5df7ef4ca2
github.com/JakoError/random_resolution_picker

Verified Oct 23

Source excerpts

1 excerpt

Source context: Repo JakoError/random_resolution_picker