From 26ed53e53b0b98944c51fdafd5666e5fca7c24cd Mon Sep 17 00:00:00 2001 From: atmaranto <35581227+atmaranto@users.noreply.github.com> Date: Sat, 4 May 2024 06:12:29 -0500 Subject: [PATCH] Don't send prompt, unique_id --- comfyui_to_python.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/comfyui_to_python.py b/comfyui_to_python.py index 79f9307..fe01d8d 100644 --- a/comfyui_to_python.py +++ b/comfyui_to_python.py @@ -243,11 +243,12 @@ class CodeGenerator: for input, input_var, arg in missing: inputs[input] = {"variable_name": f"parse_arg(args." + input_var + ")"} # Deal with hidden variables - if no_params or 'unique_id' in class_def_params: - inputs['unique_id'] = random.randint(1, 2**64) - if no_params or 'prompt' in class_def_params: - inputs["prompt"] = {"variable_name": "PROMPT_DATA"} - include_prompt_data = True + if class_def_params is not None: + if 'unique_id' in class_def_params: + inputs['unique_id'] = random.randint(1, 2**64) + if 'prompt' in class_def_params: + inputs["prompt"] = {"variable_name": "PROMPT_DATA"} + include_prompt_data = True # Create executed variable and generate code executed_variables[idx] = f'{self.clean_variable_name(class_type)}_{idx}'