refactor: keep only node class ESSENTIALS_CATEGORY, remove blueprint/subgraph changes

Frontend will own blueprint categorization separately.
This commit is contained in:
bymyself
2026-03-15 07:03:03 +00:00
parent d88b19d96f
commit 91c6ccd39f
37 changed files with 36 additions and 49 deletions

View File

@@ -1,9 +1,7 @@
from __future__ import annotations
from typing import TypedDict
from typing_extensions import NotRequired
import os
import json
import folder_paths
import glob
from aiohttp import web
@@ -33,7 +31,6 @@ class SubgraphEntry(TypedDict):
Additional info about subgraph; in the case of custom_nodes, will contain nodepack name
"""
data: str
essentials_category: NotRequired[str]
class CustomNodeSubgraphEntryInfo(TypedDict):
node_pack: str
@@ -104,16 +101,6 @@ class SubgraphManager:
for file in glob.glob(os.path.join(blueprints_dir, "*.json")):
file = file.replace('\\', '/')
entry_id, entry = self._create_entry(file, Source.templates, "comfyui")
try:
with open(file, 'r', encoding='utf-8') as f:
bp_data = json.load(f)
subgraphs = bp_data.get('definitions', {}).get('subgraphs', [])
if subgraphs:
ec = subgraphs[0].get('essentials_category')
if ec:
entry['essentials_category'] = ec
except Exception:
pass
subgraphs_dict[entry_id] = entry
self.cached_blueprint_subgraphs = subgraphs_dict