gemini模型支持默认aspect_ratio

This commit is contained in:
TiyaAnlite
2025-11-27 15:57:33 +08:00
parent c78fc608c4
commit 1edabc1d65
+7 -2
View File
@@ -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 = [