38 lines
1.2 KiB
Python
38 lines
1.2 KiB
Python
"""
|
|
ComfyUI Language Toggle Extension
|
|
言語切替ボタンをComfyUIのメニューバーに追加するカスタムノード
|
|
|
|
Installation:
|
|
1. このフォルダを ComfyUI/custom_nodes/ に配置
|
|
2. ComfyUIを再起動
|
|
|
|
Directory structure:
|
|
custom_nodes/
|
|
└── comfyui-locale-toggle/
|
|
├── __init__.py (this file)
|
|
└── js/
|
|
└── locale_toggle.js
|
|
"""
|
|
|
|
import os
|
|
from pathlib import Path
|
|
|
|
# このファイルのディレクトリからwebフォルダへのパスを設定
|
|
WEB_DIRECTORY = str(Path(__file__).parent / "web")
|
|
|
|
# カスタムノードとしては実際のノードは提供しないため空
|
|
NODE_CLASS_MAPPINGS = {}
|
|
NODE_DISPLAY_NAME_MAPPINGS = {}
|
|
|
|
# ComfyUIが要求するエクスポート
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
|
|
|
|
print("🌐 ComfyUI Locale Toggle Extension loaded")
|
|
print(f"📁 Web directory: {WEB_DIRECTORY}")
|
|
|
|
# デバッグ用:JSファイルの存在確認
|
|
js_file = Path(__file__).parent / "web" / "locale_toggle.js"
|
|
if js_file.exists():
|
|
print("✅ locale_toggle.js found")
|
|
else:
|
|
print(f"❌ locale_toggle.js not found at: {js_file}") |