From 0b5a4727a658f9bff4c156fbdc161f921ebff9ca Mon Sep 17 00:00:00 2001 From: Sai Sasank Kurnella Date: Tue, 20 Jan 2026 03:56:04 -0500 Subject: [PATCH] feat: Update Seedream 4.5 resolution limits to 4704x4704 Fixes #11394 The Seedream 4.5 model supports up to 4704x4704 resolution, but the node was limiting it to 4096x4096. This commit: - Updates the UI schema max values for width/height to 4704 - Adds model-specific validation so Seedream 4.0 remains at 4096 max - Seedream 4.5 now correctly allows up to 4704x4704 This is backward compatible - Seedream 4.0 behavior is unchanged. --- comfy_api_nodes/nodes_bytedance.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/comfy_api_nodes/nodes_bytedance.py b/comfy_api_nodes/nodes_bytedance.py index 486801150636..1c18ee089f13 100644 --- a/comfy_api_nodes/nodes_bytedance.py +++ b/comfy_api_nodes/nodes_bytedance.py @@ -303,7 +303,7 @@ def define_schema(cls): "width", default=2048, min=1024, - max=4096, + max=4704, step=8, tooltip="Custom width for image. Value is working only if `size_preset` is set to `Custom`", optional=True, @@ -312,7 +312,7 @@ def define_schema(cls): "height", default=2048, min=1024, - max=4096, + max=4704, step=8, tooltip="Custom height for image. Value is working only if `size_preset` is set to `Custom`", optional=True, @@ -409,9 +409,12 @@ async def execute( if w is None or h is None: w, h = width, height - if not (1024 <= w <= 4096) or not (1024 <= h <= 4096): + # Model-specific max dimensions: Seedream 4.5 supports up to 4704, Seedream 4.0 up to 4096 + max_dim = 4704 if "seedream-4-5" in model else 4096 + if not (1024 <= w <= max_dim) or not (1024 <= h <= max_dim): raise ValueError( - f"Custom size out of range: {w}x{h}. " "Both width and height must be between 1024 and 4096 pixels." + f"Custom size out of range: {w}x{h}. " + f"Both width and height must be between 1024 and {max_dim} pixels." ) out_num_pixels = w * h mp_provided = out_num_pixels / 1_000_000.0