Files
aigc-home/docs/hel-892/batch178-aio-protocol/branch-evidence.json
T

711 lines
123 KiB
JSON

{
"0.21.1:get_input_data": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.21.1",
"commit": "26515acd23fa291a8f5ab53c5997258598de0701",
"path": "execution.py",
"file": "source-text/0.21.1__execution.py.txt",
"sha256": "346f83f0730ea32d42b989af3a96ba0d201db9f87fed958bdd0b6ac21e60d042",
"git_blob_sha1": "f37d0360d55ccbb16a8f11bbdf065324ab7409b4",
"retrieved_at": "2026-11-01T22:49:50.156663+00:00",
"request_key": "engine-0.21.1-execution.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "get_input_data",
"lines": [
154,
218
],
"text": "def get_input_data(inputs, class_def, unique_id, execution_list=None, dynprompt=None, extra_data={}):\n is_v3 = issubclass(class_def, _ComfyNodeInternal)\n v3_data: io.V3Data = {}\n hidden_inputs_v3 = {}\n valid_inputs = class_def.INPUT_TYPES()\n if is_v3:\n valid_inputs, hidden, v3_data = _io.get_finalized_class_inputs(valid_inputs, inputs)\n input_data_all = {}\n missing_keys = {}\n for x in inputs:\n input_data = inputs[x]\n _, input_category, input_info = get_input_info(class_def, x, valid_inputs)\n def mark_missing():\n missing_keys[x] = True\n input_data_all[x] = (None,)\n if is_link(input_data) and (not input_info or not input_info.get(\"rawLink\", False)):\n input_unique_id = input_data[0]\n output_index = input_data[1]\n if execution_list is None:\n mark_missing()\n continue # This might be a lazily-evaluated input\n cached = execution_list.get_cache(input_unique_id, unique_id)\n if cached is None or cached.outputs is None:\n mark_missing()\n continue\n if output_index >= len(cached.outputs):\n mark_missing()\n continue\n obj = cached.outputs[output_index]\n input_data_all[x] = obj\n elif input_category is not None or (is_v3 and class_def.ACCEPT_ALL_INPUTS):\n input_data_all[x] = [input_data]\n\n if is_v3:\n if hidden is not None:\n if io.Hidden.prompt.name in hidden:\n hidden_inputs_v3[io.Hidden.prompt] = dynprompt.get_original_prompt() if dynprompt is not None else {}\n if io.Hidden.dynprompt.name in hidden:\n hidden_inputs_v3[io.Hidden.dynprompt] = dynprompt\n if io.Hidden.extra_pnginfo.name in hidden:\n hidden_inputs_v3[io.Hidden.extra_pnginfo] = extra_data.get('extra_pnginfo', None)\n if io.Hidden.unique_id.name in hidden:\n hidden_inputs_v3[io.Hidden.unique_id] = unique_id\n if io.Hidden.auth_token_comfy_org.name in hidden:\n hidden_inputs_v3[io.Hidden.auth_token_comfy_org] = extra_data.get(\"auth_token_comfy_org\", None)\n if io.Hidden.api_key_comfy_org.name in hidden:\n hidden_inputs_v3[io.Hidden.api_key_comfy_org] = extra_data.get(\"api_key_comfy_org\", None)\n else:\n if \"hidden\" in valid_inputs:\n h = valid_inputs[\"hidden\"]\n for x in h:\n if h[x] == \"PROMPT\":\n input_data_all[x] = [dynprompt.get_original_prompt() if dynprompt is not None else {}]\n if h[x] == \"DYNPROMPT\":\n input_data_all[x] = [dynprompt]\n if h[x] == \"EXTRA_PNGINFO\":\n input_data_all[x] = [extra_data.get('extra_pnginfo', None)]\n if h[x] == \"UNIQUE_ID\":\n input_data_all[x] = [unique_id]\n if h[x] == \"AUTH_TOKEN_COMFY_ORG\":\n input_data_all[x] = [extra_data.get(\"auth_token_comfy_org\", None)]\n if h[x] == \"API_KEY_COMFY_ORG\":\n input_data_all[x] = [extra_data.get(\"api_key_comfy_org\", None)]\n v3_data[\"hidden_inputs\"] = hidden_inputs_v3\n return input_data_all, missing_keys, v3_data",
"sha256": "e1174b20dd4b4a85233de01732f5af0227d1d4546dfe2b4033cf5155cacf896a",
"ast_sha256": "7653936f20493b80cf828320e3238e2d0e390e98777dd7dea370e5e8f8ec1451",
"rechecked_at": "2026-11-01T22:52:03.402004+00:00"
},
"0.21.1:_async_map_node_over_list": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.21.1",
"commit": "26515acd23fa291a8f5ab53c5997258598de0701",
"path": "execution.py",
"file": "source-text/0.21.1__execution.py.txt",
"sha256": "346f83f0730ea32d42b989af3a96ba0d201db9f87fed958bdd0b6ac21e60d042",
"git_blob_sha1": "f37d0360d55ccbb16a8f11bbdf065324ab7409b4",
"retrieved_at": "2026-11-01T22:49:50.156663+00:00",
"request_key": "engine-0.21.1-execution.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "_async_map_node_over_list",
"lines": [
234,
310
],
"text": "async def _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, func, allow_interrupt=False, execution_block_cb=None, pre_execute_cb=None, v3_data=None):\n # check if node wants the lists\n input_is_list = getattr(obj, \"INPUT_IS_LIST\", False)\n\n if len(input_data_all) == 0:\n max_len_input = 0\n else:\n max_len_input = max(len(x) for x in input_data_all.values())\n\n # get a slice of inputs, repeat last input when list isn't long enough\n def slice_dict(d, i):\n return {k: v[i if len(v) > i else -1] for k, v in d.items()}\n\n results = []\n async def process_inputs(inputs, index=None, input_is_list=False):\n if allow_interrupt:\n nodes.before_node_execution()\n execution_block = None\n for k, v in inputs.items():\n if input_is_list:\n for e in v:\n if isinstance(e, ExecutionBlocker):\n v = e\n break\n if isinstance(v, ExecutionBlocker):\n execution_block = execution_block_cb(v) if execution_block_cb else v\n break\n if execution_block is None:\n if pre_execute_cb is not None and index is not None:\n pre_execute_cb(index)\n # V3\n if isinstance(obj, _ComfyNodeInternal) or (is_class(obj) and issubclass(obj, _ComfyNodeInternal)):\n # if is just a class, then assign no state, just create clone\n if is_class(obj):\n type_obj = obj\n obj.VALIDATE_CLASS()\n class_clone = obj.PREPARE_CLASS_CLONE(v3_data)\n # otherwise, use class instance to populate/reuse some fields\n else:\n type_obj = type(obj)\n type_obj.VALIDATE_CLASS()\n class_clone = type_obj.PREPARE_CLASS_CLONE(v3_data)\n f = make_locked_method_func(type_obj, func, class_clone)\n # in case of dynamic inputs, restructure inputs to expected nested dict\n if v3_data is not None:\n inputs = _io.build_nested_inputs(inputs, v3_data)\n # V1\n else:\n f = getattr(obj, func)\n if inspect.iscoroutinefunction(f):\n async def async_wrapper(f, prompt_id, unique_id, list_index, args):\n with CurrentNodeContext(prompt_id, unique_id, list_index):\n return await f(**args)\n task = asyncio.create_task(async_wrapper(f, prompt_id, unique_id, index, args=inputs))\n # Give the task a chance to execute without yielding\n await asyncio.sleep(0)\n if task.done():\n result = task.result()\n results.append(result)\n else:\n results.append(task)\n else:\n with CurrentNodeContext(prompt_id, unique_id, index):\n result = f(**inputs)\n results.append(result)\n else:\n results.append(execution_block)\n\n if input_is_list:\n await process_inputs(input_data_all, 0, input_is_list=input_is_list)\n elif max_len_input == 0:\n await process_inputs({})\n else:\n for i in range(max_len_input):\n input_dict = slice_dict(input_data_all, i)\n await process_inputs(input_dict, i)\n return results",
"sha256": "72efe9f534acaa6dd7f04b95c762c62d663bbb2b9380f5931c8a8860695606cd",
"ast_sha256": "6e231c5064aceab99c417d2fdb73e6072ed56f7cd2efe3e773b17d1967920fac",
"rechecked_at": "2026-11-01T22:52:03.402483+00:00"
},
"0.21.1:get_output_data": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.21.1",
"commit": "26515acd23fa291a8f5ab53c5997258598de0701",
"path": "execution.py",
"file": "source-text/0.21.1__execution.py.txt",
"sha256": "346f83f0730ea32d42b989af3a96ba0d201db9f87fed958bdd0b6ac21e60d042",
"git_blob_sha1": "f37d0360d55ccbb16a8f11bbdf065324ab7409b4",
"retrieved_at": "2026-11-01T22:49:50.156663+00:00",
"request_key": "engine-0.21.1-execution.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "get_output_data",
"lines": [
334,
340
],
"text": "async def get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=None, pre_execute_cb=None, v3_data=None):\n return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)\n has_pending_task = any(isinstance(r, asyncio.Task) and not r.done() for r in return_values)\n if has_pending_task:\n return return_values, {}, False, has_pending_task\n output, ui, has_subgraph = get_output_from_returns(return_values, obj)\n return output, ui, has_subgraph, False",
"sha256": "e63d71bd6698a1e7706a543519398b8597c99082abd8a6a13c419a1e51f2eb8b",
"ast_sha256": "97a5dcdf3db16366546b1a1cd811d6ca6724cbd9b5a6141e3dd22c6aae95c527",
"rechecked_at": "2026-11-01T22:52:03.402648+00:00"
},
"0.21.1:get_output_from_returns": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.21.1",
"commit": "26515acd23fa291a8f5ab53c5997258598de0701",
"path": "execution.py",
"file": "source-text/0.21.1__execution.py.txt",
"sha256": "346f83f0730ea32d42b989af3a96ba0d201db9f87fed958bdd0b6ac21e60d042",
"git_blob_sha1": "f37d0360d55ccbb16a8f11bbdf065324ab7409b4",
"retrieved_at": "2026-11-01T22:49:50.156663+00:00",
"request_key": "engine-0.21.1-execution.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "get_output_from_returns",
"lines": [
342,
405
],
"text": "def get_output_from_returns(return_values, obj):\n results = []\n uis = []\n subgraph_results = []\n has_subgraph = False\n for i in range(len(return_values)):\n r = return_values[i]\n if isinstance(r, dict):\n if 'ui' in r:\n uis.append(r['ui'])\n if 'expand' in r:\n # Perform an expansion, but do not append results\n has_subgraph = True\n new_graph = r['expand']\n result = r.get(\"result\", None)\n if isinstance(result, ExecutionBlocker):\n result = tuple([result] * len(obj.RETURN_TYPES))\n subgraph_results.append((new_graph, result))\n elif 'result' in r:\n result = r.get(\"result\", None)\n if isinstance(result, ExecutionBlocker):\n result = tuple([result] * len(obj.RETURN_TYPES))\n results.append(result)\n subgraph_results.append((None, result))\n elif isinstance(r, _NodeOutputInternal):\n # V3\n if r.ui is not None:\n if isinstance(r.ui, dict):\n uis.append(r.ui)\n else:\n uis.append(r.ui.as_dict())\n if r.expand is not None:\n has_subgraph = True\n new_graph = r.expand\n result = r.result\n if r.block_execution is not None:\n result = tuple([ExecutionBlocker(r.block_execution)] * len(obj.RETURN_TYPES))\n subgraph_results.append((new_graph, result))\n elif r.result is not None:\n result = r.result\n if r.block_execution is not None:\n result = tuple([ExecutionBlocker(r.block_execution)] * len(obj.RETURN_TYPES))\n results.append(result)\n subgraph_results.append((None, result))\n else:\n if isinstance(r, ExecutionBlocker):\n r = tuple([r] * len(obj.RETURN_TYPES))\n results.append(r)\n subgraph_results.append((None, r))\n\n if has_subgraph:\n output = subgraph_results\n elif len(results) > 0:\n output = merge_result_data(results, obj)\n else:\n output = []\n ui = dict()\n # TODO: Think there's an existing bug here\n # If we're performing a subgraph expansion, we probably shouldn't be returning UI values yet.\n # They'll get cached without the completed subgraphs. It's an edge case and I'm not aware of\n # any nodes that use both subgraph expansion and custom UI outputs, but might be a problem in the future.\n if len(uis) > 0:\n ui = {k: [y for x in uis for y in x[k]] for k in uis[0].keys()}\n return output, ui, has_subgraph",
"sha256": "b271bc88fd782995961367b9b456b40be1a511afefa6311348deb062eb40dcc7",
"ast_sha256": "c1a5d8094611dad458e16ab22174e035e3dd38683b72469d6885c6dc65fa1e28",
"rechecked_at": "2026-11-01T22:52:03.403077+00:00"
},
"0.21.1:merge_result_data": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.21.1",
"commit": "26515acd23fa291a8f5ab53c5997258598de0701",
"path": "execution.py",
"file": "source-text/0.21.1__execution.py.txt",
"sha256": "346f83f0730ea32d42b989af3a96ba0d201db9f87fed958bdd0b6ac21e60d042",
"git_blob_sha1": "f37d0360d55ccbb16a8f11bbdf065324ab7409b4",
"retrieved_at": "2026-11-01T22:49:50.156663+00:00",
"request_key": "engine-0.21.1-execution.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "merge_result_data",
"lines": [
313,
332
],
"text": "def merge_result_data(results, obj):\n # check which outputs need concatenating\n output = []\n output_is_list = [False] * len(results[0])\n if hasattr(obj, \"OUTPUT_IS_LIST\"):\n output_is_list = obj.OUTPUT_IS_LIST\n\n # merge node execution results\n for i, is_list in zip(range(len(results[0])), output_is_list):\n if is_list:\n value = []\n for o in results:\n if isinstance(o[i], ExecutionBlocker):\n value.append(o[i])\n else:\n value.extend(o[i])\n output.append(value)\n else:\n output.append([o[i] for o in results])\n return output",
"sha256": "5a7eca11c7639a11260579423d3c6ba59e9380dbfcbd910ab16da86c2753804e",
"ast_sha256": "f347caa26c38ba64742efe5c0e163866ae3890c50b6a5800ef41998604f3a57d",
"rechecked_at": "2026-11-01T22:52:03.403248+00:00"
},
"0.21.1:execute": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.21.1",
"commit": "26515acd23fa291a8f5ab53c5997258598de0701",
"path": "execution.py",
"file": "source-text/0.21.1__execution.py.txt",
"sha256": "346f83f0730ea32d42b989af3a96ba0d201db9f87fed958bdd0b6ac21e60d042",
"git_blob_sha1": "f37d0360d55ccbb16a8f11bbdf065324ab7409b4",
"retrieved_at": "2026-11-01T22:49:50.156663+00:00",
"request_key": "engine-0.21.1-execution.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "execute",
"lines": [
428,
648
],
"text": "async def execute(server, dynprompt, caches, current_item, extra_data, executed, prompt_id, execution_list, pending_subgraph_results, pending_async_nodes, ui_outputs):\n unique_id = current_item\n real_node_id = dynprompt.get_real_node_id(unique_id)\n display_node_id = dynprompt.get_display_node_id(unique_id)\n parent_node_id = dynprompt.get_parent_node_id(unique_id)\n inputs = dynprompt.get_node(unique_id)['inputs']\n class_type = dynprompt.get_node(unique_id)['class_type']\n class_def = nodes.NODE_CLASS_MAPPINGS[class_type]\n cached = await caches.outputs.get(unique_id)\n if cached is not None:\n _send_cached_ui(server, unique_id, display_node_id, cached, prompt_id, ui_outputs)\n get_progress_state().finish_progress(unique_id)\n execution_list.cache_update(unique_id, cached)\n return (ExecutionResult.SUCCESS, None, None)\n\n input_data_all = None\n try:\n if unique_id in pending_async_nodes:\n results = []\n for r in pending_async_nodes[unique_id]:\n if isinstance(r, asyncio.Task):\n try:\n results.append(r.result())\n except Exception as ex:\n # An async task failed - propagate the exception up\n del pending_async_nodes[unique_id]\n raise ex\n else:\n results.append(r)\n del pending_async_nodes[unique_id]\n output_data, output_ui, has_subgraph = get_output_from_returns(results, class_def)\n elif unique_id in pending_subgraph_results:\n cached_results = pending_subgraph_results[unique_id]\n resolved_outputs = []\n for is_subgraph, result in cached_results:\n if not is_subgraph:\n resolved_outputs.append(result)\n else:\n resolved_output = []\n for r in result:\n if is_link(r):\n source_node, source_output = r[0], r[1]\n node_cached = execution_list.get_cache(source_node, unique_id)\n for o in node_cached.outputs[source_output]:\n resolved_output.append(o)\n\n else:\n resolved_output.append(r)\n resolved_outputs.append(tuple(resolved_output))\n output_data = merge_result_data(resolved_outputs, class_def)\n output_ui = []\n del pending_subgraph_results[unique_id]\n has_subgraph = False\n else:\n get_progress_state().start_progress(unique_id)\n input_data_all, missing_keys, v3_data = get_input_data(inputs, class_def, unique_id, execution_list, dynprompt, extra_data)\n if server.client_id is not None:\n server.last_node_id = display_node_id\n server.send_sync(\"executing\", { \"node\": unique_id, \"display_node\": display_node_id, \"prompt_id\": prompt_id }, server.client_id)\n\n obj = await caches.objects.get(unique_id)\n if obj is None:\n obj = class_def()\n await caches.objects.set(unique_id, obj)\n\n if issubclass(class_def, _ComfyNodeInternal):\n lazy_status_present = first_real_override(class_def, \"check_lazy_status\") is not None\n else:\n lazy_status_present = getattr(obj, \"check_lazy_status\", None) is not None\n if lazy_status_present:\n # for check_lazy_status, the returned data should include the original key of the input\n v3_data_lazy = v3_data.copy()\n v3_data_lazy[\"create_dynamic_tuple\"] = True\n required_inputs = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, \"check_lazy_status\", allow_interrupt=True, v3_data=v3_data_lazy)\n required_inputs = await resolve_map_node_over_list_results(required_inputs)\n required_inputs = set(sum([r for r in required_inputs if isinstance(r,list)], []))\n required_inputs = [x for x in required_inputs if isinstance(x,str) and (\n x not in input_data_all or x in missing_keys\n )]\n if len(required_inputs) > 0:\n for i in required_inputs:\n execution_list.make_input_strong_link(unique_id, i)\n return (ExecutionResult.PENDING, None, None)\n\n def execution_block_cb(block):\n if block.message is not None:\n mes = {\n \"prompt_id\": prompt_id,\n \"node_id\": unique_id,\n \"node_type\": class_type,\n \"executed\": list(executed),\n\n \"exception_message\": f\"Execution Blocked: {block.message}\",\n \"exception_type\": \"ExecutionBlocked\",\n \"traceback\": [],\n \"current_inputs\": [],\n \"current_outputs\": [],\n }\n server.send_sync(\"execution_error\", mes, server.client_id)\n return ExecutionBlocker(None)\n else:\n return block\n def pre_execute_cb(call_index):\n # TODO - How to handle this with async functions without contextvars (which requires Python 3.12)?\n GraphBuilder.set_default_prefix(unique_id, call_index, 0)\n\n try:\n output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)\n finally:\n if comfy.memory_management.aimdo_enabled:\n if args.verbose == \"DEBUG\":\n comfy_aimdo.control.analyze()\n comfy.model_management.reset_cast_buffers()\n comfy.model_prefetch.cleanup_prefetch_queues()\n comfy_aimdo.model_vbar.vbars_reset_watermark_limits()\n\n if has_pending_tasks:\n pending_async_nodes[unique_id] = output_data\n unblock = execution_list.add_external_block(unique_id)\n async def await_completion():\n tasks = [x for x in output_data if isinstance(x, asyncio.Task)]\n await asyncio.gather(*tasks, return_exceptions=True)\n unblock()\n asyncio.create_task(await_completion())\n return (ExecutionResult.PENDING, None, None)\n if len(output_ui) > 0:\n ui_outputs[unique_id] = {\n \"meta\": {\n \"node_id\": unique_id,\n \"display_node\": display_node_id,\n \"parent_node\": parent_node_id,\n \"real_node_id\": real_node_id,\n },\n \"output\": output_ui\n }\n if server.client_id is not None:\n server.send_sync(\"executed\", { \"node\": unique_id, \"display_node\": display_node_id, \"output\": output_ui, \"prompt_id\": prompt_id }, server.client_id)\n if has_subgraph:\n cached_outputs = []\n new_node_ids = []\n new_output_ids = []\n new_output_links = []\n for i in range(len(output_data)):\n new_graph, node_outputs = output_data[i]\n if new_graph is None:\n cached_outputs.append((False, node_outputs))\n else:\n for node_id, node_info in new_graph.items():\n new_node_ids.append(node_id)\n display_id = node_info.get(\"override_display_id\", unique_id)\n dynprompt.add_ephemeral_node(node_id, node_info, unique_id, display_id)\n # Figure out if the newly created node is an output node\n class_type = node_info[\"class_type\"]\n class_def = nodes.NODE_CLASS_MAPPINGS[class_type]\n if hasattr(class_def, 'OUTPUT_NODE') and class_def.OUTPUT_NODE == True:\n new_output_ids.append(node_id)\n for i in range(len(node_outputs)):\n if is_link(node_outputs[i]):\n from_node_id, from_socket = node_outputs[i][0], node_outputs[i][1]\n new_output_links.append((from_node_id, from_socket))\n cached_outputs.append((True, node_outputs))\n new_node_ids = set(new_node_ids)\n for cache in caches.all:\n subcache = await cache.ensure_subcache_for(unique_id, new_node_ids)\n subcache.clean_unused()\n for node_id in new_output_ids:\n execution_list.add_node(node_id)\n execution_list.cache_link(node_id, unique_id)\n for link in new_output_links:\n execution_list.add_strong_link(link[0], link[1], unique_id)\n pending_subgraph_results[unique_id] = cached_outputs\n return (ExecutionResult.PENDING, None, None)\n\n cache_entry = CacheEntry(ui=ui_outputs.get(unique_id), outputs=output_data)\n execution_list.cache_update(unique_id, cache_entry)\n await caches.outputs.set(unique_id, cache_entry)\n\n except comfy.model_management.InterruptProcessingException as iex:\n logging.info(\"Processing interrupted\")\n\n # skip formatting inputs/outputs\n error_details = {\n \"node_id\": real_node_id,\n }\n\n return (ExecutionResult.FAILURE, error_details, iex)\n except Exception as ex:\n typ, _, tb = sys.exc_info()\n exception_type = full_type_name(typ)\n input_data_formatted = {}\n if input_data_all is not None:\n input_data_formatted = {}\n for name, inputs in input_data_all.items():\n input_data_formatted[name] = [format_value(x) for x in inputs]\n\n logging.error(f\"!!! Exception during processing !!! {ex}\")\n logging.error(traceback.format_exc())\n tips = \"\"\n\n if comfy.model_management.is_oom(ex):\n tips = \"This error means you ran out of memory on your GPU.\\n\\nTIPS: If the workflow worked before you might have accidentally set the batch_size to a large number.\"\n logging.info(\"Memory summary: {}\".format(comfy.model_management.debug_memory_summary()))\n logging.error(\"Got an OOM, unloading all loaded models.\")\n comfy.model_management.unload_all_models()\n elif isinstance(ex, RuntimeError) and (\"mat1 and mat2 shapes\" in str(ex)) and \"Sampler\" in class_type:\n tips = \"\\n\\nTIPS: If you have any \\\"Load CLIP\\\" or \\\"*CLIP Loader\\\" nodes in your workflow connected to this sampler node make sure the correct file(s) and type is selected.\"\n\n error_details = {\n \"node_id\": real_node_id,\n \"exception_message\": \"{}\\n{}\".format(ex, tips),\n \"exception_type\": exception_type,\n \"traceback\": traceback.format_tb(tb),\n \"current_inputs\": input_data_formatted\n }\n\n return (ExecutionResult.FAILURE, error_details, ex)\n\n get_progress_state().finish_progress(unique_id)\n executed.add(unique_id)\n\n return (ExecutionResult.SUCCESS, None, None)",
"sha256": "2e5bc86e1d38b5660c32389f5e748907af4778deb01c80ad1961e267cead2c61",
"ast_sha256": "2f2435e08234bdaee0cc6be01329d987157ba1a1fca28202ae89be879d17431c",
"rechecked_at": "2026-11-01T22:52:03.404390+00:00"
},
"0.21.1:validate_inputs": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.21.1",
"commit": "26515acd23fa291a8f5ab53c5997258598de0701",
"path": "execution.py",
"file": "source-text/0.21.1__execution.py.txt",
"sha256": "346f83f0730ea32d42b989af3a96ba0d201db9f87fed958bdd0b6ac21e60d042",
"git_blob_sha1": "f37d0360d55ccbb16a8f11bbdf065324ab7409b4",
"retrieved_at": "2026-11-01T22:49:50.156663+00:00",
"request_key": "engine-0.21.1-execution.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "validate_inputs",
"lines": [
816,
1090
],
"text": "async def validate_inputs(prompt_id, prompt, item, validated, visiting=None):\n if visiting is None:\n visiting = []\n\n unique_id = item\n if unique_id in validated:\n return validated[unique_id]\n\n if unique_id in visiting:\n cycle_path_nodes = visiting[visiting.index(unique_id):] + [unique_id]\n cycle_nodes = list(dict.fromkeys(cycle_path_nodes))\n cycle_path = \" -> \".join(f\"{node_id} ({prompt[node_id]['class_type']})\" for node_id in cycle_path_nodes)\n for node_id in cycle_nodes:\n validated[node_id] = (False, [{\n \"type\": \"dependency_cycle\",\n \"message\": \"Dependency cycle detected\",\n \"details\": cycle_path,\n \"extra_info\": {\n \"node_id\": node_id,\n \"cycle_nodes\": cycle_nodes,\n }\n }], node_id)\n return validated[unique_id]\n\n inputs = prompt[unique_id]['inputs']\n class_type = prompt[unique_id]['class_type']\n obj_class = nodes.NODE_CLASS_MAPPINGS[class_type]\n\n errors = []\n valid = True\n\n v3_data = None\n validate_function_inputs = []\n validate_has_kwargs = False\n if issubclass(obj_class, _ComfyNodeInternal):\n obj_class: _io._ComfyNodeBaseInternal\n class_inputs = obj_class.INPUT_TYPES()\n class_inputs, _, v3_data = _io.get_finalized_class_inputs(class_inputs, inputs)\n validate_function_name = \"validate_inputs\"\n validate_function = first_real_override(obj_class, validate_function_name)\n else:\n class_inputs = obj_class.INPUT_TYPES()\n validate_function_name = \"VALIDATE_INPUTS\"\n validate_function = getattr(obj_class, validate_function_name, None)\n if validate_function is not None:\n argspec = inspect.getfullargspec(validate_function)\n validate_function_inputs = argspec.args\n validate_has_kwargs = argspec.varkw is not None\n received_types = {}\n\n valid_inputs = set(class_inputs.get('required',{})).union(set(class_inputs.get('optional',{})))\n\n for x in valid_inputs:\n input_type, input_category, extra_info = get_input_info(obj_class, x, class_inputs)\n assert extra_info is not None\n if x not in inputs:\n if input_category == \"required\":\n details = f\"{x}\" if not v3_data else x.split(\".\")[-1]\n error = {\n \"type\": \"required_input_missing\",\n \"message\": \"Required input is missing\",\n \"details\": details,\n \"extra_info\": {\n \"input_name\": x\n }\n }\n errors.append(error)\n continue\n\n val = inputs[x]\n info = (input_type, extra_info)\n if isinstance(val, list):\n if len(val) != 2:\n error = {\n \"type\": \"bad_linked_input\",\n \"message\": \"Bad linked input, must be a length-2 list of [node_id, slot_index]\",\n \"details\": f\"{x}\",\n \"extra_info\": {\n \"input_name\": x,\n \"input_config\": info,\n \"received_value\": val\n }\n }\n errors.append(error)\n continue\n\n o_id = val[0]\n o_class_type = prompt[o_id]['class_type']\n r = nodes.NODE_CLASS_MAPPINGS[o_class_type].RETURN_TYPES\n received_type = r[val[1]]\n received_types[x] = received_type\n if 'input_types' not in validate_function_inputs and not validate_node_input(received_type, input_type):\n details = f\"{x}, received_type({received_type}) mismatch input_type({input_type})\"\n error = {\n \"type\": \"return_type_mismatch\",\n \"message\": \"Return type mismatch between linked nodes\",\n \"details\": details,\n \"extra_info\": {\n \"input_name\": x,\n \"input_config\": info,\n \"received_type\": received_type,\n \"linked_node\": val\n }\n }\n errors.append(error)\n continue\n try:\n visiting.append(unique_id)\n try:\n r = await validate_inputs(prompt_id, prompt, o_id, validated, visiting)\n finally:\n visiting.pop()\n if r[0] is False:\n # `r` will be set in `validated[o_id]` already\n valid = False\n continue\n except Exception as ex:\n typ, _, tb = sys.exc_info()\n valid = False\n exception_type = full_type_name(typ)\n reasons = [{\n \"type\": \"exception_during_inner_validation\",\n \"message\": \"Exception when validating inner node\",\n \"details\": str(ex),\n \"extra_info\": {\n \"input_name\": x,\n \"input_config\": info,\n \"exception_message\": str(ex),\n \"exception_type\": exception_type,\n \"traceback\": traceback.format_tb(tb),\n \"linked_node\": val\n }\n }]\n validated[o_id] = (False, reasons, o_id)\n continue\n else:\n try:\n # Unwraps values wrapped in __value__ key or typed wrapper.\n # This is used to pass list widget values to execution,\n # as by default list value is reserved to represent the\n # connection between nodes.\n if isinstance(val, dict):\n if \"__value__\" in val:\n val = val[\"__value__\"]\n inputs[x] = val\n\n if input_type == \"INT\":\n val = int(val)\n inputs[x] = val\n if input_type == \"FLOAT\":\n val = float(val)\n inputs[x] = val\n if input_type == \"STRING\":\n val = str(val)\n inputs[x] = val\n if input_type == \"BOOLEAN\":\n val = bool(val)\n inputs[x] = val\n except Exception as ex:\n error = {\n \"type\": \"invalid_input_type\",\n \"message\": f\"Failed to convert an input value to a {input_type} value\",\n \"details\": f\"{x}, {val}, {ex}\",\n \"extra_info\": {\n \"input_name\": x,\n \"input_config\": info,\n \"received_value\": val,\n \"exception_message\": str(ex)\n }\n }\n errors.append(error)\n continue\n\n if x not in validate_function_inputs and not validate_has_kwargs:\n if \"min\" in extra_info and val < extra_info[\"min\"]:\n error = {\n \"type\": \"value_smaller_than_min\",\n \"message\": \"Value {} smaller than min of {}\".format(val, extra_info[\"min\"]),\n \"details\": f\"{x}\",\n \"extra_info\": {\n \"input_name\": x,\n \"input_config\": info,\n \"received_value\": val,\n }\n }\n errors.append(error)\n continue\n if \"max\" in extra_info and val > extra_info[\"max\"]:\n error = {\n \"type\": \"value_bigger_than_max\",\n \"message\": \"Value {} bigger than max of {}\".format(val, extra_info[\"max\"]),\n \"details\": f\"{x}\",\n \"extra_info\": {\n \"input_name\": x,\n \"input_config\": info,\n \"received_value\": val,\n }\n }\n errors.append(error)\n continue\n\n if isinstance(input_type, list) or input_type == io.Combo.io_type:\n if input_type == io.Combo.io_type:\n combo_options = extra_info.get(\"options\", [])\n else:\n combo_options = input_type\n is_multiselect = extra_info.get(\"multiselect\", False)\n if is_multiselect and isinstance(val, list):\n invalid_vals = [v for v in val if v not in combo_options]\n else:\n invalid_vals = [val] if val not in combo_options else []\n if invalid_vals:\n input_config = info\n list_info = \"\"\n\n # Don't send back gigantic lists like if they're lots of\n # scanned model filepaths\n if len(combo_options) > 20:\n list_info = f\"(list of length {len(combo_options)})\"\n input_config = None\n else:\n list_info = str(combo_options)\n\n error = {\n \"type\": \"value_not_in_list\",\n \"message\": \"Value not in list\",\n \"details\": f\"{x}: {', '.join(repr(v) for v in invalid_vals)} not in {list_info}\",\n \"extra_info\": {\n \"input_name\": x,\n \"input_config\": input_config,\n \"received_value\": val,\n }\n }\n errors.append(error)\n continue\n\n if len(validate_function_inputs) > 0 or validate_has_kwargs:\n input_data_all, _, v3_data = get_input_data(inputs, obj_class, unique_id)\n input_filtered = {}\n for x in input_data_all:\n if x in validate_function_inputs or validate_has_kwargs:\n input_filtered[x] = input_data_all[x]\n if 'input_types' in validate_function_inputs:\n input_filtered['input_types'] = [received_types]\n\n ret = await _async_map_node_over_list(prompt_id, unique_id, obj_class, input_filtered, validate_function_name, v3_data=v3_data)\n ret = await resolve_map_node_over_list_results(ret)\n for x in input_filtered:\n for i, r in enumerate(ret):\n if r is not True and not isinstance(r, ExecutionBlocker):\n details = f\"{x}\"\n if r is not False:\n details += f\" - {str(r)}\"\n\n error = {\n \"type\": \"custom_validation_failed\",\n \"message\": \"Custom validation failed for node\",\n \"details\": details,\n \"extra_info\": {\n \"input_name\": x,\n }\n }\n errors.append(error)\n continue\n\n ret = validated.get(unique_id, (True, [], unique_id))\n # Recursive cycle detection may have already populated an error on us. Join it.\n ret = (\n ret[0] and valid is True and not errors,\n ret[1] + [error for error in errors if error not in ret[1]],\n unique_id,\n )\n\n validated[unique_id] = ret\n return ret",
"sha256": "4cbb5ec0274f46e2220a3ff8ccea865b0d6850d7863fd4cc4d9a523e503fcac1",
"ast_sha256": "9021e9589ce7f78845b7b877831035a5fde80bd54d5c73bfc95252b523dfc6ff",
"rechecked_at": "2026-11-01T22:52:03.405517+00:00"
},
"0.21.1:validate_prompt": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.21.1",
"commit": "26515acd23fa291a8f5ab53c5997258598de0701",
"path": "execution.py",
"file": "source-text/0.21.1__execution.py.txt",
"sha256": "346f83f0730ea32d42b989af3a96ba0d201db9f87fed958bdd0b6ac21e60d042",
"git_blob_sha1": "f37d0360d55ccbb16a8f11bbdf065324ab7409b4",
"retrieved_at": "2026-11-01T22:49:50.156663+00:00",
"request_key": "engine-0.21.1-execution.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "validate_prompt",
"lines": [
1098,
1217
],
"text": "async def validate_prompt(prompt_id, prompt, partial_execution_list: Union[list[str], None]):\n outputs = set()\n for x in prompt:\n if 'class_type' not in prompt[x]:\n node_data = prompt[x]\n node_title = node_data.get('_meta', {}).get('title')\n error = {\n \"type\": \"missing_node_type\",\n \"message\": f\"Node '{node_title or f'ID #{x}'}' has no class_type. The workflow may be corrupted or a custom node is missing.\",\n \"details\": f\"Node ID '#{x}'\",\n \"extra_info\": {\n \"node_id\": x,\n \"class_type\": None,\n \"node_title\": node_title\n }\n }\n return (False, error, [], {})\n\n class_type = prompt[x]['class_type']\n class_ = nodes.NODE_CLASS_MAPPINGS.get(class_type, None)\n if class_ is None:\n node_data = prompt[x]\n node_title = node_data.get('_meta', {}).get('title', class_type)\n error = {\n \"type\": \"missing_node_type\",\n \"message\": f\"Node '{node_title}' not found. The custom node may not be installed.\",\n \"details\": f\"Node ID '#{x}'\",\n \"extra_info\": {\n \"node_id\": x,\n \"class_type\": class_type,\n \"node_title\": node_title\n }\n }\n return (False, error, [], {})\n\n if hasattr(class_, 'OUTPUT_NODE') and class_.OUTPUT_NODE is True:\n if partial_execution_list is None or x in partial_execution_list:\n outputs.add(x)\n\n if len(outputs) == 0:\n error = {\n \"type\": \"prompt_no_outputs\",\n \"message\": \"Prompt has no outputs\",\n \"details\": \"\",\n \"extra_info\": {}\n }\n return (False, error, [], {})\n\n good_outputs = set()\n errors = []\n node_errors = {}\n validated = {}\n for o in outputs:\n valid = False\n reasons = []\n try:\n m = await validate_inputs(prompt_id, prompt, o, validated)\n valid = m[0]\n reasons = m[1]\n except Exception as ex:\n typ, _, tb = sys.exc_info()\n valid = False\n exception_type = full_type_name(typ)\n reasons = [{\n \"type\": \"exception_during_validation\",\n \"message\": \"Exception when validating node\",\n \"details\": str(ex),\n \"extra_info\": {\n \"exception_type\": exception_type,\n \"traceback\": traceback.format_tb(tb)\n }\n }]\n validated[o] = (False, reasons, o)\n\n if valid is True:\n good_outputs.add(o)\n else:\n logging.error(f\"Failed to validate prompt for output {o}:\")\n if len(reasons) > 0:\n logging.error(\"* (prompt):\")\n for reason in reasons:\n logging.error(f\" - {reason['message']}: {reason['details']}\")\n errors += [(o, reasons)]\n for node_id, result in validated.items():\n valid = result[0]\n reasons = result[1]\n # If a node upstream has errors, the nodes downstream will also\n # be reported as invalid, but there will be no errors attached.\n # So don't return those nodes as having errors in the response.\n if valid is not True and len(reasons) > 0:\n if node_id not in node_errors:\n class_type = prompt[node_id]['class_type']\n node_errors[node_id] = {\n \"errors\": reasons,\n \"dependent_outputs\": [],\n \"class_type\": class_type\n }\n logging.error(f\"* {class_type} {node_id}:\")\n for reason in reasons:\n logging.error(f\" - {reason['message']}: {reason['details']}\")\n node_errors[node_id][\"dependent_outputs\"].append(o)\n logging.error(\"Output will be ignored\")\n\n if len(good_outputs) == 0:\n errors_list = []\n for o, errors in errors:\n for error in errors:\n errors_list.append(f\"{error['message']}: {error['details']}\")\n errors_list = \"\\n\".join(errors_list)\n\n error = {\n \"type\": \"prompt_outputs_failed_validation\",\n \"message\": \"Prompt outputs failed validation\",\n \"details\": errors_list,\n \"extra_info\": {}\n }\n\n return (False, error, list(good_outputs), node_errors)\n\n return (True, None, list(good_outputs), node_errors)",
"sha256": "cdad010ba8cf4faacb8c7d5a4cd1f277d87c41cc7821ac463af6c0d2bcf5116b",
"ast_sha256": "6e7a5d4d646d17a5e0ddc98cd9e84b830f76f34482ce50ea49e70d4edfed12ed",
"rechecked_at": "2026-11-01T22:52:03.406119+00:00"
},
"0.17.0:get_input_data": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.17.0",
"commit": "63d1bbdb407c69370d407ce5ced6ca3f917528a8",
"path": "execution.py",
"file": "source-text/0.17.0__execution.py.txt",
"sha256": "31804bcf4dde838bb7a9968b2614f6e7f45b082e0bf6fb5cbaa05cca1fd11e1c",
"git_blob_sha1": "a7791efedc695be279a380a64df482c2196b0b01",
"retrieved_at": "2026-11-01T22:49:50.747991+00:00",
"request_key": "engine-0.17.0-execution.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "get_input_data",
"lines": [
152,
216
],
"text": "def get_input_data(inputs, class_def, unique_id, execution_list=None, dynprompt=None, extra_data={}):\n is_v3 = issubclass(class_def, _ComfyNodeInternal)\n v3_data: io.V3Data = {}\n hidden_inputs_v3 = {}\n valid_inputs = class_def.INPUT_TYPES()\n if is_v3:\n valid_inputs, hidden, v3_data = _io.get_finalized_class_inputs(valid_inputs, inputs)\n input_data_all = {}\n missing_keys = {}\n for x in inputs:\n input_data = inputs[x]\n _, input_category, input_info = get_input_info(class_def, x, valid_inputs)\n def mark_missing():\n missing_keys[x] = True\n input_data_all[x] = (None,)\n if is_link(input_data) and (not input_info or not input_info.get(\"rawLink\", False)):\n input_unique_id = input_data[0]\n output_index = input_data[1]\n if execution_list is None:\n mark_missing()\n continue # This might be a lazily-evaluated input\n cached = execution_list.get_cache(input_unique_id, unique_id)\n if cached is None or cached.outputs is None:\n mark_missing()\n continue\n if output_index >= len(cached.outputs):\n mark_missing()\n continue\n obj = cached.outputs[output_index]\n input_data_all[x] = obj\n elif input_category is not None or (is_v3 and class_def.ACCEPT_ALL_INPUTS):\n input_data_all[x] = [input_data]\n\n if is_v3:\n if hidden is not None:\n if io.Hidden.prompt.name in hidden:\n hidden_inputs_v3[io.Hidden.prompt] = dynprompt.get_original_prompt() if dynprompt is not None else {}\n if io.Hidden.dynprompt.name in hidden:\n hidden_inputs_v3[io.Hidden.dynprompt] = dynprompt\n if io.Hidden.extra_pnginfo.name in hidden:\n hidden_inputs_v3[io.Hidden.extra_pnginfo] = extra_data.get('extra_pnginfo', None)\n if io.Hidden.unique_id.name in hidden:\n hidden_inputs_v3[io.Hidden.unique_id] = unique_id\n if io.Hidden.auth_token_comfy_org.name in hidden:\n hidden_inputs_v3[io.Hidden.auth_token_comfy_org] = extra_data.get(\"auth_token_comfy_org\", None)\n if io.Hidden.api_key_comfy_org.name in hidden:\n hidden_inputs_v3[io.Hidden.api_key_comfy_org] = extra_data.get(\"api_key_comfy_org\", None)\n else:\n if \"hidden\" in valid_inputs:\n h = valid_inputs[\"hidden\"]\n for x in h:\n if h[x] == \"PROMPT\":\n input_data_all[x] = [dynprompt.get_original_prompt() if dynprompt is not None else {}]\n if h[x] == \"DYNPROMPT\":\n input_data_all[x] = [dynprompt]\n if h[x] == \"EXTRA_PNGINFO\":\n input_data_all[x] = [extra_data.get('extra_pnginfo', None)]\n if h[x] == \"UNIQUE_ID\":\n input_data_all[x] = [unique_id]\n if h[x] == \"AUTH_TOKEN_COMFY_ORG\":\n input_data_all[x] = [extra_data.get(\"auth_token_comfy_org\", None)]\n if h[x] == \"API_KEY_COMFY_ORG\":\n input_data_all[x] = [extra_data.get(\"api_key_comfy_org\", None)]\n v3_data[\"hidden_inputs\"] = hidden_inputs_v3\n return input_data_all, missing_keys, v3_data",
"sha256": "e1174b20dd4b4a85233de01732f5af0227d1d4546dfe2b4033cf5155cacf896a",
"ast_sha256": "7653936f20493b80cf828320e3238e2d0e390e98777dd7dea370e5e8f8ec1451",
"rechecked_at": "2026-11-01T22:52:03.411032+00:00"
},
"0.17.0:_async_map_node_over_list": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.17.0",
"commit": "63d1bbdb407c69370d407ce5ced6ca3f917528a8",
"path": "execution.py",
"file": "source-text/0.17.0__execution.py.txt",
"sha256": "31804bcf4dde838bb7a9968b2614f6e7f45b082e0bf6fb5cbaa05cca1fd11e1c",
"git_blob_sha1": "a7791efedc695be279a380a64df482c2196b0b01",
"retrieved_at": "2026-11-01T22:49:50.747991+00:00",
"request_key": "engine-0.17.0-execution.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "_async_map_node_over_list",
"lines": [
232,
308
],
"text": "async def _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, func, allow_interrupt=False, execution_block_cb=None, pre_execute_cb=None, v3_data=None):\n # check if node wants the lists\n input_is_list = getattr(obj, \"INPUT_IS_LIST\", False)\n\n if len(input_data_all) == 0:\n max_len_input = 0\n else:\n max_len_input = max(len(x) for x in input_data_all.values())\n\n # get a slice of inputs, repeat last input when list isn't long enough\n def slice_dict(d, i):\n return {k: v[i if len(v) > i else -1] for k, v in d.items()}\n\n results = []\n async def process_inputs(inputs, index=None, input_is_list=False):\n if allow_interrupt:\n nodes.before_node_execution()\n execution_block = None\n for k, v in inputs.items():\n if input_is_list:\n for e in v:\n if isinstance(e, ExecutionBlocker):\n v = e\n break\n if isinstance(v, ExecutionBlocker):\n execution_block = execution_block_cb(v) if execution_block_cb else v\n break\n if execution_block is None:\n if pre_execute_cb is not None and index is not None:\n pre_execute_cb(index)\n # V3\n if isinstance(obj, _ComfyNodeInternal) or (is_class(obj) and issubclass(obj, _ComfyNodeInternal)):\n # if is just a class, then assign no state, just create clone\n if is_class(obj):\n type_obj = obj\n obj.VALIDATE_CLASS()\n class_clone = obj.PREPARE_CLASS_CLONE(v3_data)\n # otherwise, use class instance to populate/reuse some fields\n else:\n type_obj = type(obj)\n type_obj.VALIDATE_CLASS()\n class_clone = type_obj.PREPARE_CLASS_CLONE(v3_data)\n f = make_locked_method_func(type_obj, func, class_clone)\n # in case of dynamic inputs, restructure inputs to expected nested dict\n if v3_data is not None:\n inputs = _io.build_nested_inputs(inputs, v3_data)\n # V1\n else:\n f = getattr(obj, func)\n if inspect.iscoroutinefunction(f):\n async def async_wrapper(f, prompt_id, unique_id, list_index, args):\n with CurrentNodeContext(prompt_id, unique_id, list_index):\n return await f(**args)\n task = asyncio.create_task(async_wrapper(f, prompt_id, unique_id, index, args=inputs))\n # Give the task a chance to execute without yielding\n await asyncio.sleep(0)\n if task.done():\n result = task.result()\n results.append(result)\n else:\n results.append(task)\n else:\n with CurrentNodeContext(prompt_id, unique_id, index):\n result = f(**inputs)\n results.append(result)\n else:\n results.append(execution_block)\n\n if input_is_list:\n await process_inputs(input_data_all, 0, input_is_list=input_is_list)\n elif max_len_input == 0:\n await process_inputs({})\n else:\n for i in range(max_len_input):\n input_dict = slice_dict(input_data_all, i)\n await process_inputs(input_dict, i)\n return results",
"sha256": "72efe9f534acaa6dd7f04b95c762c62d663bbb2b9380f5931c8a8860695606cd",
"ast_sha256": "6e231c5064aceab99c417d2fdb73e6072ed56f7cd2efe3e773b17d1967920fac",
"rechecked_at": "2026-11-01T22:52:03.411481+00:00"
},
"0.17.0:get_output_data": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.17.0",
"commit": "63d1bbdb407c69370d407ce5ced6ca3f917528a8",
"path": "execution.py",
"file": "source-text/0.17.0__execution.py.txt",
"sha256": "31804bcf4dde838bb7a9968b2614f6e7f45b082e0bf6fb5cbaa05cca1fd11e1c",
"git_blob_sha1": "a7791efedc695be279a380a64df482c2196b0b01",
"retrieved_at": "2026-11-01T22:49:50.747991+00:00",
"request_key": "engine-0.17.0-execution.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "get_output_data",
"lines": [
332,
338
],
"text": "async def get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=None, pre_execute_cb=None, v3_data=None):\n return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)\n has_pending_task = any(isinstance(r, asyncio.Task) and not r.done() for r in return_values)\n if has_pending_task:\n return return_values, {}, False, has_pending_task\n output, ui, has_subgraph = get_output_from_returns(return_values, obj)\n return output, ui, has_subgraph, False",
"sha256": "e63d71bd6698a1e7706a543519398b8597c99082abd8a6a13c419a1e51f2eb8b",
"ast_sha256": "97a5dcdf3db16366546b1a1cd811d6ca6724cbd9b5a6141e3dd22c6aae95c527",
"rechecked_at": "2026-11-01T22:52:03.411655+00:00"
},
"0.17.0:get_output_from_returns": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.17.0",
"commit": "63d1bbdb407c69370d407ce5ced6ca3f917528a8",
"path": "execution.py",
"file": "source-text/0.17.0__execution.py.txt",
"sha256": "31804bcf4dde838bb7a9968b2614f6e7f45b082e0bf6fb5cbaa05cca1fd11e1c",
"git_blob_sha1": "a7791efedc695be279a380a64df482c2196b0b01",
"retrieved_at": "2026-11-01T22:49:50.747991+00:00",
"request_key": "engine-0.17.0-execution.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "get_output_from_returns",
"lines": [
340,
403
],
"text": "def get_output_from_returns(return_values, obj):\n results = []\n uis = []\n subgraph_results = []\n has_subgraph = False\n for i in range(len(return_values)):\n r = return_values[i]\n if isinstance(r, dict):\n if 'ui' in r:\n uis.append(r['ui'])\n if 'expand' in r:\n # Perform an expansion, but do not append results\n has_subgraph = True\n new_graph = r['expand']\n result = r.get(\"result\", None)\n if isinstance(result, ExecutionBlocker):\n result = tuple([result] * len(obj.RETURN_TYPES))\n subgraph_results.append((new_graph, result))\n elif 'result' in r:\n result = r.get(\"result\", None)\n if isinstance(result, ExecutionBlocker):\n result = tuple([result] * len(obj.RETURN_TYPES))\n results.append(result)\n subgraph_results.append((None, result))\n elif isinstance(r, _NodeOutputInternal):\n # V3\n if r.ui is not None:\n if isinstance(r.ui, dict):\n uis.append(r.ui)\n else:\n uis.append(r.ui.as_dict())\n if r.expand is not None:\n has_subgraph = True\n new_graph = r.expand\n result = r.result\n if r.block_execution is not None:\n result = tuple([ExecutionBlocker(r.block_execution)] * len(obj.RETURN_TYPES))\n subgraph_results.append((new_graph, result))\n elif r.result is not None:\n result = r.result\n if r.block_execution is not None:\n result = tuple([ExecutionBlocker(r.block_execution)] * len(obj.RETURN_TYPES))\n results.append(result)\n subgraph_results.append((None, result))\n else:\n if isinstance(r, ExecutionBlocker):\n r = tuple([r] * len(obj.RETURN_TYPES))\n results.append(r)\n subgraph_results.append((None, r))\n\n if has_subgraph:\n output = subgraph_results\n elif len(results) > 0:\n output = merge_result_data(results, obj)\n else:\n output = []\n ui = dict()\n # TODO: Think there's an existing bug here\n # If we're performing a subgraph expansion, we probably shouldn't be returning UI values yet.\n # They'll get cached without the completed subgraphs. It's an edge case and I'm not aware of\n # any nodes that use both subgraph expansion and custom UI outputs, but might be a problem in the future.\n if len(uis) > 0:\n ui = {k: [y for x in uis for y in x[k]] for k in uis[0].keys()}\n return output, ui, has_subgraph",
"sha256": "b271bc88fd782995961367b9b456b40be1a511afefa6311348deb062eb40dcc7",
"ast_sha256": "c1a5d8094611dad458e16ab22174e035e3dd38683b72469d6885c6dc65fa1e28",
"rechecked_at": "2026-11-01T22:52:03.412070+00:00"
},
"0.17.0:merge_result_data": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.17.0",
"commit": "63d1bbdb407c69370d407ce5ced6ca3f917528a8",
"path": "execution.py",
"file": "source-text/0.17.0__execution.py.txt",
"sha256": "31804bcf4dde838bb7a9968b2614f6e7f45b082e0bf6fb5cbaa05cca1fd11e1c",
"git_blob_sha1": "a7791efedc695be279a380a64df482c2196b0b01",
"retrieved_at": "2026-11-01T22:49:50.747991+00:00",
"request_key": "engine-0.17.0-execution.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "merge_result_data",
"lines": [
311,
330
],
"text": "def merge_result_data(results, obj):\n # check which outputs need concatenating\n output = []\n output_is_list = [False] * len(results[0])\n if hasattr(obj, \"OUTPUT_IS_LIST\"):\n output_is_list = obj.OUTPUT_IS_LIST\n\n # merge node execution results\n for i, is_list in zip(range(len(results[0])), output_is_list):\n if is_list:\n value = []\n for o in results:\n if isinstance(o[i], ExecutionBlocker):\n value.append(o[i])\n else:\n value.extend(o[i])\n output.append(value)\n else:\n output.append([o[i] for o in results])\n return output",
"sha256": "5a7eca11c7639a11260579423d3c6ba59e9380dbfcbd910ab16da86c2753804e",
"ast_sha256": "f347caa26c38ba64742efe5c0e163866ae3890c50b6a5800ef41998604f3a57d",
"rechecked_at": "2026-11-01T22:52:03.412227+00:00"
},
"0.17.0:execute": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.17.0",
"commit": "63d1bbdb407c69370d407ce5ced6ca3f917528a8",
"path": "execution.py",
"file": "source-text/0.17.0__execution.py.txt",
"sha256": "31804bcf4dde838bb7a9968b2614f6e7f45b082e0bf6fb5cbaa05cca1fd11e1c",
"git_blob_sha1": "a7791efedc695be279a380a64df482c2196b0b01",
"retrieved_at": "2026-11-01T22:49:50.747991+00:00",
"request_key": "engine-0.17.0-execution.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "execute",
"lines": [
413,
636
],
"text": "async def execute(server, dynprompt, caches, current_item, extra_data, executed, prompt_id, execution_list, pending_subgraph_results, pending_async_nodes, ui_outputs):\n unique_id = current_item\n real_node_id = dynprompt.get_real_node_id(unique_id)\n display_node_id = dynprompt.get_display_node_id(unique_id)\n parent_node_id = dynprompt.get_parent_node_id(unique_id)\n inputs = dynprompt.get_node(unique_id)['inputs']\n class_type = dynprompt.get_node(unique_id)['class_type']\n class_def = nodes.NODE_CLASS_MAPPINGS[class_type]\n cached = caches.outputs.get(unique_id)\n if cached is not None:\n if server.client_id is not None:\n cached_ui = cached.ui or {}\n server.send_sync(\"executed\", { \"node\": unique_id, \"display_node\": display_node_id, \"output\": cached_ui.get(\"output\",None), \"prompt_id\": prompt_id }, server.client_id)\n if cached.ui is not None:\n ui_outputs[unique_id] = cached.ui\n get_progress_state().finish_progress(unique_id)\n execution_list.cache_update(unique_id, cached)\n return (ExecutionResult.SUCCESS, None, None)\n\n input_data_all = None\n try:\n if unique_id in pending_async_nodes:\n results = []\n for r in pending_async_nodes[unique_id]:\n if isinstance(r, asyncio.Task):\n try:\n results.append(r.result())\n except Exception as ex:\n # An async task failed - propagate the exception up\n del pending_async_nodes[unique_id]\n raise ex\n else:\n results.append(r)\n del pending_async_nodes[unique_id]\n output_data, output_ui, has_subgraph = get_output_from_returns(results, class_def)\n elif unique_id in pending_subgraph_results:\n cached_results = pending_subgraph_results[unique_id]\n resolved_outputs = []\n for is_subgraph, result in cached_results:\n if not is_subgraph:\n resolved_outputs.append(result)\n else:\n resolved_output = []\n for r in result:\n if is_link(r):\n source_node, source_output = r[0], r[1]\n node_cached = execution_list.get_cache(source_node, unique_id)\n for o in node_cached.outputs[source_output]:\n resolved_output.append(o)\n\n else:\n resolved_output.append(r)\n resolved_outputs.append(tuple(resolved_output))\n output_data = merge_result_data(resolved_outputs, class_def)\n output_ui = []\n del pending_subgraph_results[unique_id]\n has_subgraph = False\n else:\n get_progress_state().start_progress(unique_id)\n input_data_all, missing_keys, v3_data = get_input_data(inputs, class_def, unique_id, execution_list, dynprompt, extra_data)\n if server.client_id is not None:\n server.last_node_id = display_node_id\n server.send_sync(\"executing\", { \"node\": unique_id, \"display_node\": display_node_id, \"prompt_id\": prompt_id }, server.client_id)\n\n obj = caches.objects.get(unique_id)\n if obj is None:\n obj = class_def()\n caches.objects.set(unique_id, obj)\n\n if issubclass(class_def, _ComfyNodeInternal):\n lazy_status_present = first_real_override(class_def, \"check_lazy_status\") is not None\n else:\n lazy_status_present = getattr(obj, \"check_lazy_status\", None) is not None\n if lazy_status_present:\n # for check_lazy_status, the returned data should include the original key of the input\n v3_data_lazy = v3_data.copy()\n v3_data_lazy[\"create_dynamic_tuple\"] = True\n required_inputs = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, \"check_lazy_status\", allow_interrupt=True, v3_data=v3_data_lazy)\n required_inputs = await resolve_map_node_over_list_results(required_inputs)\n required_inputs = set(sum([r for r in required_inputs if isinstance(r,list)], []))\n required_inputs = [x for x in required_inputs if isinstance(x,str) and (\n x not in input_data_all or x in missing_keys\n )]\n if len(required_inputs) > 0:\n for i in required_inputs:\n execution_list.make_input_strong_link(unique_id, i)\n return (ExecutionResult.PENDING, None, None)\n\n def execution_block_cb(block):\n if block.message is not None:\n mes = {\n \"prompt_id\": prompt_id,\n \"node_id\": unique_id,\n \"node_type\": class_type,\n \"executed\": list(executed),\n\n \"exception_message\": f\"Execution Blocked: {block.message}\",\n \"exception_type\": \"ExecutionBlocked\",\n \"traceback\": [],\n \"current_inputs\": [],\n \"current_outputs\": [],\n }\n server.send_sync(\"execution_error\", mes, server.client_id)\n return ExecutionBlocker(None)\n else:\n return block\n def pre_execute_cb(call_index):\n # TODO - How to handle this with async functions without contextvars (which requires Python 3.12)?\n GraphBuilder.set_default_prefix(unique_id, call_index, 0)\n\n try:\n output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)\n finally:\n if comfy.memory_management.aimdo_enabled:\n if args.verbose == \"DEBUG\":\n comfy_aimdo.control.analyze()\n comfy.model_management.reset_cast_buffers()\n comfy_aimdo.model_vbar.vbars_reset_watermark_limits()\n\n if has_pending_tasks:\n pending_async_nodes[unique_id] = output_data\n unblock = execution_list.add_external_block(unique_id)\n async def await_completion():\n tasks = [x for x in output_data if isinstance(x, asyncio.Task)]\n await asyncio.gather(*tasks, return_exceptions=True)\n unblock()\n asyncio.create_task(await_completion())\n return (ExecutionResult.PENDING, None, None)\n if len(output_ui) > 0:\n ui_outputs[unique_id] = {\n \"meta\": {\n \"node_id\": unique_id,\n \"display_node\": display_node_id,\n \"parent_node\": parent_node_id,\n \"real_node_id\": real_node_id,\n },\n \"output\": output_ui\n }\n if server.client_id is not None:\n server.send_sync(\"executed\", { \"node\": unique_id, \"display_node\": display_node_id, \"output\": output_ui, \"prompt_id\": prompt_id }, server.client_id)\n if has_subgraph:\n cached_outputs = []\n new_node_ids = []\n new_output_ids = []\n new_output_links = []\n for i in range(len(output_data)):\n new_graph, node_outputs = output_data[i]\n if new_graph is None:\n cached_outputs.append((False, node_outputs))\n else:\n for node_id, node_info in new_graph.items():\n new_node_ids.append(node_id)\n display_id = node_info.get(\"override_display_id\", unique_id)\n dynprompt.add_ephemeral_node(node_id, node_info, unique_id, display_id)\n # Figure out if the newly created node is an output node\n class_type = node_info[\"class_type\"]\n class_def = nodes.NODE_CLASS_MAPPINGS[class_type]\n if hasattr(class_def, 'OUTPUT_NODE') and class_def.OUTPUT_NODE == True:\n new_output_ids.append(node_id)\n for i in range(len(node_outputs)):\n if is_link(node_outputs[i]):\n from_node_id, from_socket = node_outputs[i][0], node_outputs[i][1]\n new_output_links.append((from_node_id, from_socket))\n cached_outputs.append((True, node_outputs))\n new_node_ids = set(new_node_ids)\n for cache in caches.all:\n subcache = await cache.ensure_subcache_for(unique_id, new_node_ids)\n subcache.clean_unused()\n for node_id in new_output_ids:\n execution_list.add_node(node_id)\n execution_list.cache_link(node_id, unique_id)\n for link in new_output_links:\n execution_list.add_strong_link(link[0], link[1], unique_id)\n pending_subgraph_results[unique_id] = cached_outputs\n return (ExecutionResult.PENDING, None, None)\n\n cache_entry = CacheEntry(ui=ui_outputs.get(unique_id), outputs=output_data)\n execution_list.cache_update(unique_id, cache_entry)\n caches.outputs.set(unique_id, cache_entry)\n\n except comfy.model_management.InterruptProcessingException as iex:\n logging.info(\"Processing interrupted\")\n\n # skip formatting inputs/outputs\n error_details = {\n \"node_id\": real_node_id,\n }\n\n return (ExecutionResult.FAILURE, error_details, iex)\n except Exception as ex:\n typ, _, tb = sys.exc_info()\n exception_type = full_type_name(typ)\n input_data_formatted = {}\n if input_data_all is not None:\n input_data_formatted = {}\n for name, inputs in input_data_all.items():\n input_data_formatted[name] = [format_value(x) for x in inputs]\n\n logging.error(f\"!!! Exception during processing !!! {ex}\")\n logging.error(traceback.format_exc())\n tips = \"\"\n\n if comfy.model_management.is_oom(ex):\n tips = \"This error means you ran out of memory on your GPU.\\n\\nTIPS: If the workflow worked before you might have accidentally set the batch_size to a large number.\"\n logging.info(\"Memory summary: {}\".format(comfy.model_management.debug_memory_summary()))\n logging.error(\"Got an OOM, unloading all loaded models.\")\n comfy.model_management.unload_all_models()\n elif isinstance(ex, RuntimeError) and (\"mat1 and mat2 shapes\" in str(ex)) and \"Sampler\" in class_type:\n tips = \"\\n\\nTIPS: If you have any \\\"Load CLIP\\\" or \\\"*CLIP Loader\\\" nodes in your workflow connected to this sampler node make sure the correct file(s) and type is selected.\"\n\n error_details = {\n \"node_id\": real_node_id,\n \"exception_message\": \"{}\\n{}\".format(ex, tips),\n \"exception_type\": exception_type,\n \"traceback\": traceback.format_tb(tb),\n \"current_inputs\": input_data_formatted\n }\n\n return (ExecutionResult.FAILURE, error_details, ex)\n\n get_progress_state().finish_progress(unique_id)\n executed.add(unique_id)\n\n return (ExecutionResult.SUCCESS, None, None)",
"sha256": "9543ea67e3bb55d11ee37fc781af6e58a553e8a9be69bb492802343336bf5be6",
"ast_sha256": "4aed733aa621510574467a7ded96a02369c9d969ddc718a5812fb9cf3def2044",
"rechecked_at": "2026-11-01T22:52:03.413356+00:00"
},
"0.17.0:validate_inputs": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.17.0",
"commit": "63d1bbdb407c69370d407ce5ced6ca3f917528a8",
"path": "execution.py",
"file": "source-text/0.17.0__execution.py.txt",
"sha256": "31804bcf4dde838bb7a9968b2614f6e7f45b082e0bf6fb5cbaa05cca1fd11e1c",
"git_blob_sha1": "a7791efedc695be279a380a64df482c2196b0b01",
"retrieved_at": "2026-11-01T22:49:50.747991+00:00",
"request_key": "engine-0.17.0-execution.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "validate_inputs",
"lines": [
765,
1008
],
"text": "async def validate_inputs(prompt_id, prompt, item, validated):\n unique_id = item\n if unique_id in validated:\n return validated[unique_id]\n\n inputs = prompt[unique_id]['inputs']\n class_type = prompt[unique_id]['class_type']\n obj_class = nodes.NODE_CLASS_MAPPINGS[class_type]\n\n errors = []\n valid = True\n\n v3_data = None\n validate_function_inputs = []\n validate_has_kwargs = False\n if issubclass(obj_class, _ComfyNodeInternal):\n obj_class: _io._ComfyNodeBaseInternal\n class_inputs = obj_class.INPUT_TYPES()\n class_inputs, _, v3_data = _io.get_finalized_class_inputs(class_inputs, inputs)\n validate_function_name = \"validate_inputs\"\n validate_function = first_real_override(obj_class, validate_function_name)\n else:\n class_inputs = obj_class.INPUT_TYPES()\n validate_function_name = \"VALIDATE_INPUTS\"\n validate_function = getattr(obj_class, validate_function_name, None)\n if validate_function is not None:\n argspec = inspect.getfullargspec(validate_function)\n validate_function_inputs = argspec.args\n validate_has_kwargs = argspec.varkw is not None\n received_types = {}\n\n valid_inputs = set(class_inputs.get('required',{})).union(set(class_inputs.get('optional',{})))\n\n for x in valid_inputs:\n input_type, input_category, extra_info = get_input_info(obj_class, x, class_inputs)\n assert extra_info is not None\n if x not in inputs:\n if input_category == \"required\":\n details = f\"{x}\" if not v3_data else x.split(\".\")[-1]\n error = {\n \"type\": \"required_input_missing\",\n \"message\": \"Required input is missing\",\n \"details\": details,\n \"extra_info\": {\n \"input_name\": x\n }\n }\n errors.append(error)\n continue\n\n val = inputs[x]\n info = (input_type, extra_info)\n if isinstance(val, list):\n if len(val) != 2:\n error = {\n \"type\": \"bad_linked_input\",\n \"message\": \"Bad linked input, must be a length-2 list of [node_id, slot_index]\",\n \"details\": f\"{x}\",\n \"extra_info\": {\n \"input_name\": x,\n \"input_config\": info,\n \"received_value\": val\n }\n }\n errors.append(error)\n continue\n\n o_id = val[0]\n o_class_type = prompt[o_id]['class_type']\n r = nodes.NODE_CLASS_MAPPINGS[o_class_type].RETURN_TYPES\n received_type = r[val[1]]\n received_types[x] = received_type\n if 'input_types' not in validate_function_inputs and not validate_node_input(received_type, input_type):\n details = f\"{x}, received_type({received_type}) mismatch input_type({input_type})\"\n error = {\n \"type\": \"return_type_mismatch\",\n \"message\": \"Return type mismatch between linked nodes\",\n \"details\": details,\n \"extra_info\": {\n \"input_name\": x,\n \"input_config\": info,\n \"received_type\": received_type,\n \"linked_node\": val\n }\n }\n errors.append(error)\n continue\n try:\n r = await validate_inputs(prompt_id, prompt, o_id, validated)\n if r[0] is False:\n # `r` will be set in `validated[o_id]` already\n valid = False\n continue\n except Exception as ex:\n typ, _, tb = sys.exc_info()\n valid = False\n exception_type = full_type_name(typ)\n reasons = [{\n \"type\": \"exception_during_inner_validation\",\n \"message\": \"Exception when validating inner node\",\n \"details\": str(ex),\n \"extra_info\": {\n \"input_name\": x,\n \"input_config\": info,\n \"exception_message\": str(ex),\n \"exception_type\": exception_type,\n \"traceback\": traceback.format_tb(tb),\n \"linked_node\": val\n }\n }]\n validated[o_id] = (False, reasons, o_id)\n continue\n else:\n try:\n # Unwraps values wrapped in __value__ key or typed wrapper.\n # This is used to pass list widget values to execution,\n # as by default list value is reserved to represent the\n # connection between nodes.\n if isinstance(val, dict):\n if \"__value__\" in val:\n val = val[\"__value__\"]\n inputs[x] = val\n\n if input_type == \"INT\":\n val = int(val)\n inputs[x] = val\n if input_type == \"FLOAT\":\n val = float(val)\n inputs[x] = val\n if input_type == \"STRING\":\n val = str(val)\n inputs[x] = val\n if input_type == \"BOOLEAN\":\n val = bool(val)\n inputs[x] = val\n except Exception as ex:\n error = {\n \"type\": \"invalid_input_type\",\n \"message\": f\"Failed to convert an input value to a {input_type} value\",\n \"details\": f\"{x}, {val}, {ex}\",\n \"extra_info\": {\n \"input_name\": x,\n \"input_config\": info,\n \"received_value\": val,\n \"exception_message\": str(ex)\n }\n }\n errors.append(error)\n continue\n\n if x not in validate_function_inputs and not validate_has_kwargs:\n if \"min\" in extra_info and val < extra_info[\"min\"]:\n error = {\n \"type\": \"value_smaller_than_min\",\n \"message\": \"Value {} smaller than min of {}\".format(val, extra_info[\"min\"]),\n \"details\": f\"{x}\",\n \"extra_info\": {\n \"input_name\": x,\n \"input_config\": info,\n \"received_value\": val,\n }\n }\n errors.append(error)\n continue\n if \"max\" in extra_info and val > extra_info[\"max\"]:\n error = {\n \"type\": \"value_bigger_than_max\",\n \"message\": \"Value {} bigger than max of {}\".format(val, extra_info[\"max\"]),\n \"details\": f\"{x}\",\n \"extra_info\": {\n \"input_name\": x,\n \"input_config\": info,\n \"received_value\": val,\n }\n }\n errors.append(error)\n continue\n\n if isinstance(input_type, list) or input_type == io.Combo.io_type:\n if input_type == io.Combo.io_type:\n combo_options = extra_info.get(\"options\", [])\n else:\n combo_options = input_type\n if val not in combo_options:\n input_config = info\n list_info = \"\"\n\n # Don't send back gigantic lists like if they're lots of\n # scanned model filepaths\n if len(combo_options) > 20:\n list_info = f\"(list of length {len(combo_options)})\"\n input_config = None\n else:\n list_info = str(combo_options)\n\n error = {\n \"type\": \"value_not_in_list\",\n \"message\": \"Value not in list\",\n \"details\": f\"{x}: '{val}' not in {list_info}\",\n \"extra_info\": {\n \"input_name\": x,\n \"input_config\": input_config,\n \"received_value\": val,\n }\n }\n errors.append(error)\n continue\n\n if len(validate_function_inputs) > 0 or validate_has_kwargs:\n input_data_all, _, v3_data = get_input_data(inputs, obj_class, unique_id)\n input_filtered = {}\n for x in input_data_all:\n if x in validate_function_inputs or validate_has_kwargs:\n input_filtered[x] = input_data_all[x]\n if 'input_types' in validate_function_inputs:\n input_filtered['input_types'] = [received_types]\n\n ret = await _async_map_node_over_list(prompt_id, unique_id, obj_class, input_filtered, validate_function_name, v3_data=v3_data)\n ret = await resolve_map_node_over_list_results(ret)\n for x in input_filtered:\n for i, r in enumerate(ret):\n if r is not True and not isinstance(r, ExecutionBlocker):\n details = f\"{x}\"\n if r is not False:\n details += f\" - {str(r)}\"\n\n error = {\n \"type\": \"custom_validation_failed\",\n \"message\": \"Custom validation failed for node\",\n \"details\": details,\n \"extra_info\": {\n \"input_name\": x,\n }\n }\n errors.append(error)\n continue\n\n if len(errors) > 0 or valid is not True:\n ret = (False, errors, unique_id)\n else:\n ret = (True, [], unique_id)\n\n validated[unique_id] = ret\n return ret",
"sha256": "bce7938e27ca2bb273034f3c32d8e4a89f8004e17ddc07e4625c80210b3b8f6b",
"ast_sha256": "3c8ca3723479a3ed4fa5b1741d304ad0547b6a4135838c537141c9941690cc50",
"rechecked_at": "2026-11-01T22:52:03.414285+00:00"
},
"0.17.0:validate_prompt": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.17.0",
"commit": "63d1bbdb407c69370d407ce5ced6ca3f917528a8",
"path": "execution.py",
"file": "source-text/0.17.0__execution.py.txt",
"sha256": "31804bcf4dde838bb7a9968b2614f6e7f45b082e0bf6fb5cbaa05cca1fd11e1c",
"git_blob_sha1": "a7791efedc695be279a380a64df482c2196b0b01",
"retrieved_at": "2026-11-01T22:49:50.747991+00:00",
"request_key": "engine-0.17.0-execution.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "validate_prompt",
"lines": [
1016,
1135
],
"text": "async def validate_prompt(prompt_id, prompt, partial_execution_list: Union[list[str], None]):\n outputs = set()\n for x in prompt:\n if 'class_type' not in prompt[x]:\n node_data = prompt[x]\n node_title = node_data.get('_meta', {}).get('title')\n error = {\n \"type\": \"missing_node_type\",\n \"message\": f\"Node '{node_title or f'ID #{x}'}' has no class_type. The workflow may be corrupted or a custom node is missing.\",\n \"details\": f\"Node ID '#{x}'\",\n \"extra_info\": {\n \"node_id\": x,\n \"class_type\": None,\n \"node_title\": node_title\n }\n }\n return (False, error, [], {})\n\n class_type = prompt[x]['class_type']\n class_ = nodes.NODE_CLASS_MAPPINGS.get(class_type, None)\n if class_ is None:\n node_data = prompt[x]\n node_title = node_data.get('_meta', {}).get('title', class_type)\n error = {\n \"type\": \"missing_node_type\",\n \"message\": f\"Node '{node_title}' not found. The custom node may not be installed.\",\n \"details\": f\"Node ID '#{x}'\",\n \"extra_info\": {\n \"node_id\": x,\n \"class_type\": class_type,\n \"node_title\": node_title\n }\n }\n return (False, error, [], {})\n\n if hasattr(class_, 'OUTPUT_NODE') and class_.OUTPUT_NODE is True:\n if partial_execution_list is None or x in partial_execution_list:\n outputs.add(x)\n\n if len(outputs) == 0:\n error = {\n \"type\": \"prompt_no_outputs\",\n \"message\": \"Prompt has no outputs\",\n \"details\": \"\",\n \"extra_info\": {}\n }\n return (False, error, [], {})\n\n good_outputs = set()\n errors = []\n node_errors = {}\n validated = {}\n for o in outputs:\n valid = False\n reasons = []\n try:\n m = await validate_inputs(prompt_id, prompt, o, validated)\n valid = m[0]\n reasons = m[1]\n except Exception as ex:\n typ, _, tb = sys.exc_info()\n valid = False\n exception_type = full_type_name(typ)\n reasons = [{\n \"type\": \"exception_during_validation\",\n \"message\": \"Exception when validating node\",\n \"details\": str(ex),\n \"extra_info\": {\n \"exception_type\": exception_type,\n \"traceback\": traceback.format_tb(tb)\n }\n }]\n validated[o] = (False, reasons, o)\n\n if valid is True:\n good_outputs.add(o)\n else:\n logging.error(f\"Failed to validate prompt for output {o}:\")\n if len(reasons) > 0:\n logging.error(\"* (prompt):\")\n for reason in reasons:\n logging.error(f\" - {reason['message']}: {reason['details']}\")\n errors += [(o, reasons)]\n for node_id, result in validated.items():\n valid = result[0]\n reasons = result[1]\n # If a node upstream has errors, the nodes downstream will also\n # be reported as invalid, but there will be no errors attached.\n # So don't return those nodes as having errors in the response.\n if valid is not True and len(reasons) > 0:\n if node_id not in node_errors:\n class_type = prompt[node_id]['class_type']\n node_errors[node_id] = {\n \"errors\": reasons,\n \"dependent_outputs\": [],\n \"class_type\": class_type\n }\n logging.error(f\"* {class_type} {node_id}:\")\n for reason in reasons:\n logging.error(f\" - {reason['message']}: {reason['details']}\")\n node_errors[node_id][\"dependent_outputs\"].append(o)\n logging.error(\"Output will be ignored\")\n\n if len(good_outputs) == 0:\n errors_list = []\n for o, errors in errors:\n for error in errors:\n errors_list.append(f\"{error['message']}: {error['details']}\")\n errors_list = \"\\n\".join(errors_list)\n\n error = {\n \"type\": \"prompt_outputs_failed_validation\",\n \"message\": \"Prompt outputs failed validation\",\n \"details\": errors_list,\n \"extra_info\": {}\n }\n\n return (False, error, list(good_outputs), node_errors)\n\n return (True, None, list(good_outputs), node_errors)",
"sha256": "cdad010ba8cf4faacb8c7d5a4cd1f277d87c41cc7821ac463af6c0d2bcf5116b",
"ast_sha256": "6e7a5d4d646d17a5e0ddc98cd9e84b830f76f34482ce50ea49e70d4edfed12ed",
"rechecked_at": "2026-11-01T22:52:03.414849+00:00"
},
"0.21.1:get_input_info": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.21.1",
"commit": "26515acd23fa291a8f5ab53c5997258598de0701",
"path": "comfy_execution/graph.py",
"file": "source-text/0.21.1__comfy_execution__graph.py.txt",
"sha256": "8d5eea5975172160b081487debbc4c16e9ec57a39462b8592e93d4071b88e494",
"git_blob_sha1": "c47f3c79be2b3639a18f853c8461fe27c673ccd1",
"retrieved_at": "2026-11-01T22:50:14.982817+00:00",
"request_key": "direct-0.21.1-comfy_execution__graph.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "get_input_info",
"lines": [
65,
105
],
"text": "def get_input_info(\n class_def: Type[ComfyNodeABC],\n input_name: str,\n valid_inputs: InputTypeDict | None = None\n) -> tuple[str, Literal[\"required\", \"optional\", \"hidden\"], InputTypeOptions] | tuple[None, None, None]:\n \"\"\"Get the input type, category, and extra info for a given input name.\n\n Arguments:\n class_def: The class definition of the node.\n input_name: The name of the input to get info for.\n valid_inputs: The valid inputs for the node, or None to use the class_def.INPUT_TYPES().\n\n Returns:\n tuple[str, str, dict] | tuple[None, None, None]: The input type, category, and extra info for the input name.\n \"\"\"\n\n valid_inputs = valid_inputs or class_def.INPUT_TYPES()\n input_info = None\n input_category = None\n if \"required\" in valid_inputs and input_name in valid_inputs[\"required\"]:\n input_category = \"required\"\n input_info = valid_inputs[\"required\"][input_name]\n elif \"optional\" in valid_inputs and input_name in valid_inputs[\"optional\"]:\n input_category = \"optional\"\n input_info = valid_inputs[\"optional\"][input_name]\n elif \"hidden\" in valid_inputs and input_name in valid_inputs[\"hidden\"]:\n input_category = \"hidden\"\n input_info = valid_inputs[\"hidden\"][input_name]\n if input_info is None:\n return None, None, None\n input_type = input_info[0]\n if len(input_info) > 1:\n extra_info = input_info[1]\n else:\n extra_info = {}\n # if input_type is a list, it is a Combo defined in outdated format; convert it.\n # NOTE: uncomment this when we are confident old format going away won't cause too much trouble.\n # if isinstance(input_type, list):\n # extra_info[\"options\"] = input_type\n # input_type = IO.Combo.io_type\n return input_type, input_category, extra_info",
"sha256": "00a705ee8915997965863aea78b0b104c5b02335da817974e0e6d4d69f7a223b",
"ast_sha256": "6c58ee9f6f7f9e908b55df8bc6468a7a37060095134dc87df3dae2e5636a2696",
"rechecked_at": "2026-11-01T22:52:03.415936+00:00"
},
"0.21.1:get_cache": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.21.1",
"commit": "26515acd23fa291a8f5ab53c5997258598de0701",
"path": "comfy_execution/graph.py",
"file": "source-text/0.21.1__comfy_execution__graph.py.txt",
"sha256": "8d5eea5975172160b081487debbc4c16e9ec57a39462b8592e93d4071b88e494",
"git_blob_sha1": "c47f3c79be2b3639a18f853c8461fe27c673ccd1",
"retrieved_at": "2026-11-01T22:50:14.982817+00:00",
"request_key": "direct-0.21.1-comfy_execution__graph.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "get_cache",
"lines": [
217,
225
],
"text": " def get_cache(self, from_node_id, to_node_id):\n if to_node_id not in self.execution_cache:\n return None\n value = self.execution_cache[to_node_id].get(from_node_id)\n if value is None:\n return None\n #Write back to the main cache on touch.\n self.output_cache.set_local(from_node_id, value)\n return value",
"sha256": "216d5b7a4b64019fdb85aeb1d80439939e2592156677acdd853ad67d63e5bbf8",
"ast_sha256": "451e68ebbcd05083f8337eaff24cacd974314e9d9a15f74c6a71afe62aebab77",
"rechecked_at": "2026-11-01T22:52:03.416045+00:00"
},
"0.21.1:cache_update": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.21.1",
"commit": "26515acd23fa291a8f5ab53c5997258598de0701",
"path": "comfy_execution/graph.py",
"file": "source-text/0.21.1__comfy_execution__graph.py.txt",
"sha256": "8d5eea5975172160b081487debbc4c16e9ec57a39462b8592e93d4071b88e494",
"git_blob_sha1": "c47f3c79be2b3639a18f853c8461fe27c673ccd1",
"retrieved_at": "2026-11-01T22:50:14.982817+00:00",
"request_key": "direct-0.21.1-comfy_execution__graph.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "cache_update",
"lines": [
227,
231
],
"text": " def cache_update(self, node_id, value):\n if node_id in self.execution_cache_listeners:\n for to_node_id in self.execution_cache_listeners[node_id]:\n if to_node_id in self.execution_cache:\n self.execution_cache[to_node_id][node_id] = value",
"sha256": "3dc408690c2d431df9b38985958fec22208342f39941397b5d5b16780495160c",
"ast_sha256": "e377ec7009bb50285a532570995022f5e8c31d3526262300018cafce01ec4779",
"rechecked_at": "2026-11-01T22:52:03.416141+00:00"
},
"0.21.1:is_link": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.21.1",
"commit": "26515acd23fa291a8f5ab53c5997258598de0701",
"path": "comfy_execution/graph_utils.py",
"file": "source-text/0.21.1__comfy_execution__graph_utils.py.txt",
"sha256": "dabb3f75952a1398891ed87ad853d4ea9c929f322ce6997d4ea916adbc2f209d",
"git_blob_sha1": "496d2c634982aa5afc8d58b9db758f97b3b5c2d8",
"retrieved_at": "2026-11-01T22:50:15.430214+00:00",
"request_key": "direct-0.21.1-comfy_execution__graph_utils.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "is_link",
"lines": [
1,
10
],
"text": "def is_link(obj):\n if not isinstance(obj, list):\n return False\n if len(obj) != 2:\n return False\n if not isinstance(obj[0], str):\n return False\n if not isinstance(obj[1], int) and not isinstance(obj[1], float):\n return False\n return True",
"sha256": "326780c3e724ee94de41282bc326d4fa346ca440e9927d7d59034148d6519de6",
"ast_sha256": "a92a3c3f5877d7b9bec6844b845bc9dcdddcbe8d4984611c8da8b39811981a44",
"rechecked_at": "2026-11-01T22:52:03.416611+00:00"
},
"0.21.1:validate_node_input": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.21.1",
"commit": "26515acd23fa291a8f5ab53c5997258598de0701",
"path": "comfy_execution/validation.py",
"file": "source-text/0.21.1__comfy_execution__validation.py.txt",
"sha256": "9a8ef75b7c53fc6a2d5dcdd75cabe63d47d4f527257b4de2a1138990f76709ae",
"git_blob_sha1": "e73624bd1ef57c863990d608d6d1d5a5577c91ce",
"retrieved_at": "2026-11-01T22:50:15.850640+00:00",
"request_key": "direct-0.21.1-comfy_execution__validation.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "validate_node_input",
"lines": [
5,
59
],
"text": "def validate_node_input(\n received_type: str, input_type: str, strict: bool = False\n) -> bool:\n \"\"\"\n received_type and input_type are both strings of the form \"T1,T2,...\".\n\n If strict is True, the input_type must contain the received_type.\n For example, if received_type is \"STRING\" and input_type is \"STRING,INT\",\n this will return True. But if received_type is \"STRING,INT\" and input_type is\n \"INT\", this will return False.\n\n If strict is False, the input_type must have overlap with the received_type.\n For example, if received_type is \"STRING,BOOLEAN\" and input_type is \"STRING,INT\",\n this will return True.\n\n Supports pre-union type extension behaviour of ``__ne__`` overrides.\n \"\"\"\n # If the types are exactly the same, we can return immediately\n # Use pre-union behaviour: inverse of `__ne__`\n # NOTE: this lets legacy '*' Any types work that override the __ne__ method of the str class.\n if not received_type != input_type:\n return True\n\n # If one of the types is '*', we can return True immediately; this is the 'Any' type.\n if received_type == IO.AnyType.io_type or input_type == IO.AnyType.io_type:\n return True\n\n # If the received type or input_type is a MatchType, we can return True immediately;\n # validation for this is handled by the frontend\n if received_type == IO.MatchType.io_type or input_type == IO.MatchType.io_type:\n return True\n\n # This accounts for some custom nodes that output lists of options as the type;\n # if we ever want to break them on purpose, this can be removed\n if isinstance(received_type, list) and input_type == IO.Combo.io_type:\n return True\n\n # Not equal, and not strings\n if not isinstance(received_type, str) or not isinstance(input_type, str):\n return False\n\n # Split the type strings into sets for comparison\n received_types = set(t.strip() for t in received_type.split(\",\"))\n input_types = set(t.strip() for t in input_type.split(\",\"))\n\n # If any of the types is '*', we can return True immediately; this is the 'Any' type.\n if IO.AnyType.io_type in received_types or IO.AnyType.io_type in input_types:\n return True\n\n if strict:\n # In strict mode, all received types must be in the input types\n return received_types.issubset(input_types)\n else:\n # In non-strict mode, there must be at least one type in common\n return len(received_types.intersection(input_types)) > 0",
"sha256": "8196b4833a0fb05caf178d3c5f9c33eab80ae58c2d88ab4d33bf2b5cbc54f4f5",
"ast_sha256": "b66e11b92849201bcea3ce8a6b036319f0bf7bf81b61f8fe206a4be0324c716e",
"rechecked_at": "2026-11-01T22:52:03.416932+00:00"
},
"0.17.0:get_input_info": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.17.0",
"commit": "63d1bbdb407c69370d407ce5ced6ca3f917528a8",
"path": "comfy_execution/graph.py",
"file": "source-text/0.17.0__comfy_execution__graph.py.txt",
"sha256": "d92ec5087c138c681e833b3dec8c61d37f3b4098aa7ab9bb84cdf6988ceb9414",
"git_blob_sha1": "9d170b16e1409c40e9672615a3bc852a59d04144",
"retrieved_at": "2026-11-01T22:50:16.306723+00:00",
"request_key": "direct-0.17.0-comfy_execution__graph.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "get_input_info",
"lines": [
65,
105
],
"text": "def get_input_info(\n class_def: Type[ComfyNodeABC],\n input_name: str,\n valid_inputs: InputTypeDict | None = None\n) -> tuple[str, Literal[\"required\", \"optional\", \"hidden\"], InputTypeOptions] | tuple[None, None, None]:\n \"\"\"Get the input type, category, and extra info for a given input name.\n\n Arguments:\n class_def: The class definition of the node.\n input_name: The name of the input to get info for.\n valid_inputs: The valid inputs for the node, or None to use the class_def.INPUT_TYPES().\n\n Returns:\n tuple[str, str, dict] | tuple[None, None, None]: The input type, category, and extra info for the input name.\n \"\"\"\n\n valid_inputs = valid_inputs or class_def.INPUT_TYPES()\n input_info = None\n input_category = None\n if \"required\" in valid_inputs and input_name in valid_inputs[\"required\"]:\n input_category = \"required\"\n input_info = valid_inputs[\"required\"][input_name]\n elif \"optional\" in valid_inputs and input_name in valid_inputs[\"optional\"]:\n input_category = \"optional\"\n input_info = valid_inputs[\"optional\"][input_name]\n elif \"hidden\" in valid_inputs and input_name in valid_inputs[\"hidden\"]:\n input_category = \"hidden\"\n input_info = valid_inputs[\"hidden\"][input_name]\n if input_info is None:\n return None, None, None\n input_type = input_info[0]\n if len(input_info) > 1:\n extra_info = input_info[1]\n else:\n extra_info = {}\n # if input_type is a list, it is a Combo defined in outdated format; convert it.\n # NOTE: uncomment this when we are confident old format going away won't cause too much trouble.\n # if isinstance(input_type, list):\n # extra_info[\"options\"] = input_type\n # input_type = IO.Combo.io_type\n return input_type, input_category, extra_info",
"sha256": "00a705ee8915997965863aea78b0b104c5b02335da817974e0e6d4d69f7a223b",
"ast_sha256": "6c58ee9f6f7f9e908b55df8bc6468a7a37060095134dc87df3dae2e5636a2696",
"rechecked_at": "2026-11-01T22:52:03.418307+00:00"
},
"0.17.0:get_cache": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.17.0",
"commit": "63d1bbdb407c69370d407ce5ced6ca3f917528a8",
"path": "comfy_execution/graph.py",
"file": "source-text/0.17.0__comfy_execution__graph.py.txt",
"sha256": "d92ec5087c138c681e833b3dec8c61d37f3b4098aa7ab9bb84cdf6988ceb9414",
"git_blob_sha1": "9d170b16e1409c40e9672615a3bc852a59d04144",
"retrieved_at": "2026-11-01T22:50:16.306723+00:00",
"request_key": "direct-0.17.0-comfy_execution__graph.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "get_cache",
"lines": [
217,
225
],
"text": " def get_cache(self, from_node_id, to_node_id):\n if to_node_id not in self.execution_cache:\n return None\n value = self.execution_cache[to_node_id].get(from_node_id)\n if value is None:\n return None\n #Write back to the main cache on touch.\n self.output_cache.set(from_node_id, value)\n return value",
"sha256": "ba2b506133192def7557deeb4b1847bd6e3b7c7f222f570c8b97fdb1d9107acd",
"ast_sha256": "95e24ad056212f313c8347686c7ae92318c00b26f535b35b5501ff0294d6c46a",
"rechecked_at": "2026-11-01T22:52:03.418417+00:00"
},
"0.17.0:cache_update": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.17.0",
"commit": "63d1bbdb407c69370d407ce5ced6ca3f917528a8",
"path": "comfy_execution/graph.py",
"file": "source-text/0.17.0__comfy_execution__graph.py.txt",
"sha256": "d92ec5087c138c681e833b3dec8c61d37f3b4098aa7ab9bb84cdf6988ceb9414",
"git_blob_sha1": "9d170b16e1409c40e9672615a3bc852a59d04144",
"retrieved_at": "2026-11-01T22:50:16.306723+00:00",
"request_key": "direct-0.17.0-comfy_execution__graph.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "cache_update",
"lines": [
227,
231
],
"text": " def cache_update(self, node_id, value):\n if node_id in self.execution_cache_listeners:\n for to_node_id in self.execution_cache_listeners[node_id]:\n if to_node_id in self.execution_cache:\n self.execution_cache[to_node_id][node_id] = value",
"sha256": "3dc408690c2d431df9b38985958fec22208342f39941397b5d5b16780495160c",
"ast_sha256": "e377ec7009bb50285a532570995022f5e8c31d3526262300018cafce01ec4779",
"rechecked_at": "2026-11-01T22:52:03.418536+00:00"
},
"0.17.0:is_link": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.17.0",
"commit": "63d1bbdb407c69370d407ce5ced6ca3f917528a8",
"path": "comfy_execution/graph_utils.py",
"file": "source-text/0.17.0__comfy_execution__graph_utils.py.txt",
"sha256": "dabb3f75952a1398891ed87ad853d4ea9c929f322ce6997d4ea916adbc2f209d",
"git_blob_sha1": "496d2c634982aa5afc8d58b9db758f97b3b5c2d8",
"retrieved_at": "2026-11-01T22:50:16.759469+00:00",
"request_key": "direct-0.17.0-comfy_execution__graph_utils.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "is_link",
"lines": [
1,
10
],
"text": "def is_link(obj):\n if not isinstance(obj, list):\n return False\n if len(obj) != 2:\n return False\n if not isinstance(obj[0], str):\n return False\n if not isinstance(obj[1], int) and not isinstance(obj[1], float):\n return False\n return True",
"sha256": "326780c3e724ee94de41282bc326d4fa346ca440e9927d7d59034148d6519de6",
"ast_sha256": "a92a3c3f5877d7b9bec6844b845bc9dcdddcbe8d4984611c8da8b39811981a44",
"rechecked_at": "2026-11-01T22:52:03.419026+00:00"
},
"0.17.0:validate_node_input": {
"source": {
"repository": "https://github.com/Comfy-Org/ComfyUI",
"version": "0.17.0",
"commit": "63d1bbdb407c69370d407ce5ced6ca3f917528a8",
"path": "comfy_execution/validation.py",
"file": "source-text/0.17.0__comfy_execution__validation.py.txt",
"sha256": "9a8ef75b7c53fc6a2d5dcdd75cabe63d47d4f527257b4de2a1138990f76709ae",
"git_blob_sha1": "e73624bd1ef57c863990d608d6d1d5a5577c91ce",
"retrieved_at": "2026-11-01T22:50:17.189193+00:00",
"request_key": "direct-0.17.0-comfy_execution__validation.py",
"scope": "exact text only; target host engine version unknown"
},
"function": "validate_node_input",
"lines": [
5,
59
],
"text": "def validate_node_input(\n received_type: str, input_type: str, strict: bool = False\n) -> bool:\n \"\"\"\n received_type and input_type are both strings of the form \"T1,T2,...\".\n\n If strict is True, the input_type must contain the received_type.\n For example, if received_type is \"STRING\" and input_type is \"STRING,INT\",\n this will return True. But if received_type is \"STRING,INT\" and input_type is\n \"INT\", this will return False.\n\n If strict is False, the input_type must have overlap with the received_type.\n For example, if received_type is \"STRING,BOOLEAN\" and input_type is \"STRING,INT\",\n this will return True.\n\n Supports pre-union type extension behaviour of ``__ne__`` overrides.\n \"\"\"\n # If the types are exactly the same, we can return immediately\n # Use pre-union behaviour: inverse of `__ne__`\n # NOTE: this lets legacy '*' Any types work that override the __ne__ method of the str class.\n if not received_type != input_type:\n return True\n\n # If one of the types is '*', we can return True immediately; this is the 'Any' type.\n if received_type == IO.AnyType.io_type or input_type == IO.AnyType.io_type:\n return True\n\n # If the received type or input_type is a MatchType, we can return True immediately;\n # validation for this is handled by the frontend\n if received_type == IO.MatchType.io_type or input_type == IO.MatchType.io_type:\n return True\n\n # This accounts for some custom nodes that output lists of options as the type;\n # if we ever want to break them on purpose, this can be removed\n if isinstance(received_type, list) and input_type == IO.Combo.io_type:\n return True\n\n # Not equal, and not strings\n if not isinstance(received_type, str) or not isinstance(input_type, str):\n return False\n\n # Split the type strings into sets for comparison\n received_types = set(t.strip() for t in received_type.split(\",\"))\n input_types = set(t.strip() for t in input_type.split(\",\"))\n\n # If any of the types is '*', we can return True immediately; this is the 'Any' type.\n if IO.AnyType.io_type in received_types or IO.AnyType.io_type in input_types:\n return True\n\n if strict:\n # In strict mode, all received types must be in the input types\n return received_types.issubset(input_types)\n else:\n # In non-strict mode, there must be at least one type in common\n return len(received_types.intersection(input_types)) > 0",
"sha256": "8196b4833a0fb05caf178d3c5f9c33eab80ae58c2d88ab4d33bf2b5cbc54f4f5",
"ast_sha256": "b66e11b92849201bcea3ce8a6b036319f0bf7bf81b61f8fe206a4be0324c716e",
"rechecked_at": "2026-11-01T22:52:03.419308+00:00"
},
"aux:AIO_Preprocessor": {
"source": {
"name": "__init__.py",
"flags": 0,
"method": 8,
"crc32": 280110504,
"compressed_bytes": 2888,
"bytes": 8822,
"local_offset": 252534,
"sha256": "9a5786ef9569223acd235676c08297aff78b2de1e46ab69c96665222b8c2a4b4",
"file": "release-members/__init__.py",
"retrieved_at": "2026-11-01T22:32:39.614355+00:00",
"header_request": "member-00-header",
"name_request": "member-00-name",
"data_request": "member-00-data",
"whole_artifact_sha256": null,
"git_release_commit": null
},
"properties": {
"RETURN_TYPES": [
"IMAGE"
],
"FUNCTION": "execute"
},
"original_class": {
"lines": [
84,
130
],
"text": "class AIO_Preprocessor:\n @classmethod\n def INPUT_TYPES(s):\n return define_preprocessor_inputs(\n preprocessor=INPUT.COMBO(PREPROCESSOR_OPTIONS, default=\"none\"),\n resolution=INPUT.RESOLUTION()\n )\n\n RETURN_TYPES = (\"IMAGE\",)\n FUNCTION = \"execute\"\n\n CATEGORY = \"ControlNet Preprocessors\"\n\n def execute(self, preprocessor, image, resolution=512):\n if preprocessor == \"none\":\n return (image, )\n else:\n aux_class = AUX_NODE_MAPPINGS[preprocessor]\n input_types = aux_class.INPUT_TYPES()\n input_types = {\n **input_types[\"required\"],\n **(input_types[\"optional\"] if \"optional\" in input_types else {})\n }\n params = {}\n for name, input_type in input_types.items():\n if name == \"image\":\n params[name] = image\n continue\n\n if name == \"resolution\":\n params[name] = resolution\n continue\n\n if len(input_type) == 2 and (\"default\" in input_type[1]):\n params[name] = input_type[1][\"default\"]\n continue\n\n default_values = { \"INT\": 0, \"FLOAT\": 0.0 }\n if type(input_type[0]) is list:\n for input_type_value in input_type[0]:\n if input_type_value in default_values:\n params[name] = default_values[input_type[0]]\n else:\n if input_type[0] in default_values:\n params[name] = default_values[input_type[0]]\n\n return getattr(aux_class(), aux_class.FUNCTION)(**params)",
"utf8_sha256": "029acfe42d66236c59dbd3b45647e8603125b454736d085faa1a4dbe92f758a0"
},
"original_retrieval": "2026-10-29T15:47:36.895566+00:00",
"new_release_binding": "2026-11-01T22:32:39.614355+00:00",
"rechecked_at": "2026-11-01T22:52:03.419557+00:00"
},
"aux:DWPreprocessor": {
"source": {
"name": "node_wrappers/dwpose.py",
"flags": 0,
"method": 8,
"crc32": 2055699912,
"compressed_bytes": 1621,
"bytes": 7101,
"local_offset": 25051909,
"sha256": "3b08fb623ea3898cedf864e96cfd7993265101100a3dd9666a6c66b03c15e481",
"file": "release-members/node_wrappers__dwpose.py",
"retrieved_at": "2026-11-01T22:32:47.809630+00:00",
"header_request": "member-11-header",
"name_request": "member-11-name",
"data_request": "member-11-data",
"whole_artifact_sha256": null,
"git_release_commit": null
},
"properties": {
"RETURN_TYPES": [
"IMAGE",
"POSE_KEYPOINT"
],
"FUNCTION": "estimate_pose"
},
"original_class": {
"lines": [
30,
96
],
"text": "class DWPose_Preprocessor:\n @classmethod\n def INPUT_TYPES(s):\n return define_preprocessor_inputs(\n detect_hand=INPUT.COMBO([\"enable\", \"disable\"]),\n detect_body=INPUT.COMBO([\"enable\", \"disable\"]),\n detect_face=INPUT.COMBO([\"enable\", \"disable\"]),\n resolution=INPUT.RESOLUTION(),\n bbox_detector=INPUT.COMBO(\n [\"None\"] + [\"yolox_l.torchscript.pt\", \"yolox_l.onnx\", \"yolo_nas_l_fp16.onnx\", \"yolo_nas_m_fp16.onnx\", \"yolo_nas_s_fp16.onnx\"],\n default=\"yolox_l.onnx\"\n ),\n pose_estimator=INPUT.COMBO(\n [\"dw-ll_ucoco_384_bs5.torchscript.pt\", \"dw-ll_ucoco_384.onnx\", \"dw-ll_ucoco.onnx\"],\n default=\"dw-ll_ucoco_384_bs5.torchscript.pt\"\n ),\n scale_stick_for_xinsr_cn=INPUT.COMBO([\"disable\", \"enable\"])\n )\n\n RETURN_TYPES = (\"IMAGE\", \"POSE_KEYPOINT\")\n FUNCTION = \"estimate_pose\"\n\n CATEGORY = \"ControlNet Preprocessors/Faces and Poses Estimators\"\n\n def estimate_pose(self, image, detect_hand=\"enable\", detect_body=\"enable\", detect_face=\"enable\", resolution=512, bbox_detector=\"yolox_l.onnx\", pose_estimator=\"dw-ll_ucoco_384.onnx\", scale_stick_for_xinsr_cn=\"disable\", **kwargs):\n if bbox_detector == \"None\":\n yolo_repo = DWPOSE_MODEL_NAME \n elif bbox_detector == \"yolox_l.onnx\":\n yolo_repo = DWPOSE_MODEL_NAME\n elif \"yolox\" in bbox_detector:\n yolo_repo = \"hr16/yolox-onnx\"\n elif \"yolo_nas\" in bbox_detector:\n yolo_repo = \"hr16/yolo-nas-fp16\"\n else:\n raise NotImplementedError(f\"Download mechanism for {bbox_detector}\")\n\n if pose_estimator == \"dw-ll_ucoco_384.onnx\":\n pose_repo = DWPOSE_MODEL_NAME\n elif pose_estimator.endswith(\".onnx\"):\n pose_repo = \"hr16/UnJIT-DWPose\"\n elif pose_estimator.endswith(\".torchscript.pt\"):\n pose_repo = \"hr16/DWPose-TorchScript-BatchSize5\"\n else:\n raise NotImplementedError(f\"Download mechanism for {pose_estimator}\")\n\n model = DwposeDetector.from_pretrained(\n pose_repo,\n yolo_repo,\n det_filename=(None if bbox_detector == \"None\" else bbox_detector), pose_filename=pose_estimator,\n torchscript_device=model_management.get_torch_device()\n )\n detect_hand = detect_hand == \"enable\"\n detect_body = detect_body == \"enable\"\n detect_face = detect_face == \"enable\"\n scale_stick_for_xinsr_cn = scale_stick_for_xinsr_cn == \"enable\"\n self.openpose_dicts = []\n def func(image, **kwargs):\n pose_img, openpose_dict = model(image, **kwargs)\n self.openpose_dicts.append(openpose_dict)\n return pose_img\n\n out = common_annotator_call(func, image, include_hand=detect_hand, include_face=detect_face, include_body=detect_body, image_and_json=True, resolution=resolution, xinsr_stick_scaling=scale_stick_for_xinsr_cn)\n del model\n return {\n 'ui': { \"openpose_json\": [json.dumps(self.openpose_dicts, indent=4)] },\n \"result\": (out, self.openpose_dicts)\n }",
"utf8_sha256": "4d0807779ff6e9c139473dd4043e48dbcddd2f89f41fbf64c3cf2bb2a6781dc2"
},
"original_retrieval": null,
"new_release_binding": "2026-11-01T22:32:47.809630+00:00",
"rechecked_at": "2026-11-01T22:52:03.419560+00:00"
},
"aux:AnimalPosePreprocessor": {
"source": {
"name": "node_wrappers/dwpose.py",
"flags": 0,
"method": 8,
"crc32": 2055699912,
"compressed_bytes": 1621,
"bytes": 7101,
"local_offset": 25051909,
"sha256": "3b08fb623ea3898cedf864e96cfd7993265101100a3dd9666a6c66b03c15e481",
"file": "release-members/node_wrappers__dwpose.py",
"retrieved_at": "2026-11-01T22:32:47.809630+00:00",
"header_request": "member-11-header",
"name_request": "member-11-name",
"data_request": "member-11-data",
"whole_artifact_sha256": null,
"git_release_commit": null
},
"properties": {
"RETURN_TYPES": [
"IMAGE",
"POSE_KEYPOINT"
],
"FUNCTION": "estimate_pose"
},
"original_class": {
"lines": [
98,
157
],
"text": "class AnimalPose_Preprocessor:\n @classmethod\n def INPUT_TYPES(s):\n return define_preprocessor_inputs(\n bbox_detector = INPUT.COMBO(\n [\"None\"] + [\"yolox_l.torchscript.pt\", \"yolox_l.onnx\", \"yolo_nas_l_fp16.onnx\", \"yolo_nas_m_fp16.onnx\", \"yolo_nas_s_fp16.onnx\"],\n default=\"yolox_l.torchscript.pt\"\n ),\n pose_estimator = INPUT.COMBO(\n [\"rtmpose-m_ap10k_256_bs5.torchscript.pt\", \"rtmpose-m_ap10k_256.onnx\"],\n default=\"rtmpose-m_ap10k_256_bs5.torchscript.pt\"\n ),\n resolution = INPUT.RESOLUTION()\n )\n\n RETURN_TYPES = (\"IMAGE\", \"POSE_KEYPOINT\")\n FUNCTION = \"estimate_pose\"\n\n CATEGORY = \"ControlNet Preprocessors/Faces and Poses Estimators\"\n\n def estimate_pose(self, image, resolution=512, bbox_detector=\"yolox_l.onnx\", pose_estimator=\"rtmpose-m_ap10k_256.onnx\", **kwargs):\n if bbox_detector == \"None\":\n yolo_repo = DWPOSE_MODEL_NAME \n elif bbox_detector == \"yolox_l.onnx\":\n yolo_repo = DWPOSE_MODEL_NAME\n elif \"yolox\" in bbox_detector:\n yolo_repo = \"hr16/yolox-onnx\"\n elif \"yolo_nas\" in bbox_detector:\n yolo_repo = \"hr16/yolo-nas-fp16\"\n else:\n raise NotImplementedError(f\"Download mechanism for {bbox_detector}\")\n\n if pose_estimator == \"dw-ll_ucoco_384.onnx\":\n pose_repo = DWPOSE_MODEL_NAME\n elif pose_estimator.endswith(\".onnx\"):\n pose_repo = \"hr16/UnJIT-DWPose\"\n elif pose_estimator.endswith(\".torchscript.pt\"):\n pose_repo = \"hr16/DWPose-TorchScript-BatchSize5\"\n else:\n raise NotImplementedError(f\"Download mechanism for {pose_estimator}\")\n\n model = AnimalposeDetector.from_pretrained(\n pose_repo,\n yolo_repo,\n det_filename=(None if bbox_detector == \"None\" else bbox_detector), pose_filename=pose_estimator,\n torchscript_device=model_management.get_torch_device()\n )\n\n self.openpose_dicts = []\n def func(image, **kwargs):\n pose_img, openpose_dict = model(image, **kwargs)\n self.openpose_dicts.append(openpose_dict)\n return pose_img\n\n out = common_annotator_call(func, image, image_and_json=True, resolution=resolution)\n del model\n return {\n 'ui': { \"openpose_json\": [json.dumps(self.openpose_dicts, indent=4)] },\n \"result\": (out, self.openpose_dicts)\n }",
"utf8_sha256": "7d062098d4238255c00fc010a34d41aae2f42639178f155e3c11a1bffa8969fd"
},
"original_retrieval": null,
"new_release_binding": "2026-11-01T22:32:47.809630+00:00",
"rechecked_at": "2026-11-01T22:52:03.419561+00:00"
}
}