- Fix MRO conflict in SaveAudioPlus by removing multiple inheritance - Convert nodes from comfy_api to traditional ComfyUI structure - Update nano_banana_multi_input.py to use instance methods instead of class methods - Convert concat_string.py and filter_string.py to traditional INPUT_TYPES pattern - Replace __init__.py extension system with traditional NODE_CLASS_MAPPINGS - Remove comfy_api imports that were causing compatibility issues with Nodes 2.0 - All nodes now work with both legacy and Nodes 2.0 systems Resolves: Cannot create consistent method resolution order (MRO) error Resolves: comfy_api import issues causing node loading failures
104 lines
3.7 KiB
Python
104 lines
3.7 KiB
Python
"""ComfyUI node pack for string manipulation and utilities."""
|
|
|
|
# Import node classes from individual files
|
|
from .concat_string import ConcatString
|
|
from .filter_string import FilterString
|
|
from .yellow_bus import YellowBus
|
|
from .zoom_out_composer import ZoomOutComposer
|
|
from .folder_loader import FolderLoader
|
|
from .size_selector import SizeSelector
|
|
from .load_image_plus import LoadImagePlusKlinter
|
|
from .aspect_selector import AspectSelector
|
|
from .speed_ramp import SpeedRampNode
|
|
from .string_contact_multi import StringContactMulti
|
|
from .node_value_to_string import NodeValue2StringMulti
|
|
from .outpaint_padding import OutpaintPadding
|
|
from .video_extend import LoadVideoForExtending, PrepVideoForExtend
|
|
from .video_from_folder import VideoFromFolder
|
|
from .nano_banana_multi_input import NanoBananaMultiInput
|
|
from .json_extractor import JsonExtractorKlinter
|
|
from .save_audio_plus import SaveAudioPlus
|
|
from .bbox_cropper import BBoxCropper
|
|
from .output_tester import OutputTester
|
|
from .flexible_batch_image import FlexibleBatchImage
|
|
|
|
# Mapping of node identifiers to their respective class implementations
|
|
NODE_CLASS_MAPPINGS = {
|
|
# String manipulation nodes
|
|
"concat": ConcatString,
|
|
"filter": FilterString,
|
|
"string_contact_multi": StringContactMulti,
|
|
"nodevalue2stringmulti": NodeValue2StringMulti,
|
|
|
|
# Core nodes
|
|
"YellowBus": YellowBus,
|
|
|
|
# Image processing nodes
|
|
"ZoomOutComposer": ZoomOutComposer,
|
|
"FolderLoader": FolderLoader,
|
|
"SizeSelector": SizeSelector,
|
|
"LoadImagePlus": LoadImagePlusKlinter,
|
|
"AspectSelector": AspectSelector,
|
|
"SpeedRamp": SpeedRampNode,
|
|
"OutpaintPadding": OutpaintPadding,
|
|
"BBoxCropper": BBoxCropper,
|
|
"FlexibleBatchImage": FlexibleBatchImage,
|
|
|
|
# Video processing nodes
|
|
"LoadVideoForExtendingKlinter": LoadVideoForExtending,
|
|
"PrepVideoForExtendKlinter": PrepVideoForExtend,
|
|
"VideoFromFolder": VideoFromFolder,
|
|
|
|
# AI Image Generation nodes
|
|
"NanoBananaMultiInput": NanoBananaMultiInput,
|
|
|
|
# JSON processing nodes
|
|
"Json Extractor - klinter": JsonExtractorKlinter,
|
|
|
|
# Audio processing nodes
|
|
"SaveAudioPlus": SaveAudioPlus,
|
|
|
|
# Debug and testing nodes
|
|
"OutputTester": OutputTester
|
|
}
|
|
|
|
# Mapping of node identifiers to their display names for UI or logging purposes
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
"concat": "Concat String - klinter",
|
|
"filter": "Filter String - klinter",
|
|
"string_contact_multi": "String Contact Multi - klinter",
|
|
"nodevalue2stringmulti": "NodeValue2String Multi - klinter",
|
|
"YellowBus": "Yellow Bus - klinter",
|
|
"ZoomOutComposer": "Zoom Out Composer - klinter",
|
|
"FolderLoader": "Folder Loader - klinter",
|
|
"SizeSelector": "Size Selector - klinter",
|
|
"LoadImagePlus": "Load Image Plus - klinter",
|
|
"AspectSelector": "Aspect Selector - klinter",
|
|
"SpeedRamp": "Speed Ramp - klinter",
|
|
"OutpaintPadding": "Outpaint Padding - klinter",
|
|
"BBoxCropper": "BBox Cropper - klinter",
|
|
"FlexibleBatchImage": "Flexible Batch Image - klinter",
|
|
"LoadVideoForExtendingKlinter": "Load Video For Extending - klinter",
|
|
"PrepVideoForExtendKlinter": "Prep Video For Extend - klinter",
|
|
"VideoFromFolder": "Video From Folder - klinter",
|
|
"NanoBananaMultiInput": "Nano Banana Multi Input - Klinter",
|
|
"Json Extractor - klinter": "Json Extractor - klinter",
|
|
"SaveAudioPlus": "Save Audio Plus - klinter",
|
|
"OutputTester": "Output Tester - klinter"
|
|
}
|
|
|
|
# Add this section to specify the location of JavaScript files
|
|
WEB_DIRECTORY = "./js"
|
|
|
|
# List of JavaScript files to include
|
|
WEB_EXTENSIONS = [
|
|
"yellow_bus.js",
|
|
"expandable_yellow_bus.js",
|
|
"queue_counter_logic.js",
|
|
"queue_counter_ui.js",
|
|
"node_to_string.js",
|
|
"nodevalue2string.js",
|
|
"string_contact_multi.js",
|
|
"video_upload.js"
|
|
]
|