From ecbef304ed5d389081a15aba922eea3195e978e7 Mon Sep 17 00:00:00 2001 From: Jacob Segal Date: Sat, 20 Apr 2024 23:07:18 -0700 Subject: [PATCH] Remove superfluous function parameter --- comfy/graph.py | 3 +++ execution.py | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/comfy/graph.py b/comfy/graph.py index 1135620e..9149ca4a 100644 --- a/comfy/graph.py +++ b/comfy/graph.py @@ -45,6 +45,9 @@ class DynamicPrompt: def all_node_ids(self): return set(self.original_prompt.keys()).union(set(self.ephemeral_prompt.keys())) + def get_original_prompt(self): + return self.original_prompt + def get_input_info(class_def, input_name): valid_inputs = class_def.INPUT_TYPES() input_info = None diff --git a/execution.py b/execution.py index 52de3ec2..6d0f40a9 100644 --- a/execution.py +++ b/execution.py @@ -81,7 +81,7 @@ class CacheSet: } return result -def get_input_data(inputs, class_def, unique_id, outputs=None, prompt={}, dynprompt=None, extra_data={}): +def get_input_data(inputs, class_def, unique_id, outputs=None, dynprompt=None, extra_data={}): valid_inputs = class_def.INPUT_TYPES() input_data_all = {} for x in inputs: @@ -106,7 +106,7 @@ def get_input_data(inputs, class_def, unique_id, outputs=None, prompt={}, dynpro h = valid_inputs["hidden"] for x in h: if h[x] == "PROMPT": - input_data_all[x] = [prompt] + input_data_all[x] = [dynprompt.get_original_prompt() if dynprompt is not None else {}] if h[x] == "DYNPROMPT": input_data_all[x] = [dynprompt] if h[x] == "EXTRA_PNGINFO": @@ -275,7 +275,7 @@ def execute(server, dynprompt, caches, current_item, extra_data, executed, promp output_ui = [] has_subgraph = False else: - input_data_all = get_input_data(inputs, class_def, unique_id, caches.outputs, dynprompt.original_prompt, dynprompt, extra_data) + input_data_all = get_input_data(inputs, class_def, unique_id, caches.outputs, dynprompt, extra_data) if server.client_id is not None: server.last_node_id = display_node_id server.send_sync("executing", { "node": unique_id, "display_node": display_node_id, "prompt_id": prompt_id }, server.client_id)