Files
Maxed-Out-99-ComfyUI-MaxedOut/__init__.py
T
Maxed-Out-99 58066adbde Add animated live preview panel and LTX fallback
This adds an opt-in sampler preview system that streams animated frames through a docked panel, saves finished previews to output/live_previews, and includes an automatic taeltx fallback for LTX 2.3. It also updates the schema dump for newer ComfyUI cores, wires the shared live preview hooks into startup, and switches the project docs/license metadata to GPL-3.0.
2026-09-29 11:46:04 -07:00

38 lines
949 B
Python

import importlib
WEB_DIRECTORY = "web"
def _safe_import(module_name: str):
try:
return importlib.import_module(f".{module_name}", __name__)
except Exception as e:
print(f"[ComfyUI-MaxedOut] Failed to import '{module_name}': {e}")
return None
def _get_mappings(mod):
if mod is None:
return {}, {}
class_map = getattr(mod, "NODE_CLASS_MAPPINGS", {}) or {}
display_map = getattr(mod, "NODE_DISPLAY_NAME_MAPPINGS", {}) or {}
return class_map, display_map
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
for _name in (
"nodes",
"loraloader_mxd",
"system.model_paths",
"system.live_preview",
):
_mod = _safe_import(_name)
_class_map, _display_map = _get_mappings(_mod)
NODE_CLASS_MAPPINGS.update(_class_map)
NODE_DISPLAY_NAME_MAPPINGS.update(_display_map)
__all__ = [
"NODE_CLASS_MAPPINGS",
"NODE_DISPLAY_NAME_MAPPINGS",
"WEB_DIRECTORY",
]