|
|
@ -2,6 +2,7 @@ import os |
|
|
|
import sys |
|
|
|
import sys |
|
|
|
import copy |
|
|
|
import copy |
|
|
|
import json |
|
|
|
import json |
|
|
|
|
|
|
|
import logging |
|
|
|
import threading |
|
|
|
import threading |
|
|
|
import heapq |
|
|
|
import heapq |
|
|
|
import traceback |
|
|
|
import traceback |
|
|
@ -156,7 +157,7 @@ def recursive_execute(server, prompt, outputs, current_item, extra_data, execute |
|
|
|
if server.client_id is not None: |
|
|
|
if server.client_id is not None: |
|
|
|
server.send_sync("executed", { "node": unique_id, "output": output_ui, "prompt_id": prompt_id }, server.client_id) |
|
|
|
server.send_sync("executed", { "node": unique_id, "output": output_ui, "prompt_id": prompt_id }, server.client_id) |
|
|
|
except comfy.model_management.InterruptProcessingException as iex: |
|
|
|
except comfy.model_management.InterruptProcessingException as iex: |
|
|
|
print("Processing interrupted") |
|
|
|
logging.info("Processing interrupted") |
|
|
|
|
|
|
|
|
|
|
|
# skip formatting inputs/outputs |
|
|
|
# skip formatting inputs/outputs |
|
|
|
error_details = { |
|
|
|
error_details = { |
|
|
@ -177,8 +178,8 @@ def recursive_execute(server, prompt, outputs, current_item, extra_data, execute |
|
|
|
for node_id, node_outputs in outputs.items(): |
|
|
|
for node_id, node_outputs in outputs.items(): |
|
|
|
output_data_formatted[node_id] = [[format_value(x) for x in l] for l in node_outputs] |
|
|
|
output_data_formatted[node_id] = [[format_value(x) for x in l] for l in node_outputs] |
|
|
|
|
|
|
|
|
|
|
|
print("!!! Exception during processing !!!") |
|
|
|
logging.error("!!! Exception during processing !!!") |
|
|
|
print(traceback.format_exc()) |
|
|
|
logging.error(traceback.format_exc()) |
|
|
|
|
|
|
|
|
|
|
|
error_details = { |
|
|
|
error_details = { |
|
|
|
"node_id": unique_id, |
|
|
|
"node_id": unique_id, |
|
|
@ -636,11 +637,11 @@ def validate_prompt(prompt): |
|
|
|
if valid is True: |
|
|
|
if valid is True: |
|
|
|
good_outputs.add(o) |
|
|
|
good_outputs.add(o) |
|
|
|
else: |
|
|
|
else: |
|
|
|
print(f"Failed to validate prompt for output {o}:") |
|
|
|
logging.error(f"Failed to validate prompt for output {o}:") |
|
|
|
if len(reasons) > 0: |
|
|
|
if len(reasons) > 0: |
|
|
|
print("* (prompt):") |
|
|
|
logging.error("* (prompt):") |
|
|
|
for reason in reasons: |
|
|
|
for reason in reasons: |
|
|
|
print(f" - {reason['message']}: {reason['details']}") |
|
|
|
logging.error(f" - {reason['message']}: {reason['details']}") |
|
|
|
errors += [(o, reasons)] |
|
|
|
errors += [(o, reasons)] |
|
|
|
for node_id, result in validated.items(): |
|
|
|
for node_id, result in validated.items(): |
|
|
|
valid = result[0] |
|
|
|
valid = result[0] |
|
|
@ -656,11 +657,11 @@ def validate_prompt(prompt): |
|
|
|
"dependent_outputs": [], |
|
|
|
"dependent_outputs": [], |
|
|
|
"class_type": class_type |
|
|
|
"class_type": class_type |
|
|
|
} |
|
|
|
} |
|
|
|
print(f"* {class_type} {node_id}:") |
|
|
|
logging.error(f"* {class_type} {node_id}:") |
|
|
|
for reason in reasons: |
|
|
|
for reason in reasons: |
|
|
|
print(f" - {reason['message']}: {reason['details']}") |
|
|
|
logging.error(f" - {reason['message']}: {reason['details']}") |
|
|
|
node_errors[node_id]["dependent_outputs"].append(o) |
|
|
|
node_errors[node_id]["dependent_outputs"].append(o) |
|
|
|
print("Output will be ignored") |
|
|
|
logging.error("Output will be ignored") |
|
|
|
|
|
|
|
|
|
|
|
if len(good_outputs) == 0: |
|
|
|
if len(good_outputs) == 0: |
|
|
|
errors_list = [] |
|
|
|
errors_list = [] |
|
|
|