ComfyUI Extension: NBA-ComfyUINode
Version 1.2.1 - Dependency cleanup and archived LineSelector node A comprehensive collection of custom nodes for ComfyUI, providing advanced image processing, workflow control, and utility functions to enhance your AI image generation workflows.
Custom Nodes (0)
README
NBA-ComfyUINode
Version 1.2.1 - Dependency cleanup and archived LineSelector node
A comprehensive collection of custom nodes for ComfyUI, providing advanced image processing, workflow control, and utility functions to enhance your AI image generation workflows.
š Features
- Flow Control Nodes: Advanced workflow management with gates, branches, and state management
- Image Processing: Specialized nodes for image manipulation, resizing, and enhancement
- File Management: Advanced image loading, saving, and organization tools
- Utility Nodes: Text processing, list management, and data conversion utilities
- Hugging Face Integration: Direct integration with HF models for captioning and control
- JavaScript Extensions: Enhanced UI components for better user experience
š¦ Installation
Prerequisites
- ComfyUI installed and running
- Python 3.8 or higher
- Required dependencies (see requirements.txt)
Installation Steps
-
Clone the repository:
git clone https://github.com/enternalsaga/NBA-ComfyUINode.git cd NBA-ComfyUINode
-
Copy to ComfyUI custom_nodes directory:
cp -r NBA-ComfyUINode /path/to/ComfyUI/custom_nodes/
-
Install dependencies:
pip install -r requirements.txt
-
Restart ComfyUI and the nodes will be automatically discovered and loaded.
š§© Available Nodes
Flow Control Nodes
- NBA Flow Any Gate: Conditional workflow execution based on any input
- NBA Flow Branch: Multi-path workflow branching
- NBA Flow Gate: Simple conditional execution
- NBA Flow Multi Gate: Multiple condition evaluation
- NBA Flow Sequence: Sequential workflow execution
- NBA Flow Set State: State management for workflows
- NBA Flow Any Checker: Input validation and checking
Image Processing Nodes
- NBA Match Size: Resize images to match dimensions
- NBA Remove Banding Artifacts: Eliminate banding in generated images
- NBA Resize By Pixel Ratio: Proportional image resizing
- NBA Scale To Pixels: Precise pixel-based scaling
- NBA Colorize Depthmap: Convert depth maps to colored images
- NBA Kontext Diff Merge: Advanced image merging with context
File Management Nodes
- NBA Image Output: Advanced image saving with metadata
- NBA Image Output Adv: Enhanced image output with additional features
- NBA Load Image: Flexible image loading from various sources
- NBA Load Image Input: Advanced image input with folder support
- NBA Load Image Input Advanced: Enhanced image loading with subfolder support
- NBA Load Image From Folder: Batch image loading from directories
- NBA Save Image To Path: Direct image saving to specified paths
- NBA Extract File Names: Extract and process filenames
- NBA List Image Files: List and process image files
- NBA List Text Files: List and process text files
Utility Nodes
- NBA Any To Any: Universal data type conversion
- NBA Text Split By Delimiter: Split/truncate by characters, words, or delimiters with forward/backward slicing, start position, and smart numbering removal
- NBA List Info: Information extraction from lists
- NBA Image Filename Info: Extract metadata from image filenames
- NBA Process Tags: Tag processing and management
- NBA Save Text File To Path: Text file saving utilities
- NBA Sym Link: Symbolic link creation utilities
Hugging Face Integration
- NBA Hf Zen Ctrl: Zen control model integration
- NBA Hf Joy Caption: Joy captioning model
- NBA Hf Ic Light V2: IC Light V2 model integration
- NBA Hf Image2Body: Image to body conversion
Advanced Nodes
- NBA Kontext Inpainting Conditioning: Advanced inpainting with context
- NBA Multi Slider: Multi-value slider interface
- NBA Float Ramp: Float value ramping utilities
- NBA Dual Condition: Dual condition evaluation
- NBA OLM Dragcrop: Drag and crop functionality
šÆ Usage Examples
Basic Image Processing Workflow
# Load image and resize
image = LoadImageInput(image_path="input.jpg")
resized = MatchSize(image=image, target_size=(512, 512))
# Process and save
processed = RemoveBandingArtifacts(image=resized)
output = ImageOutput(
image=processed,
output_path="./output/",
save_prefix="processed",
file_type="png"
)
Advanced Flow Control
# Conditional processing based on image size
checker = FlowAnyChecker(condition="image_width > 512")
gate = FlowAnyGate(
condition=checker,
true_branch=ScaleToPixels(image=image, target_pixels=262144),
false_branch=image
)
Batch Processing with Organization
# Load multiple images from folder
images = LoadImageFromFolder(
folder_path="./input/",
file_types=["jpg", "png"]
)
# Process each image with organized output
for image in images:
processed = RemoveBandingArtifacts(image=image)
ImageOutput(
image=processed,
output_path="./output/%date:yyyy-MM-dd%/",
save_prefix="batch_%date:HHmmss%",
prefix_sub="processed",
number_padding=4
)
š Project Structure
NBA-ComfyUINode/
āāā __init__.py # Auto-discovery and registration
āāā nodes/ # All node implementations
ā āāā Flow*.py # Flow control nodes
ā āāā Image*.py # Image processing nodes
ā āāā Load*.py # Image loading nodes
ā āāā Hf*.py # Hugging Face integration
ā āāā *.py # Utility and other nodes
āāā js/ # JavaScript UI extensions
ā āāā *.js # UI enhancement scripts
ā āāā *.js.backup # Backup files
āāā examples/ # Usage examples and tutorials
ā āāā usage_examples.py # Comprehensive examples
āāā web/ # Web assets
āāā lists/ # Configuration lists
āāā requirements.txt # Python dependencies
āāā README.md # This file
š§ Configuration
Node Auto-Discovery
The project uses automatic node discovery. Simply place your node classes in the nodes/
directory with the required attributes:
INPUT_TYPES
: Define input parametersRETURN_TYPES
: Define output typesFUNCTION
: Main processing functionCATEGORY
: Node category for organization
JavaScript Extensions
Custom UI components are automatically loaded from the js/
directory. These enhance the user experience with:
- Dynamic widgets
- Advanced input controls
- Drag-and-drop functionality
- Real-time preview updates
š¤ Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Add your nodes to the
nodes/
directory - Add any JavaScript extensions to the
js/
directory - Update documentation and examples
- Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
š License
This project is licensed under the MIT License - see the LICENSE file for details.
š Acknowledgments
- ComfyUI community for the excellent framework
- Hugging Face for model integrations
- All contributors who have helped improve these nodes
š Support
- Issues: Report bugs and request features on GitHub
- Discussions: Join community discussions for help and ideas
- Documentation: Check the examples folder for detailed usage examples
Happy Node Building! šØ