Gemini Decision 1: 판정, 채점, 분류, 선택
Gemini Decision 1은 텍스트·이미지·오디오·비디오에 대한 질문에 답하고, 그 답을 그래프 분기에 쓸 수 있는 값으로 돌려줍니다. 하나의 워크플로에 네 가지 완성된 사례를 담았습니다. 한 장의 이미지를 예/아니오로 공개 판정하기, 두 후보를 같은 질문으로 1–10점...
정보
Gemini Decision 1 answers a question about text, images, audio or video and hands the answer back as a value the graph can branch on. Four complete cases share one workflow: a yes/no publish gate on a single image, two candidates scored 1-10 against the same question and compared, free-form classification into your own option list, and picking the best image out of a batch. Copy the case you need — each is wired end to end and runs on its own.
Graph: BatchImagesNode, ComfyMathExpression, ComfySwitchNode, GeminiDecisionChoice, GeminiDecisionPickImage, GeminiDecisionScore, GeminiDecisionYesNo, ImageFromBatch, LoadImage, MarkdownNote, PreviewAny, PreviewImage, PrimitiveStringMultiline. Output: image.
제공할 항목
- 워크플로 읽는 중
ComfyUI에서 실행됩니다. 이 워크플로는 이 페이지에서 실행할 수 없습니다. 다운로드하여 ComfyUI에서 여세요.
워크플로 다운로드아직 이 워크플로의 샘플 출력이 없습니다.
워크플로 내부
노드 그래프의 읽기 전용 미리보기입니다. 노드를 편집하려면 Comfy Cloud에서 열거나 다운로드하세요.
Loading the graph
Open full-size workflow preview- 출력
- 이미지
- 작성자
- 작성자 정보를 사용할 수 없음
사용자 지정 노드 필요
- 워크플로 읽는 중
코드에서 이 워크플로 사용하기
가능한 경우 워크플로 그래프와 입력을 기반으로 생성되며, 그렇지 않은 경우 저장된 예시가 표시됩니다. 비용이 발생할 수 있으므로 코드를 실행하기 전에 자격 증명과 엔드포인트를 검토하세요.
What you need
- Runs on
- Comfy Cloud
- 키
- COMFY_API_KEY
유료 Cloud 요금제와 크레딧이 필요합니다.
# Python 3.10+: pip install comfy-sdk==0.4.0
import os
from comfy_sdk import Comfy
api_key = os.environ.get("COMFY_API_KEY", "").strip()
if not api_key: raise RuntimeError("Set COMFY_API_KEY")
os.environ.setdefault("COMFY_BASE_URL", "https://cloud.comfy.org")
client = Comfy(api_key=api_key)
workflow = client.workflows.from_json({
"2": {
"class_type": "LoadImage",
"inputs": {
"image": "cyclist_in_rain_night_street.png"
},
"_meta": {
"title": "Load Image"
}
},
"3": {
"class_type": "GeminiDecisionYesNo",
"inputs": {
"images.image_1": [
"2",
0
],
"model": "gemini-decision-1",
"question": "Is there a person in the image?",
"threshold": 0.5
},
"_meta": {
"title": "Google Gemini Decision (Yes/No)"
}
},
"4": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"3",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"5": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"3",
1
]
},
"_meta": {
"title": "Preview as Text"
}
},
"6": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"3",
2
]
},
"_meta": {
"title": "Preview as Text"
}
},
"8": {
"class_type": "LoadImage",
"inputs": {
"image": "ramen_bowl_top_view.png"
},
"_meta": {
"title": "Load Image"
}
},
"9": {
"class_type": "LoadImage",
"inputs": {
"image": "girl_red_umbrella_station.png"
},
"_meta": {
"title": "Load Image"
}
},
"10": {
"class_type": "GeminiDecisionScore",
"inputs": {
"images.image_1": [
"8",
0
],
"model": "gemini-decision-1",
"question": "Rate the technical quality of the image from 1 (worst) to 10 (best).",
"threshold": 6
},
"_meta": {
"title": "Google Gemini Decision (Score)"
}
},
"11": {
"class_type": "GeminiDecisionScore",
"inputs": {
"images.image_1": [
"9",
0
],
"model": "gemini-decision-1",
"question": "Rate the technical quality of the image from 1 (worst) to 10 (best).",
"threshold": 6
},
"_meta": {
"title": "Google Gemini Decision (Score)"
}
},
"12": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a > b",
"values.a": [
"10",
1
],
"values.b": [
"11",
1
]
},
"_meta": {
"title": "Math Expression"
}
},
"13": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"9",
0
],
"on_true": [
"8",
0
],
"switch": [
"12",
2
]
},
"_meta": {
"title": "If/Else Switch"
}
},
"14": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"13",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"16": {
"class_type": "LoadImage",
"inputs": {
"image": "girl_red_umbrella_station.png"
},
"_meta": {
"title": "Load Image"
}
},
"17": {
"class_type": "GeminiDecisionChoice",
"inputs": {
"images.image_1": [
"16",
0
],
"model": "gemini-decision-1",
"options": "photo\nillustration\n3d render\nanime\nsketch\nother",
"question": "What style is the image?"
},
"_meta": {
"title": "Google Gemini Decision (Choice)"
}
},
"18": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"17",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"19": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"17",
1
]
},
"_meta": {
"title": "Preview as Text"
}
},
"20": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"17",
2
]
},
"_meta": {
"title": "Preview as Text"
}
},
"22": {
"class_type": "LoadImage",
"inputs": {
"image": "ramen_bowl_top_view.png"
},
"_meta": {
"title": "Load Image"
}
},
"23": {
"class_type": "LoadImage",
"inputs": {
"image": "girl_red_umbrella_station.png"
},
"_meta": {
"title": "Load Image"
}
},
"25": {
"class_type": "GeminiDecisionPickImage",
"inputs": {
"images": [
"33",
0
],
"model": "gemini-decision-1",
"question": "Which image best matches the prompt in text? If there is no text, which image has the best quality?",
"text": [
"31",
0
]
},
"_meta": {
"title": "Google Gemini Decision (Pick Image)"
}
},
"29": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"35",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"31": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "a bowl of ramen with a soft-boiled egg, shot from above"
},
"_meta": {
"title": "Text (Multiline)"
}
},
"33": {
"class_type": "BatchImagesNode",
"inputs": {
"images.image0": [
"22",
0
],
"images.image1": [
"23",
0
]
},
"_meta": {
"title": "Batch Images"
}
},
"35": {
"class_type": "ImageFromBatch",
"inputs": {
"batch_index": [
"25",
0
],
"image": [
"33",
0
],
"length": 1
},
"_meta": {
"title": "Get Image from Batch"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)관련 워크플로
- Nano Banana Pro, Gemini3 Pro Image Preview, Google
Create a character turnaround
- Qwen-Image-Edit
Change a material
- Qwen-Image-Edit
피사체를 새로운 각도에서 보기
- Flux.2 Dev, Flux
Create a product mockup
- Nano Banana Pro
Try an outfit on a character
- Seedream
Put your product in a new scene
- SSeedVR2
Upscale and restore detail
- Nano Banana Pro
Sharpen a product photo
- Topaz
Upscale an illustration
- HHitPaw
Restore portrait detail
- FLUX.1 Fill
Edit a selected region
- FLUX.1 Fill
Extend an image’s borders