* Add audio transcript timeline node * Hook audio transcripts into Koolook Director * Add modular timeline audio timing workflow * fix(frontend): guard Comfy workflow draft cache * fix(audio): compose transcript timeline prompts * fix(audio): address transcript review findings * fix(ci): keep transcript tests lightweight * fix(timeline): restore image previews from saved paths * fix(timeline): scrub restored preview blobs
120 lines
5.2 KiB
Python
120 lines
5.2 KiB
Python
try:
|
|
from .k_easy_wan22_prompt import NODE_CLASS_MAPPINGS as wan_mappings
|
|
from .k_easy_wan22_prompt import NODE_DISPLAY_NAME_MAPPINGS as wan_display
|
|
|
|
from .k_easy_resize import NODE_CLASS_MAPPINGS as resize_mappings
|
|
from .k_easy_resize import NODE_DISPLAY_NAME_MAPPINGS as resize_display
|
|
|
|
from .k_ai_pipeline import NODE_CLASS_MAPPINGS as pipeline_mappings
|
|
from .k_ai_pipeline import NODE_DISPLAY_NAME_MAPPINGS as pipeline_display
|
|
|
|
from .k_easy_image_batch import NODE_CLASS_MAPPINGS as batch_mappings # Added for new VFX batch node
|
|
from .k_easy_image_batch import NODE_DISPLAY_NAME_MAPPINGS as batch_display # Added for new VFX batch node
|
|
|
|
from .k_easy_track import NODE_CLASS_MAPPINGS as cam_loader_mappings
|
|
from .k_easy_track import NODE_DISPLAY_NAME_MAPPINGS as cam_loader_display
|
|
|
|
from .k_easy_pattern import NODE_CLASS_MAPPINGS as pattern_mappings
|
|
from .k_easy_pattern import NODE_DISPLAY_NAME_MAPPINGS as pattern_display
|
|
|
|
from .k_easy_utility import NODE_CLASS_MAPPINGS as utility_mappings
|
|
from .k_easy_utility import NODE_DISPLAY_NAME_MAPPINGS as utility_display
|
|
|
|
from .k_audio_timeline import NODE_CLASS_MAPPINGS as audio_timeline_mappings
|
|
from .k_audio_timeline import NODE_DISPLAY_NAME_MAPPINGS as audio_timeline_display
|
|
|
|
from .k_timeline_editor import NODE_CLASS_MAPPINGS as timeline_editor_mappings
|
|
from .k_timeline_editor import NODE_DISPLAY_NAME_MAPPINGS as timeline_editor_display
|
|
|
|
from .forks.radiance_koolook import NODE_CLASS_MAPPINGS as radiance_koolook_mappings
|
|
from .forks.radiance_koolook import NODE_DISPLAY_NAME_MAPPINGS as radiance_koolook_display
|
|
|
|
from .forks.whatdreamscost_koolook import NODE_CLASS_MAPPINGS as whatdreamscost_koolook_mappings
|
|
from .forks.whatdreamscost_koolook import NODE_DISPLAY_NAME_MAPPINGS as whatdreamscost_koolook_display
|
|
except ImportError as _node_import_exc:
|
|
# The relative imports above require a parent-package context that
|
|
# only ComfyUI's custom-node loader provides. Pytest's package
|
|
# collector (which walks up from test files looking for ``__init__.py``)
|
|
# and static-analysis tools load this file as a standalone module,
|
|
# where the imports raise. Falling back to empty registries lets
|
|
# tooling import the package directory without crashing — tests
|
|
# access sibling modules (e.g. ``koolook_routes``) via absolute
|
|
# imports that don't need the package context.
|
|
print(
|
|
f"[Koolook] node registry skipped (non-Comfy import context): "
|
|
f"{_node_import_exc}"
|
|
)
|
|
NODE_CLASS_MAPPINGS = {}
|
|
NODE_DISPLAY_NAME_MAPPINGS = {}
|
|
else:
|
|
# VHS-dependent wrappers self-skip when VideoHelperSuite is absent, and
|
|
# these guards keep a local import surprise from hiding the core nodes.
|
|
video_load_mappings = {}
|
|
video_load_display = {}
|
|
try:
|
|
from .k_video_load import NODE_CLASS_MAPPINGS as video_load_mappings
|
|
from .k_video_load import NODE_DISPLAY_NAME_MAPPINGS as video_load_display
|
|
except ImportError as _exc:
|
|
print(f"[Koolook] Easy_LoadVideo registry skipped: {_exc}")
|
|
|
|
video_combine_mappings = {}
|
|
video_combine_display = {}
|
|
try:
|
|
from .k_video_combine import NODE_CLASS_MAPPINGS as video_combine_mappings
|
|
from .k_video_combine import NODE_DISPLAY_NAME_MAPPINGS as video_combine_display
|
|
except ImportError as _exc:
|
|
print(f"[Koolook] Easy_VideoCombine registry skipped: {_exc}")
|
|
|
|
# Register the Kforge Labs snapshot/preset endpoints. Failure here is
|
|
# non-fatal — the node mappings still load and the rest of the plugin
|
|
# works; only the snapshot feature in the sidebar is unavailable. Both
|
|
# the import itself AND the `install()` call are guarded: a missing
|
|
# `aiohttp` (extremely unusual since it's a ComfyUI hard-dep) or any
|
|
# other module-load exception falls through to the print without
|
|
# crashing the node registry.
|
|
try:
|
|
from . import koolook_routes # noqa: E402
|
|
|
|
if not koolook_routes.install():
|
|
print(
|
|
"[Koolook] PromptServer unavailable at import time; preset routes "
|
|
"(/koolook/presets/*) not registered for this session."
|
|
)
|
|
except Exception as _exc: # pragma: no cover
|
|
print(f"[Koolook] preset routes import failed; node mappings unaffected: {_exc}")
|
|
|
|
NODE_CLASS_MAPPINGS = {
|
|
**wan_mappings,
|
|
**resize_mappings,
|
|
**pipeline_mappings,
|
|
**batch_mappings,
|
|
**cam_loader_mappings,
|
|
**pattern_mappings,
|
|
**utility_mappings,
|
|
**audio_timeline_mappings,
|
|
**timeline_editor_mappings,
|
|
**video_load_mappings,
|
|
**video_combine_mappings,
|
|
**radiance_koolook_mappings,
|
|
**whatdreamscost_koolook_mappings,
|
|
}
|
|
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
**wan_display,
|
|
**resize_display,
|
|
**pipeline_display,
|
|
**batch_display,
|
|
**cam_loader_display,
|
|
**pattern_display,
|
|
**utility_display,
|
|
**audio_timeline_display,
|
|
**timeline_editor_display,
|
|
**video_load_display,
|
|
**video_combine_display,
|
|
**radiance_koolook_display,
|
|
**whatdreamscost_koolook_display,
|
|
}
|
|
|
|
WEB_DIRECTORY = "./web"
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
|