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 = [