mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-07-08 15:37:46 +08:00
Merge 8429f4ff85 into b08debceca
This commit is contained in:
commit
8a0117b301
@ -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
|
||||
|
||||
@ -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",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user