Skip to content

Commit afb5421

Browse files
authored
feat(api-nodes): allow to use "IMAGE+TEXT" in NanoBanana2 (Comfy-Org#12729)
1 parent 7175c11 commit afb5421

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

comfy_api_nodes/nodes_gemini.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -789,8 +789,6 @@ async def execute(
789789
validate_string(prompt, strip_whitespace=True, min_length=1)
790790
if model == "Nano Banana 2 (Gemini 3.1 Flash Image)":
791791
model = "gemini-3.1-flash-image-preview"
792-
if response_modalities == "IMAGE+TEXT":
793-
raise ValueError("IMAGE+TEXT is not currently available for the Nano Banana 2 model.")
794792

795793
parts: list[GeminiPart] = [GeminiPart(text=prompt)]
796794
if images is not None:
@@ -895,7 +893,7 @@ def define_schema(cls):
895893
),
896894
IO.Combo.Input(
897895
"response_modalities",
898-
options=["IMAGE"],
896+
options=["IMAGE", "IMAGE+TEXT"],
899897
advanced=True,
900898
),
901899
IO.Combo.Input(
@@ -925,6 +923,7 @@ def define_schema(cls):
925923
],
926924
outputs=[
927925
IO.Image.Output(),
926+
IO.String.Output(),
928927
],
929928
hidden=[
930929
IO.Hidden.auth_token_comfy_org,

0 commit comments

Comments
 (0)