Palette extraction (k-means + Delta-E dedup, mode dropdown for most_populous/vibrant/muted ranking) and Krea 2 image_style_references packaging, forked from ComfyUI-Ideogram-Palette-and-Prompt-Tools' color math core. Includes tests, four example workflows, and README with a local-vs-cloud generation comparison. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
92 lines
2.7 KiB
JSON
92 lines
2.7 KiB
JSON
{
|
|
"last_node_id": 5,
|
|
"last_link_id": 3,
|
|
"nodes": [
|
|
{
|
|
"id": 1,
|
|
"type": "LoadImage",
|
|
"pos": [40, 80],
|
|
"size": [240, 320],
|
|
"flags": {},
|
|
"order": 0,
|
|
"mode": 0,
|
|
"outputs": [
|
|
{ "name": "IMAGE", "type": "IMAGE", "links": [1], "slot_index": 0 },
|
|
{ "name": "MASK", "type": "MASK", "links": null }
|
|
],
|
|
"widgets_values": ["reference.png", "image"]
|
|
},
|
|
{
|
|
"id": 2,
|
|
"type": "KreaPaletteExtractor",
|
|
"pos": [340, 80],
|
|
"size": [260, 160],
|
|
"flags": {},
|
|
"order": 1,
|
|
"mode": 0,
|
|
"inputs": [
|
|
{ "name": "image", "type": "IMAGE", "link": 1 }
|
|
],
|
|
"outputs": [
|
|
{ "name": "palette_json", "type": "STRING", "links": [2], "slot_index": 0 },
|
|
{ "name": "palette_preview", "type": "IMAGE", "links": [3], "slot_index": 1 },
|
|
{ "name": "color_count", "type": "INT", "links": null, "slot_index": 2 }
|
|
],
|
|
"widgets_values": [8, 10.0, "most_populous"]
|
|
},
|
|
{
|
|
"id": 3,
|
|
"type": "PreviewImage",
|
|
"pos": [660, 80],
|
|
"size": [260, 260],
|
|
"flags": {},
|
|
"order": 2,
|
|
"mode": 0,
|
|
"inputs": [
|
|
{ "name": "images", "type": "IMAGE", "link": 3 }
|
|
],
|
|
"outputs": []
|
|
},
|
|
{
|
|
"id": 4,
|
|
"type": "ShowText|pysssss",
|
|
"pos": [660, 380],
|
|
"size": [260, 200],
|
|
"flags": {},
|
|
"order": 3,
|
|
"mode": 0,
|
|
"inputs": [
|
|
{ "name": "text", "type": "STRING", "link": 2 }
|
|
],
|
|
"outputs": [
|
|
{ "name": "STRING", "type": "STRING", "links": null }
|
|
]
|
|
},
|
|
{
|
|
"id": 5,
|
|
"type": "Note",
|
|
"pos": [40, -200],
|
|
"size": [780, 160],
|
|
"flags": {},
|
|
"order": 4,
|
|
"mode": 0,
|
|
"properties": { "text": "" },
|
|
"widgets_values": ["CORE PIPELINE (minimal example)\n\nLoad Image -> Krea Palette Extractor.\n\npalette_preview is the swatch-strip IMAGE; wire it into KreaPaletteStyleReference to package it for Krea 2's image_style_references. ShowText is optional (ComfyUI-Custom-Scripts) and just displays the raw extracted hex JSON.\n\nFor the full extract -> style-reference pipeline, see workflows/showcase_01_palette_to_style_reference.json."],
|
|
"color": "#432",
|
|
"bgcolor": "#653",
|
|
"title": "README"
|
|
}
|
|
],
|
|
"links": [
|
|
[1, 1, 0, 2, 0, "IMAGE"],
|
|
[2, 2, 0, 4, 0, "STRING"],
|
|
[3, 2, 1, 3, 0, "IMAGE"]
|
|
],
|
|
"groups": [],
|
|
"config": {},
|
|
"extra": {
|
|
"note": "Example: LoadImage -> KreaPaletteExtractor. The 'ShowText|pysssss' node is optional (from ComfyUI-Custom-Scripts) and just displays the raw extracted palette JSON for inspection; swap with any STRING-compatible display node if you don't have it installed."
|
|
},
|
|
"version": 0.4
|
|
}
|