Introduces a new lora_api.py module providing REST endpoints for LoRA model info and listing, including Civitai integration. Updates __init__.py to auto-import the API, and enhances easy_sitting_utils.py with LoRA config validation. Refactors node.py to use shared any_type, and improves documentation. Updates power_lora_common.js to add a LoRA info dialog trigger and integrates the new PowerLoraInfoDialog component. Adds power_lora_info_dialog.js for rich LoRA info display. Refactors power_lora_loader.py and power_lora_stacker.py to use the shared is_valid_lora_config utility. Minor UI and code documentation improvements throughout.
19 lines
963 B
Python
19 lines
963 B
Python
from .node import NODE_CLASS_MAPPINGS as BASE_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS as BASE_DISPLAY_MAPPINGS
|
|
from .power_lora_loader import NODE_CLASS_MAPPINGS as LOADER_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS as LOADER_DISPLAY_MAPPINGS
|
|
from .power_lora_stacker import NODE_CLASS_MAPPINGS as STACKER_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS as STACKER_DISPLAY_MAPPINGS
|
|
|
|
# 导入 API 模块,使其在启动时注册路由
|
|
try:
|
|
from . import lora_api
|
|
except Exception as e:
|
|
print(f"[Easy Setting Pipes] Failed to import lora_api: {e}")
|
|
|
|
# 合并所有节点映射
|
|
NODE_CLASS_MAPPINGS = {**BASE_MAPPINGS, **LOADER_MAPPINGS, **STACKER_MAPPINGS}
|
|
NODE_DISPLAY_NAME_MAPPINGS = {**BASE_DISPLAY_MAPPINGS, **LOADER_DISPLAY_MAPPINGS, **STACKER_DISPLAY_MAPPINGS}
|
|
|
|
# 导出必要的映射,让 ComfyUI 能够识别自定义节点
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]
|
|
|
|
# 告诉 ComfyUI 当前目录有 web 资源(JS 文件)
|
|
WEB_DIRECTORY = "." |