From 9d86b19e38295f7d0078c82798838d4846fed67f Mon Sep 17 00:00:00 2001 From: Sirshendu Ganguly Date: Thu, 9 Oct 2025 13:47:35 -0400 Subject: [PATCH 1/3] Add 2K and 4K resolution presets to image inference - Added 2K presets: 2048x2048, 2304x1728, 1728x2304, 2560x1440, 1440x2560, 2496x1664, 1664x2496, 3024x1296 - Added 4K presets: 4096x4096, 4608x3456, 3456x4608, 5120x2880, 2880x5120, 4992x3328, 3328x4992, 6048x2592 - Updated max width from 2048 to 6048 pixels - Updated max height from 2048 to 5120 pixels --- modules/imageInference.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/imageInference.py b/modules/imageInference.py index 2d18f13..6671e4d 100644 --- a/modules/imageInference.py +++ b/modules/imageInference.py @@ -33,7 +33,14 @@ class txt2img: "dimensions": ([ "None", "Square (512x512)", "Square HD (1024x1024)", "Portrait 3:4 (768x1024)", "Portrait 9:16 (576x1024)", "Landscape 4:3 (1024x768)", - "Landscape 16:9 (1024x576)", "Custom" + "Landscape 16:9 (1024x576)", + "2K Square 1:1 (2048x2048)", "2K 4:3 (2304x1728)", "2K 3:4 (1728x2304)", + "2K 16:9 (2560x1440)", "2K 9:16 (1440x2560)", "2K 3:2 (2496x1664)", + "2K 2:3 (1664x2496)", "2K 21:9 (3024x1296)", + "4K Square 1:1 (4096x4096)", "4K 4:3 (4608x3456)", "4K 3:4 (3456x4608)", + "4K 16:9 (5120x2880)", "4K 9:16 (2880x5120)", "4K 3:2 (4992x3328)", + "4K 2:3 (3328x4992)", "4K 21:9 (6048x2592)", + "Custom" ], { "default": "Square (512x512)", "tooltip": "Adjust the dimensions of the generated image by specifying its width and height in pixels, or select from the predefined options. Image dimensions must be multiples of 64 (e.g., 512x512, 1024x768). Select 'None' to let the model determine dimensions automatically.", @@ -42,14 +49,14 @@ class txt2img: "tooltip": "The Width of the image in pixels.", "default": 512, "min": 128, - "max": 2048, + "max": 6048, "step": 64, }), "height": ("INT", { "tooltip": "The Height of the image in pixels.", "default": 512, "min": 128, - "max": 2048, + "max": 5120, "step": 64, }), "useSteps": ("BOOLEAN", { From 5651e864e3801a982828d880a52a49a5cd61eb5a Mon Sep 17 00:00:00 2001 From: Sirshendu Ganguly Date: Thu, 9 Oct 2025 14:40:35 -0400 Subject: [PATCH 2/3] Update image inference parameters - Updated width and height step values from 64 to 1 for more flexibility - Fixed height max value to 6048 to support 4K presets - Updated seed parameter with API documentation notes - Maintained seed min value at 1 as required --- modules/imageInference.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/imageInference.py b/modules/imageInference.py index 6671e4d..f76614f 100644 --- a/modules/imageInference.py +++ b/modules/imageInference.py @@ -50,14 +50,14 @@ class txt2img: "default": 512, "min": 128, "max": 6048, - "step": 64, + "step": 1, }), "height": ("INT", { "tooltip": "The Height of the image in pixels.", "default": 512, "min": 128, - "max": 5120, - "step": 64, + "max": 6048, + "step": 1, }), "useSteps": ("BOOLEAN", { "tooltip": "Enable to include steps parameter in API request. Disable if your model doesn't support steps (like nano banana).", @@ -93,8 +93,8 @@ class txt2img: "default": True, }), "seed": ("INT", { - "tooltip": "A value used to randomize the image generation. If you want to make images reproducible (generate the same image multiple times), you can use the same seed value.", - "default": 0, + "tooltip": "A value used to randomize the image generation. If you want to make images reproducible (generate the same image multiple times), you can use the same seed value. Random seeds are generated as 32-bit values for platform compatibility.", + "default": 1, "min": 1, "max": 9223372036854776000, }), From df6cad25e3f1804be67797b56f8f6fe3d91cad4f Mon Sep 17 00:00:00 2001 From: Sirshendu Ganguly Date: Thu, 9 Oct 2025 15:23:21 -0400 Subject: [PATCH 3/3] Additional updates to image inference parameters --- modules/imageInference.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modules/imageInference.py b/modules/imageInference.py index f76614f..89b49b4 100644 --- a/modules/imageInference.py +++ b/modules/imageInference.py @@ -34,12 +34,6 @@ class txt2img: "None", "Square (512x512)", "Square HD (1024x1024)", "Portrait 3:4 (768x1024)", "Portrait 9:16 (576x1024)", "Landscape 4:3 (1024x768)", "Landscape 16:9 (1024x576)", - "2K Square 1:1 (2048x2048)", "2K 4:3 (2304x1728)", "2K 3:4 (1728x2304)", - "2K 16:9 (2560x1440)", "2K 9:16 (1440x2560)", "2K 3:2 (2496x1664)", - "2K 2:3 (1664x2496)", "2K 21:9 (3024x1296)", - "4K Square 1:1 (4096x4096)", "4K 4:3 (4608x3456)", "4K 3:4 (3456x4608)", - "4K 16:9 (5120x2880)", "4K 9:16 (2880x5120)", "4K 3:2 (4992x3328)", - "4K 2:3 (3328x4992)", "4K 21:9 (6048x2592)", "Custom" ], { "default": "Square (512x512)",