This commit is contained in:
chinesewebman 2026-07-06 10:56:16 +03:00 committed by GitHub
commit 8a0117b301
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View File

@ -62,7 +62,9 @@ class NodeReplaceManager:
connections: dict[str, list[tuple[str, str, int]]] = {}
need_replacement: set[str] = set()
for node_number, node_struct in prompt.items():
if "class_type" not in node_struct or "inputs" not in node_struct:
if not isinstance(node_struct, dict) or "class_type" not in node_struct or "inputs" not in node_struct:
# UI-saved workflow format stores non-dict metadata keys at the top
# level (e.g. `last_node_id`, `last_link_id` as ints). Skip them.
continue
class_type = node_struct["class_type"]
# need replacement if not in NODE_CLASS_MAPPINGS and has replacement

View File

@ -1116,8 +1116,12 @@ def full_type_name(klass):
async def validate_prompt(prompt_id, prompt, partial_execution_list: Union[list[str], None]):
outputs = set()
for x in prompt:
if 'class_type' not in prompt[x]:
node_data = prompt[x]
node_data = prompt[x]
if not isinstance(node_data, dict):
# UI-saved workflow format stores non-dict metadata keys at the top
# level (e.g. `last_node_id`, `last_link_id` as ints). Skip them.
continue
if 'class_type' not in node_data:
node_title = node_data.get('_meta', {}).get('title')
error = {
"type": "missing_node_type",