From 1edabc1d65e0362b089f6d344a67f53c29f2a261 Mon Sep 17 00:00:00 2001 From: TiyaAnlite Date: Thu, 27 Nov 2025 15:57:33 +0800 Subject: [PATCH] =?UTF-8?q?gemini=E6=A8=A1=E5=9E=8B=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E9=BB=98=E8=AE=A4aspect=5Fratio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nodes.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nodes.py b/nodes.py index 1adc96c..ac8fc8d 100644 --- a/nodes.py +++ b/nodes.py @@ -15,13 +15,18 @@ class GeminiImage(OpenAICompatibleNode): ] EXTEND_INPUT = { "required": { - "aspect_ratio": (["1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9"], - {"default": "16:9"}), + "aspect_ratio": (["默认","1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9"], + {"default": "默认"}), "seed": ("INT", {"default": "-1", "min": -1, "max": 2147483647, "enabled": ["gemini-3-pro-image"]}), } } + def post_input(self, payload: dict, timeout: int, extra_params: dict, reference_image=None, **kwargs): + if kwargs["aspect_ratio"] == "默认": + del kwargs["aspect_ratio"] + return payload, timeout, extra_params, reference_image, kwargs + class WanxiangImage(OpenAICompatibleNode): SUPPORTED_MODELS = [