ComfyUI Extension: ComfyUI-TechsToolz
A modular collection of ComfyUI custom nodes with advanced dependency management and ComfyUI Manager integration.
Custom Nodes (0)
README
ComfyUI-TechsToolz
A modular collection of ComfyUI custom nodes with advanced dependency management and ComfyUI Manager integration.
π Features
π₯οΈπ Available Nodes
- π₯οΈπ TechsToolz: Model Name Extractor - Extracts model names from ComfyUI MODEL objects
- π₯οΈπ TechsToolz: Save Image w/Metadata - Advanced image saving with embedded metadata
π Dependency Management
- Automatic Dependency Scanning - Scans all Python files and identifies dependencies
- Runtime Dependency Checking - Validates dependencies at startup
- Missing Dependency Reporting - Clear reports on missing packages with installation suggestions
- Dependency Health Monitoring - Ongoing validation of package availability
π§ ComfyUI Manager Integration
- Node Enable/Disable - Toggle individual node modules on/off
- Configuration Management - Persistent configuration storage
- Manager API Support - Full integration with ComfyUI Manager
- Modular Architecture - Easy addition of new node modules
π¦ Installation
Via ComfyUI Manager (Recommended)
- Open ComfyUI Manager
- Search for "ComfyUI-TechsToolz"
- Click Install
- Restart ComfyUI
Manual Installation
- Clone this repository into your ComfyUI custom_nodes directory:
cd ComfyUI/custom_nodes
git clone https://github.com/robin-collins/ComfyUI-TechsToolz.git
- Run the installation script:
cd ComfyUI-TechsToolz
python install.py
- Restart ComfyUI
π§ Dependencies
Required
piexif
- EXIF metadata handlingnumpy
- Numerical operationsPillow
(PIL) - Image processing
ComfyUI Dependencies
folder_paths
- ComfyUI path utilitiescomfy
- ComfyUI core modulesnodes
- ComfyUI node system
All dependencies are automatically checked and reported at startup.
π Usage
Model Name Extractor
Extracts the filename from ComfyUI MODEL objects:
Inputs:
model
(MODEL) - Any ComfyUI model object
Outputs:
model_name
(STRING) - Extracted model filename
Supported Model Types:
- GGUF models
- Standard checkpoints (.ckpt, .safetensors)
- Various model formats with fallback handling
Save Image w/Metadata
Advanced image saving with embedded generation metadata:
Inputs:
images
(IMAGE) - Images to savefilename
(STRING) - Filename pattern with placeholderspath
(STRING) - Output directory pathextension
- Format: PNG, JPEG, WebPsteps
,cfg
,sampler_name
,scheduler
- Generation parameterspositive
,negative
- Promptsmodelname
- Model identifier- And more configuration options...
Features:
- Metadata Embedding: PNG metadata and EXIF data
- Filename Placeholders:
%time
,%seed
,%model
,%counter
,%date
- Directory Management: Automatic path creation
- Quality Control: Configurable compression settings
βοΈ Configuration
Node Configuration
Configuration is stored in node_config.json
:
{
"enabled_modules": ["image_nodes"],
"disabled_modules": [],
"package_info": {
"name": "ComfyUI-TechsToolz",
"version": "0.0.1",
"supports_manager": true
}
}
ComfyUI Manager Integration
The package provides several API functions for ComfyUI Manager:
get_node_list()
- List available nodesget_package_info()
- Package metadataenable_node_module(module_name)
- Enable a moduledisable_node_module(module_name)
- Disable a moduleget_dependency_report()
- Current dependency status
ποΈ Architecture
Modular Design
ComfyUI-TechsToolz/
βββ __init__.py # Main initialization with dependency checking
βββ image_nodes.py # Image processing nodes
βββ node_list.json # ComfyUI Manager node definitions
βββ install.py # Installation script
βββ node_config.json # Configuration storage
βββ requirements.txt # Python dependencies
Dependency Checking System
The DependencyChecker
class:
- Scans all Python files using AST parsing
- Extracts import statements
- Validates package availability
- Generates detailed reports
- Provides installation suggestions
Node Manager System
The NodeManager
class:
- Loads configuration from JSON
- Manages module enable/disable states
- Dynamically imports enabled modules
- Provides ComfyUI Manager API functions
π§ Development
Adding New Modules
- Create your module file (e.g.,
utility_nodes.py
) - Export
NODE_CLASSES
andNODE_DISPLAY_NAMES
dictionaries - Add the module to
available_modules
in__init__.py
- Update
node_list.json
with new node definitions
Example module structure:
# utility_nodes.py
class MyUtilityNode:
# ... node implementation ...
NODE_CLASSES = {
"MyUtilityNode": MyUtilityNode,
}
NODE_DISPLAY_NAMES = {
"MyUtilityNode": "π₯οΈπ TechsToolz: My Utility Node",
}
Code Standards
- Type Hints: Full type annotation required
- Documentation: Comprehensive docstrings
- Error Handling: Graceful failure handling
- Logging: Structured logging throughout
- Testing: Pytest for unit tests
Tools
# Linting and formatting
ruff check --fix .
ruff format .
# Type checking
mypy .
# Testing
pytest
π Dependency Report Example
============================================================
ComfyUI-TechsToolz Dependency Report
============================================================
Python files scanned: 3
Total unique dependencies: 8
Available dependencies: 6
Missing dependencies: 2
β
Available Dependencies:
------------------------------
β numpy
β piexif
β PIL
β folder_paths
β comfy
β json
β Missing Dependencies:
------------------------------
β some_package
β another_package
Installation suggestions:
pip install some_package another_package
============================================================
π€ Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Update documentation
- Submit a pull request
π License
GNU General Public License v3.0
π Acknowledgments
- ComfyUI community for the excellent platform
- ComfyUI Manager for the integration framework
- All contributors and users of this project
π Support
- GitHub Issues: Report bugs or request features
- Discussions: Community support and questions
Built with β€οΈ for the ComfyUI community