Skip to content

Commit

Permalink
Skip special seed control-after-generate widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
Acly committed Oct 18, 2024
1 parent 5be4e08 commit 6df8c64
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ai_diffusion/comfy_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,8 +900,12 @@ def _convert_ui_workflow(w: dict, node_inputs: dict):
for field_name, field in fields.items():
field_type = field[0]
if field_type in ["INT", "FLOAT", "BOOL", "STRING"] or isinstance(field_type, list):
inputs[field_name] = node["widgets_values"][widget_count]
values = node["widgets_values"]
inputs[field_name] = values[widget_count]
widget_count += 1
if len(values) > widget_count and values[widget_count] in _control_after_generate:
widget_count += 1

for connection in node["inputs"]:
if connection["name"] == field_name and connection["link"] is not None:
link = next(l for l in links if l[0] == connection["link"])
Expand All @@ -914,3 +918,6 @@ def _convert_ui_workflow(w: dict, node_inputs: dict):
r[id] = {"class_type": type, "inputs": inputs}

return r


_control_after_generate = ["fixed", "increment", "decrement", "randomize"]

0 comments on commit 6df8c64

Please sign in to comment.