Files
zccrs-comfyui-dci/examples/example_dci_new_workflow.json
JiDe Zhang 1fda0c7cdf refactor: 简化 DCI Preview 节点接口
- 移除 dci_file_path 参数,专注于二进制数据输入
- 移除 show_metadata 参数,总是显示元数据信息
- 简化节点接口,提高易用性
- 更新相关测试文件以适应新接口
- 更新文档和示例工作流
- 添加新的示例工作流展示重构后的节点架构

这些更改使 DCI Preview 节点更加专注和易用,符合单一职责原则。
2025-06-09 16:14:59 +08:00

215 lines
5.3 KiB
JSON

{
"last_node_id": 8,
"last_link_id": 8,
"nodes": [
{
"id": 1,
"type": "LoadImage",
"pos": [50, 50],
"size": {"0": 315, "1": 314},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{"name": "IMAGE", "type": "IMAGE", "links": [1], "slot_index": 0},
{"name": "MASK", "type": "MASK", "links": null}
],
"properties": {"Node name for S&R": "LoadImage"},
"widgets_values": ["example.png", "image"]
},
{
"id": 2,
"type": "DCI_Image",
"pos": [400, 50],
"size": {"0": 315, "1": 214},
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{"name": "image", "type": "IMAGE", "link": 1}
],
"outputs": [
{"name": "dci_image_data", "type": "DCI_IMAGE_DATA", "links": [2], "slot_index": 0}
],
"properties": {"Node name for S&R": "DCI_Image"},
"widgets_values": [
256,
"normal",
"dark",
1,
"webp"
]
},
{
"id": 3,
"type": "DCI_Image",
"pos": [400, 300],
"size": {"0": 315, "1": 214},
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{"name": "image", "type": "IMAGE", "link": 3}
],
"outputs": [
{"name": "dci_image_data", "type": "DCI_IMAGE_DATA", "links": [4], "slot_index": 0}
],
"properties": {"Node name for S&R": "DCI_Image"},
"widgets_values": [
256,
"hover",
"dark",
1,
"webp"
]
},
{
"id": 4,
"type": "LoadImage",
"pos": [50, 400],
"size": {"0": 315, "1": 314},
"flags": {},
"order": 3,
"mode": 0,
"outputs": [
{"name": "IMAGE", "type": "IMAGE", "links": [3], "slot_index": 0},
{"name": "MASK", "type": "MASK", "links": null}
],
"properties": {"Node name for S&R": "LoadImage"},
"widgets_values": ["hover_example.png", "image"]
},
{
"id": 5,
"type": "DCI_Image",
"pos": [400, 550],
"size": {"0": 315, "1": 214},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{"name": "image", "type": "IMAGE", "link": 5}
],
"outputs": [
{"name": "dci_image_data", "type": "DCI_IMAGE_DATA", "links": [6], "slot_index": 0}
],
"properties": {"Node name for S&R": "DCI_Image"},
"widgets_values": [
256,
"normal",
"dark",
2,
"webp"
]
},
{
"id": 6,
"type": "LoadImage",
"pos": [50, 750],
"size": {"0": 315, "1": 314},
"flags": {},
"order": 5,
"mode": 0,
"outputs": [
{"name": "IMAGE", "type": "IMAGE", "links": [5], "slot_index": 0},
{"name": "MASK", "type": "MASK", "links": null}
],
"properties": {"Node name for S&R": "LoadImage"},
"widgets_values": ["scale2x_example.png", "image"]
},
{
"id": 7,
"type": "DCI_FileNode",
"pos": [750, 200],
"size": {"0": 315, "1": 334},
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{"name": "dci_image_1", "type": "DCI_IMAGE_DATA", "link": 2},
{"name": "dci_image_2", "type": "DCI_IMAGE_DATA", "link": 4},
{"name": "dci_image_3", "type": "DCI_IMAGE_DATA", "link": 6}
],
"outputs": [
{"name": "dci_binary_data", "type": "BINARY_DATA", "links": [7, 8], "slot_index": 0}
],
"properties": {"Node name for S&R": "DCI_FileNode"}
},
{
"id": 8,
"type": "DCI_PreviewNode",
"pos": [1100, 200],
"size": {"0": 315, "1": 134},
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{"name": "dci_binary_data", "type": "BINARY_DATA", "link": 7}
],
"outputs": [],
"properties": {"Node name for S&R": "DCI_PreviewNode"},
"widgets_values": [
3
]
},
{
"id": 9,
"type": "DCI_BinaryFileSaver",
"pos": [1100, 400],
"size": {"0": 315, "1": 154},
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{"name": "binary_data", "type": "BINARY_DATA", "link": 8}
],
"outputs": [
{"name": "saved_path", "type": "STRING", "links": [], "slot_index": 0}
],
"properties": {"Node name for S&R": "DCI_BinaryFileSaver"},
"widgets_values": [
"new_workflow_example.dci",
""
]
}
],
"links": [
[1, 1, 0, 2, 0, "IMAGE"],
[2, 2, 0, 7, 0, "DCI_IMAGE_DATA"],
[3, 4, 0, 3, 0, "IMAGE"],
[4, 3, 0, 7, 1, "DCI_IMAGE_DATA"],
[5, 6, 0, 5, 0, "IMAGE"],
[6, 5, 0, 7, 2, "DCI_IMAGE_DATA"],
[7, 7, 0, 8, 0, "BINARY_DATA"],
[8, 7, 0, 9, 0, "BINARY_DATA"]
],
"groups": [
{
"title": "Image Loading",
"bounding": [25, -25, 365, 1115],
"color": "#3f789e",
"font_size": 24
},
{
"title": "DCI Image Creation",
"bounding": [375, -25, 365, 815],
"color": "#8A8",
"font_size": 24
},
{
"title": "DCI File Processing",
"bounding": [725, 125, 365, 235],
"color": "#A88",
"font_size": 24
},
{
"title": "Preview & Save",
"bounding": [1075, 125, 365, 455],
"color": "#88A",
"font_size": 24
}
],
"config": {},
"extra": {},
"version": 0.4
}