From 4a044cf3e55dace31ea365cee8aa0179f8f57674 Mon Sep 17 00:00:00 2001 From: Acly Date: Tue, 10 Dec 2024 23:06:15 +0100 Subject: [PATCH] Fix assertion when there is a node with a "type" parameter in a custom workflow #1473 --- ai_diffusion/custom_workflow.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ai_diffusion/custom_workflow.py b/ai_diffusion/custom_workflow.py index afa38fa812..f090b45c10 100644 --- a/ai_diffusion/custom_workflow.py +++ b/ai_diffusion/custom_workflow.py @@ -288,7 +288,8 @@ def compare(a: str, b: str): def workflow_parameters(w: ComfyWorkflow): text_types = ("text", "prompt (positive)", "prompt (negative)") for node in w: - match (node.type, node.input("type", "")): + param_type = node.input("type", "") if node.type == "ETN_Parameter" else "" + match (node.type, param_type): case ("ETN_KritaStyle", _): name = node.input("name", "Style") yield CustomParam(ParamKind.style, name, node.input("sampler_preset", "auto"))