- Add ImageToMultipleOfNode for image dimension adjustment - Ensures image dimensions are multiples of specified values - Supports both padding and cropping modes - Useful for model-specific dimension requirements - Add tests and documentation - Register node in ComfyAssets category
38 lines
1.4 KiB
Python
38 lines
1.4 KiB
Python
"""
|
|
KikoTools package initialization and node registry
|
|
Handles automatic discovery and registration of all ComfyAssets tools
|
|
"""
|
|
|
|
from .tools.resolution_calculator import ResolutionCalculatorNode
|
|
from .tools.width_height_selector import WidthHeightSelectorNode
|
|
from .tools.seed_history import SeedHistoryNode
|
|
from .tools.sampler_combo import SamplerComboNode, SamplerComboCompactNode
|
|
from .tools.empty_latent_batch import EmptyLatentBatchNode
|
|
from .tools.kiko_save_image import KikoSaveImageNode
|
|
from .tools.image_to_multiple_of import ImageToMultipleOfNode
|
|
|
|
# ComfyUI node registration mappings
|
|
NODE_CLASS_MAPPINGS = {
|
|
"ResolutionCalculator": ResolutionCalculatorNode,
|
|
"WidthHeightSelector": WidthHeightSelectorNode,
|
|
"SeedHistory": SeedHistoryNode,
|
|
"SamplerCombo": SamplerComboNode,
|
|
"SamplerComboCompact": SamplerComboCompactNode,
|
|
"EmptyLatentBatch": EmptyLatentBatchNode,
|
|
"KikoSaveImage": KikoSaveImageNode,
|
|
"ImageToMultipleOf": ImageToMultipleOfNode,
|
|
}
|
|
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
"ResolutionCalculator": "Resolution Calculator",
|
|
"WidthHeightSelector": "Width Height Selector",
|
|
"SeedHistory": "Seed History",
|
|
"SamplerCombo": "Sampler Combo",
|
|
"SamplerComboCompact": "Sampler Combo (Compact)",
|
|
"EmptyLatentBatch": "Empty Latent Batch",
|
|
"KikoSaveImage": "Kiko Save Image",
|
|
"ImageToMultipleOf": "Image to Multiple of",
|
|
}
|
|
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]
|