Files
danieljanata-ComfyUI-Prompt…/__init__.py
T
Claude 4a24994b70 Add complete ComfyUI Prompting System implementation
Implemented comprehensive prompt management system with the following features:

🎨 Core Nodes:
- Prompt Saver: Save prompts with metadata, lock/unlock mechanism
- Smart Text Input: Automatic change detection (new vs edit)
- Prompt Library Browser: Search, filter, load prompts
- Export Manager: Export/import database, statistics, cleanup

💾 Database Features:
- JSON storage with base64-encoded thumbnails (150x150px)
- Cross-platform path handling (Windows/Linux/macOS)
- Automatic deduplication by hash
- Merge functionality with conflict resolution
- Auto-cleanup of old unrated prompts

🖼️ Thumbnail System:
- Up to 3 thumbnails per prompt
- Lock/unlock mechanism for preserving favorite images
- Automatic thumbnail updates on generation
- Base64 encoding for single-file portability

🎯 Key Features:
- Category and tag management
- Rating system (0-5 stars)
- Generation history tracking
- PNG metadata extraction
- Search and filter capabilities
- Statistics and analytics

🌐 UI Components:
- JavaScript extensions for visual feedback
- CSS styling for modern interface
- Pulsing unlock button animation
- Color-coded change detection
- Custom node styling

📚 Documentation:
- Comprehensive README with usage examples
- Troubleshooting guide
- Advanced configuration options
- Merge logic explanation

All components are fully functional and ready for testing.
2026-01-14 08:25:24 +00:00

47 lines
1.3 KiB
Python

"""
ComfyUI Prompting System
A comprehensive prompt management system for ComfyUI with database storage and thumbnail support.
"""
import os
import sys
from pathlib import Path
# Add this directory to Python path
sys.path.insert(0, str(Path(__file__).parent))
# Import nodes
from nodes.prompt_saver import PromptSaverNode
from nodes.smart_text_input import SmartTextInputNode
from nodes.prompt_library_browser import PromptLibraryBrowserNode
from nodes.export_manager import ExportManagerNode
# ComfyUI Node Registration
NODE_CLASS_MAPPINGS = {
"PromptSaver": PromptSaverNode,
"SmartTextInput": SmartTextInputNode,
"PromptLibraryBrowser": PromptLibraryBrowserNode,
"ExportManager": ExportManagerNode,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"PromptSaver": "💾 Prompt Saver",
"SmartTextInput": "✏️ Smart Text Input",
"PromptLibraryBrowser": "📚 Prompt Library Browser",
"ExportManager": "📤 Export Manager",
}
# Web directory for UI components
WEB_DIRECTORY = "./web"
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS', 'WEB_DIRECTORY']
# Print loaded info
print("=" * 60)
print("🎨 ComfyUI Prompting System Loaded!")
print("=" * 60)
print("Nodes loaded:")
for node_name, display_name in NODE_DISPLAY_NAME_MAPPINGS.items():
print(f" • {display_name}")
print("=" * 60)