mirror of
https://github.com/Comfy-Org/ComfyUI.git
synced 2026-08-24 18:10:27 +08:00
refactor: keep only node class ESSENTIALS_CATEGORY, remove blueprint/subgraph changes
Frontend will own blueprint categorization separately.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user