Skip to content

Commit 26ed53e

Browse files
committed
Don't send prompt, unique_id
1 parent a548adf commit 26ed53e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

comfyui_to_python.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,12 @@ def generate_workflow(self, load_order: List, queue_size: int = 1) -> str:
243243
for input, input_var, arg in missing:
244244
inputs[input] = {"variable_name": f"parse_arg(args." + input_var + ")"}
245245
# Deal with hidden variables
246-
if no_params or 'unique_id' in class_def_params:
247-
inputs['unique_id'] = random.randint(1, 2**64)
248-
if no_params or 'prompt' in class_def_params:
249-
inputs["prompt"] = {"variable_name": "PROMPT_DATA"}
250-
include_prompt_data = True
246+
if class_def_params is not None:
247+
if 'unique_id' in class_def_params:
248+
inputs['unique_id'] = random.randint(1, 2**64)
249+
if 'prompt' in class_def_params:
250+
inputs["prompt"] = {"variable_name": "PROMPT_DATA"}
251+
include_prompt_data = True
251252

252253
# Create executed variable and generate code
253254
executed_variables[idx] = f'{self.clean_variable_name(class_type)}_{idx}'

0 commit comments

Comments
 (0)