From 1552484f65f48549c8cb47a2caa31d2d93c11dbf Mon Sep 17 00:00:00 2001 From: Immac Date: Wed, 4 Mar 2026 21:13:33 -0600 Subject: [PATCH] fix: style_blend accepts raw style_id (no weight node) with default weight 1.0 --- src/immac_tools/style_blend_node.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/immac_tools/style_blend_node.py b/src/immac_tools/style_blend_node.py index f6dc058..5268721 100644 --- a/src/immac_tools/style_blend_node.py +++ b/src/immac_tools/style_blend_node.py @@ -99,12 +99,16 @@ class StyleBlendNode(io.ComfyNode): continue try: entry = json.loads(text) - except json.JSONDecodeError: - continue - style_id = entry.get("style_id", "").strip() + style_id = entry.get("style_id", "").strip() + weight = float(entry.get("weight", 1.0)) + except (json.JSONDecodeError, AttributeError): + # Not a style_entry JSON — treat as a raw style_id (e.g. direct + # connection from Style Pick) with a default weight of 1.0. + style_id = text + weight = 1.0 if not style_id: continue - raw.append({"style_id": style_id, "weight": float(entry.get("weight", 1.0))}) + raw.append({"style_id": style_id, "weight": weight}) merged = _deduplicate(raw, on_duplicate) merged = _apply_weight_mode(merged, weight_mode)