module

MJ

Constants

FLUX1_MODELS = ["runware:100@1", "runware:101@1"]

FLUX.1 schnell and dev, on Runware. Kontext models are editors that take any size, so they aren't here.

NANO_DIMENSIONS = [{1024, 1024}, {1376, 768}, {768, 1376}, {1548, 672}, {1584, 672}, {1200, 896}, {896, 1200}, {1264, 848}, {848, 1264}]

Supported OUTPUT sizes for Nano Banana (google:4@x / Gemini image). The model rejects any other size with a 400 whose body lists its full supported set. These are the pairs we've confirmed valid in practice. ⚠ 1344×768 and 1536×672 are REJECTED — use 1376×768 and 1548×672 / 1584×672. (Reference INPUT images can be any size; only the requested OUTPUT w/h are fixed.)

VERSION = "0.13.4"

Class methods

nano_dimensions(width : Int32, height : Int32) : Tuple(Int32, Int32)

Nearest supported Nano output size to the requested aspect ratio.

Source
snap_dimensions(width : Int32, height : Int32, model : String = "") : Tuple(Int32, Int32)
Source

Nested types