MiniCPM-V-4.7-Workflow / workflow.json
akhaliq's picture
akhaliq HF Staff
Switch graph from provider model nodes to bound fn nodes
38d6762 verified
Raw History Blame Contribute Delete
5.56 kB
{
"schema_version": "2",
"name": "MiniCPM-V 4.7 Vision Workflows",
"runtime": {"default": "client"},
"references": [
{
"id": "ref-image",
"role": "reference",
"label": "Image",
"asset_type": "image",
"inputs": [{"id": "in", "label": "Image", "type": "image"}],
"outputs": [{"id": "out", "label": "Image", "type": "image"}],
"x": 80,
"y": 100,
"width": 220,
"height": 220,
"data": {"in": null, "out": null}
},
{
"id": "ref-prompt",
"role": "reference",
"label": "Prompt",
"asset_type": "text",
"inputs": [{"id": "in", "label": "Prompt", "type": "text"}],
"outputs": [{"id": "out", "label": "Prompt", "type": "text"}],
"x": 80,
"y": 360,
"width": 220,
"height": 160,
"data": {"in": "What is happening in this image?", "out": "What is happening in this image?"}
},
{
"id": "ref-image-2",
"role": "reference",
"label": "Scene Image",
"asset_type": "image",
"inputs": [{"id": "in", "label": "Image", "type": "image"}],
"outputs": [{"id": "out", "label": "Image", "type": "image"}],
"x": 80,
"y": 680,
"width": 220,
"height": 220,
"data": {"in": null, "out": null}
},
{
"id": "ref-caption-prompt",
"role": "reference",
"label": "Caption Prompt",
"asset_type": "text",
"inputs": [{"id": "in", "label": "Prompt", "type": "text"}],
"outputs": [{"id": "out", "label": "Prompt", "type": "text"}],
"x": 80,
"y": 940,
"width": 220,
"height": 160,
"data": {"in": "Describe this image in one detailed paragraph.", "out": "Describe this image in one detailed paragraph."}
}
],
"operators": [
{
"id": "op-ask",
"role": "operator",
"kind": "fn",
"fn": "ask",
"label": "MiniCPM-V Ask",
"inputs": [
{"id": "image", "label": "Image", "type": "image", "required": true},
{"id": "prompt", "label": "Prompt", "type": "text", "required": true},
{"id": "temperature", "label": "Temperature", "type": "number", "required": false, "custom": true}
],
"outputs": [{"id": "out_0", "label": "Text", "type": "text"}],
"x": 380,
"y": 180,
"width": 260,
"height": 240,
"data": {"temperature": 0.7}
},
{
"id": "op-caption",
"role": "operator",
"kind": "fn",
"fn": "caption",
"label": "MiniCPM-V Caption",
"inputs": [
{"id": "image", "label": "Image", "type": "image", "required": true},
{"id": "prompt", "label": "Prompt", "type": "text", "required": true}
],
"outputs": [{"id": "out_0", "label": "Caption", "type": "text"}],
"x": 380,
"y": 740,
"width": 260,
"height": 220
},
{
"id": "op-compose",
"role": "operator",
"kind": "fn",
"fn": "compose_extraction_prompt",
"label": "Compose Extraction Prompt",
"inputs": [
{"id": "caption", "label": "Caption", "type": "text", "required": true}
],
"outputs": [{"id": "out_0", "label": "Prompt", "type": "text"}],
"x": 720,
"y": 780,
"width": 260,
"height": 180
},
{
"id": "op-extract",
"role": "operator",
"kind": "fn",
"fn": "extract_json",
"label": "MiniCPM-V Extract JSON",
"inputs": [
{"id": "prompt", "label": "Prompt", "type": "text", "required": true}
],
"outputs": [{"id": "out_0", "label": "JSON", "type": "text"}],
"x": 1060,
"y": 760,
"width": 260,
"height": 220
}
],
"subjects": [
{
"id": "subj-answer",
"role": "subject",
"label": "Answer",
"asset_type": "text",
"inputs": [{"id": "in", "label": "Text", "type": "text"}],
"outputs": [{"id": "out", "label": "Text", "type": "text"}],
"x": 720,
"y": 200,
"width": 320,
"height": 200,
"data": {"in": ""}
},
{
"id": "subj-json",
"role": "subject",
"label": "Scene JSON",
"asset_type": "text",
"inputs": [{"id": "in", "label": "Text", "type": "text"}],
"outputs": [{"id": "out", "label": "Text", "type": "text"}],
"x": 1400,
"y": 780,
"width": 320,
"height": 200,
"data": {"in": ""}
}
],
"edges": [
{"id": "e1", "from_node_id": "ref-image", "from_port_id": "out", "to_node_id": "op-ask", "to_port_id": "image", "type": "image"},
{"id": "e2", "from_node_id": "ref-prompt", "from_port_id": "out", "to_node_id": "op-ask", "to_port_id": "prompt", "type": "text"},
{"id": "e3", "from_node_id": "op-ask", "from_port_id": "out_0", "to_node_id": "subj-answer", "to_port_id": "in", "type": "text"},
{"id": "e4", "from_node_id": "ref-image-2", "from_port_id": "out", "to_node_id": "op-caption", "to_port_id": "image", "type": "image"},
{"id": "e5", "from_node_id": "ref-caption-prompt", "from_port_id": "out", "to_node_id": "op-caption", "to_port_id": "prompt", "type": "text"},
{"id": "e6", "from_node_id": "op-caption", "from_port_id": "out_0", "to_node_id": "op-compose", "to_port_id": "caption", "type": "text"},
{"id": "e7", "from_node_id": "op-compose", "from_port_id": "out_0", "to_node_id": "op-extract", "to_port_id": "prompt", "type": "text"},
{"id": "e8", "from_node_id": "op-extract", "from_port_id": "out_0", "to_node_id": "subj-json", "to_port_id": "in", "type": "text"}
],
"view": {"default": "canvas"}
}