Skip to content

Commit

Permalink
Fix assertion when there is a node with a "type" parameter in a custo…
Browse files Browse the repository at this point in the history
…m workflow #1473
  • Loading branch information
Acly committed Dec 10, 2024
1 parent a6f0c9b commit 4a044cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ai_diffusion/custom_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit 4a044cf

Please sign in to comment.