HEL-892: pin structural reference sources and record bounded comparison evidence

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
leefer
2026-10-30 00:24:53 +08:00
co-authored by multica-agent
parent 1f779d53c4
commit 5e5cc03395
74 changed files with 42849 additions and 0 deletions
@@ -0,0 +1,42 @@
from pathlib import Path
import importlib.util
import os
import sys
_current_dir = Path(__file__).parent
if str(_current_dir) not in sys.path:
sys.path.insert(0, str(_current_dir))
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
WEB_DIRECTORY = "./web"
def _load_module(path: Path):
spec = importlib.util.spec_from_file_location(path.stem, path)
if not spec or not spec.loader:
return None
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
return module
def _discover_nodes():
for py in _current_dir.glob("*.py"):
if py.name == "__init__.py":
continue
try:
module = _load_module(py)
if not module:
continue
if hasattr(module, "NODE_CLASS_MAPPINGS"):
NODE_CLASS_MAPPINGS.update(module.NODE_CLASS_MAPPINGS)
if hasattr(module, "NODE_DISPLAY_NAME_MAPPINGS"):
NODE_DISPLAY_NAME_MAPPINGS.update(module.NODE_DISPLAY_NAME_MAPPINGS)
except Exception as e:
print(f"[Qwen3TTS] Failed to load {py.name}: {e}")
_discover_nodes()
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]