- Implemented true 'overwrite last' for video node: finds most recently modified video file and overwrites it regardless of filename - Fixed missing sanitize_json_for_export import in video_node.py - Added sanitize_json_for_export to image_node.py for all workflow JSON exports - Merged upstream changes: process_batched_images, validate_path_is_safe, format_ext sanitization
31 lines
898 B
Python
31 lines
898 B
Python
"""ComfyUI nodes for sending images and video to Discord and saving them locally"""
|
|
|
|
import os
|
|
import sys
|
|
|
|
# Get the current directory
|
|
current_dir = os.path.dirname(os.path.realpath(__file__))
|
|
|
|
# Add to path if not already there
|
|
if current_dir not in sys.path:
|
|
sys.path.insert(0, current_dir)
|
|
|
|
# Import nodes from nodes package using relative imports
|
|
from .nodes.image_node import DiscordSendSaveImage
|
|
from .nodes.video_node import DiscordSendSaveVideo
|
|
|
|
# Node class mappings for ComfyUI
|
|
NODE_CLASS_MAPPINGS = {
|
|
"DiscordSendSaveImage": DiscordSendSaveImage,
|
|
"DiscordSendSaveVideo": DiscordSendSaveVideo
|
|
}
|
|
|
|
# Display names for ComfyUI
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
"DiscordSendSaveImage": "Discord Send & Save Image 📤",
|
|
"DiscordSendSaveVideo": "Discord Send & Save Video 🎬"
|
|
}
|
|
|
|
# Export all required elements
|
|
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']
|