- Remove unused simple files (concept_attention_simple.py, nodes_simple.py, test_nodes.py) - Update example_workflow.json with improved structure - Keep main concept_attention.py and nodes.py as primary implementation - Streamline project structure for better maintainability
157 lines
4.9 KiB
JSON
157 lines
4.9 KiB
JSON
{
|
|
"last_node_id": 8,
|
|
"last_link_id": 6,
|
|
"nodes": [
|
|
{
|
|
"id": 1,
|
|
"type": "LoadImage",
|
|
"pos": [100, 100],
|
|
"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": [], "slot_index": 1}
|
|
],
|
|
"properties": {"Node name for S&R": "LoadImage"},
|
|
"widgets_values": ["example_image.png", "image"]
|
|
},
|
|
{
|
|
"id": 2,
|
|
"type": "DiffusionModelLoader",
|
|
"pos": [100, 500],
|
|
"size": {"0": 315, "1": 98},
|
|
"flags": {},
|
|
"order": 1,
|
|
"mode": 0,
|
|
"outputs": [
|
|
{"name": "MODEL", "type": "MODEL", "links": [2], "slot_index": 0},
|
|
{"name": "CLIP", "type": "CLIP", "links": [3], "slot_index": 1}
|
|
],
|
|
"properties": {"Node name for S&R": "DiffusionModelLoader"},
|
|
"widgets_values": ["flux1-dev.safetensors"]
|
|
},
|
|
{
|
|
"id": 3,
|
|
"type": "ConceptAttentionNode",
|
|
"pos": [500, 100],
|
|
"size": {"0": 400, "1": 400},
|
|
"flags": {},
|
|
"order": 2,
|
|
"mode": 0,
|
|
"inputs": [
|
|
{"name": "model", "type": "MODEL", "link": 2},
|
|
{"name": "clip", "type": "CLIP", "link": 3},
|
|
{"name": "image", "type": "IMAGE", "link": 1},
|
|
{"name": "prompt", "type": "STRING", "link": 4},
|
|
{"name": "concept_list", "type": "STRING", "link": 5}
|
|
],
|
|
"outputs": [
|
|
{"name": "concept_maps", "type": "CONCEPT_MAPS", "links": [6], "slot_index": 0},
|
|
{"name": "visualized_image", "type": "IMAGE", "links": [], "slot_index": 1}
|
|
],
|
|
"properties": {"Node name for S&R": "ConceptAttentionNode"},
|
|
"widgets_values": ["", "", 20, 0]
|
|
},
|
|
{
|
|
"id": 4,
|
|
"type": "String",
|
|
"pos": [100, 300],
|
|
"size": {"0": 200, "1": 50},
|
|
"flags": {},
|
|
"order": 3,
|
|
"mode": 0,
|
|
"outputs": [
|
|
{"name": "STRING", "type": "STRING", "links": [4], "slot_index": 0}
|
|
],
|
|
"properties": {"Node name for S&R": "String"},
|
|
"widgets_values": ["Elderly woman character with white hair and a red dress holding a cane and accompanied by a small white cat on her shoulder. Cartoon style with smooth lines and exaggerated facial features offering a whimsical and friendly appearance. Her name is abae."]
|
|
},
|
|
{
|
|
"id": 5,
|
|
"type": "String",
|
|
"pos": [100, 400],
|
|
"size": {"0": 200, "1": 50},
|
|
"flags": {},
|
|
"order": 4,
|
|
"mode": 0,
|
|
"outputs": [
|
|
{"name": "STRING", "type": "STRING", "links": [5], "slot_index": 0}
|
|
],
|
|
"properties": {"Node name for S&R": "String"},
|
|
"widgets_values": ["woman, cat, white, lines, cane"]
|
|
},
|
|
{
|
|
"id": 6,
|
|
"type": "ConceptSaliencyMapNode",
|
|
"pos": [1000, 100],
|
|
"size": {"0": 400, "1": 200},
|
|
"flags": {},
|
|
"order": 5,
|
|
"mode": 0,
|
|
"inputs": [
|
|
{"name": "concept_maps", "type": "CONCEPT_MAPS", "link": 6},
|
|
{"name": "concept_name", "type": "STRING", "link": null},
|
|
{"name": "threshold", "type": "FLOAT", "link": null}
|
|
],
|
|
"outputs": [
|
|
{"name": "mask", "type": "MASK", "links": [], "slot_index": 0},
|
|
{"name": "saliency_image", "type": "IMAGE", "links": [], "slot_index": 1}
|
|
],
|
|
"properties": {"Node name for S&R": "ConceptSaliencyMapNode"},
|
|
"widgets_values": ["woman", 0.5]
|
|
},
|
|
{
|
|
"id": 7,
|
|
"type": "ConceptAttentionVisualizerNode",
|
|
"pos": [1000, 350],
|
|
"size": {"0": 400, "1": 200},
|
|
"flags": {},
|
|
"order": 6,
|
|
"mode": 0,
|
|
"inputs": [
|
|
{"name": "concept_maps", "type": "CONCEPT_MAPS", "link": 6},
|
|
{"name": "image", "type": "IMAGE", "link": 1}
|
|
],
|
|
"outputs": [
|
|
{"name": "visualized_image", "type": "IMAGE", "links": [], "slot_index": 0}
|
|
],
|
|
"properties": {"Node name for S&R": "ConceptAttentionVisualizerNode"},
|
|
"widgets_values": []
|
|
},
|
|
{
|
|
"id": 8,
|
|
"type": "ConceptSegmentationNode",
|
|
"pos": [1000, 600],
|
|
"size": {"0": 400, "1": 200},
|
|
"flags": {},
|
|
"order": 7,
|
|
"mode": 0,
|
|
"inputs": [
|
|
{"name": "concept_maps", "type": "CONCEPT_MAPS", "link": 6},
|
|
{"name": "image", "type": "IMAGE", "link": 1},
|
|
{"name": "concepts", "type": "STRING", "link": 5}
|
|
],
|
|
"outputs": [
|
|
{"name": "segmentation_mask", "type": "MASK", "links": [], "slot_index": 0},
|
|
{"name": "segmented_image", "type": "IMAGE", "links": [], "slot_index": 1}
|
|
],
|
|
"properties": {"Node name for S&R": "ConceptSegmentationNode"},
|
|
"widgets_values": []
|
|
}
|
|
],
|
|
"links": [
|
|
[1, 1, 0, 3, 2, "IMAGE"],
|
|
[2, 2, 0, 3, 0, "MODEL"],
|
|
[3, 2, 1, 3, 1, "CLIP"],
|
|
[4, 4, 0, 3, 3, "STRING"],
|
|
[5, 5, 0, 3, 4, "STRING"],
|
|
[6, 3, 0, 6, 0, "CONCEPT_MAPS"]
|
|
],
|
|
"groups": [],
|
|
"config": {},
|
|
"extra": {},
|
|
"version": 0.4
|
|
}
|