Thank you for your interest in contributing to this project! This document provides guidelines for contributing code, documentation, and other improvements.
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Code Style Guidelines
- License Agreement
- Pull Request Process
- Attribution Requirements
We are committed to providing a welcoming and inclusive environment for all contributors, regardless of experience level, gender identity, sexual orientation, disability, personal appearance, race, ethnicity, age, religion, or nationality.
- Be respectful and constructive in discussions
- Provide helpful feedback
- Focus on the code and ideas, not the person
- Be patient with newcomers
- Give credit where it's due
- Harassment, discrimination, or offensive comments
- Trolling or deliberately inflammatory behavior
- Publishing others' private information without permission
- Any conduct that would be considered inappropriate in a professional setting
Before submitting a bug report:
- Check the existing GitHub Issues
- Test with the latest version
- Ensure it's not a ComfyUI issue (try with vanilla ComfyUI)
When submitting a bug report, include:
- ComfyUI version
- Python version
- Operating system
- GPU/CUDA version (if using GPU features)
- Complete error message and traceback
- Minimal reproducible example
- Screenshots or workflow JSON if applicable
We welcome suggestions for new features! Please include:
- Clear description of the feature
- Use case and motivation
- Example of how it would work
- Any relevant research papers or algorithms
- Whether you're willing to implement it yourself
We welcome contributions of:
- New Nodes: Additional image processing algorithms
- Bug Fixes: Corrections to existing code
- Performance Improvements: Optimizations
- Documentation: Improvements to guides and examples
- Tests: Unit tests and integration tests
- Examples: Sample workflows and use cases
# Fork the repository on GitHub, then clone your fork:
git clone https://github.com/YOUR_USERNAME/Eric_Image_Processing_Nodes.git
cd Eric_Image_Processing_Nodes# Create a virtual environment
python -m venv .venv
# Activate it
# Windows:
.venv\Scripts\activate
# Linux/Mac:
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Install development dependencies
pip install pytest black flake8 mypypip install pre-commit
pre-commit install# Create a symlink in ComfyUI's custom_nodes directory
# Windows (run as administrator):
mklink /D "C:\path\to\ComfyUI\custom_nodes\Eric_Image_Processing_Nodes" "C:\path\to\your\clone"
# Linux/Mac:
ln -s /path/to/your/clone /path/to/ComfyUI/custom_nodes/Eric_Image_Processing_NodesWe follow PEP 8 with some modifications:
# Line length: 100 characters (not 79)
# Use 4 spaces for indentation (no tabs)
# Use double quotes for strings (unless single quotes avoid escaping)All new node files must include a proper header:
"""
[Node Name] for ComfyUI
[Brief description]
Author: Eric Hiss (GitHub: EricRollei)
License: See LICENSE file in repository root
[If using external algorithm/model:]
Original Algorithm:
Paper: [Title]
Authors: [Authors]
Source: [URL]
License: [License]
Citation:
@[type]{[key],
title={[Title]},
author={[Authors]},
year={[Year]}
}
Dependencies:
- Library (License)
- Library (License)
"""Follow the established pattern:
class YourNode(BaseImageProcessingNode):
"""
Detailed docstring explaining:
- What the node does
- When to use it
- Key parameters
- Typical use cases
"""
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"image": ("IMAGE",),
# ... other inputs
}
}
RETURN_TYPES = ("IMAGE",)
RETURN_NAMES = ("processed_image",)
FUNCTION = "process"
CATEGORY = "Eric's Image Processing/Your Category"
def process(self, image, **kwargs):
# Process logic here
passKeep processing logic separate from node code:
# scripts/your_algorithm.py
"""
Pure processing functions (no ComfyUI dependencies)
Can be tested standalone
"""
def your_algorithm(image_np: np.ndarray, **params) -> np.ndarray:
"""
Process image with your algorithm.
Args:
image_np: Input image as numpy array [H, W, C] with values 0-255
**params: Algorithm parameters
Returns:
Processed image as numpy array [H, W, C] with values 0-255
"""
# Ensure contiguous array for OpenCV compatibility
image_np = np.ascontiguousarray(image_np)
# Your processing logic
# Ensure output is contiguous
result = np.ascontiguousarray(result)
return resultAdd tests for new functionality:
# tests/test_your_node.py
import pytest
import numpy as np
from scripts.your_algorithm import your_algorithm
def test_your_algorithm_basic():
"""Test basic functionality"""
image = np.random.randint(0, 255, (100, 100, 3), dtype=np.uint8)
result = your_algorithm(image)
assert result.shape == image.shape
assert result.dtype == np.uint8
def test_your_algorithm_edge_cases():
"""Test edge cases"""
# Test with all black
black = np.zeros((100, 100, 3), dtype=np.uint8)
result = your_algorithm(black)
assert result is not None-
Your contributions will be licensed under the same dual license as the project:
- Non-commercial: CC BY-NC 4.0
- Commercial: Separate license required (contact eric@historic.camera)
-
You have the right to contribute the code (it's your original work or you have permission)
-
You will provide proper attribution for any:
- External algorithms or models used
- Research papers implemented
- Third-party code adapted
- Dependencies added
-
You grant the project maintainer (Eric Hiss) the right to:
- Include your contribution in the project
- Modify your contribution as needed
- Relicense your contribution if the project license changes
For major contributions (new models, significant features), please:
- Add your name to the CONTRIBUTORS list
- Include your email for attribution (optional)
- Document your contribution in the commit message
git checkout -b feature/your-feature-name
# or
git checkout -b fix/bug-description- Follow the code style guidelines
- Add proper headers to new files
- Update documentation as needed
- Add tests for new functionality
- Ensure all tests pass
Use clear, descriptive commit messages:
git commit -m "Add [Feature]: Brief description
- Detailed point 1
- Detailed point 2
- References #issue-number if applicable"git push origin feature/your-feature-nameOn GitHub:
- Go to your fork
- Click "New Pull Request"
- Select your branch
- Fill out the PR template:
- Description of changes
- Motivation and context
- Testing performed
- Screenshots if UI changes
- Checklist items completed
- Respond to review comments
- Make requested changes
- Update the PR
- Be patient and respectful
Once approved, the maintainer will merge your PR. Thank you! 🎉
You must include:
- Original paper citation in docstring
- Source repository link if applicable
- License information of the original work
- Author credits
- Link to pretrained weights if used
Update these files:
requirements.txt- Add the dependencyLICENSE- Add dependency license infoDocs/MODEL_WEIGHTS.md- If models are involved- File header - List new dependencies
"""
Original Algorithm:
Paper: "Algorithm Name"
Authors: Smith et al., Conference 2023
Source: https://github.com/author/repo
License: MIT License
Pretrained weights: https://github.com/author/repo/releases
Citation:
@inproceedings{smith2023algorithm,
title={Algorithm Name},
author={Smith, John and Doe, Jane},
booktitle={Conference},
year={2023}
}
Implementation Notes:
[Your modifications or adaptations]
Contributed by: [Your Name] (GitHub: @yourusername)
Date: [Month Year]
"""- Issues: Use GitHub Issues for questions
- Discussions: Use GitHub Discussions for general discussions
- Email: For private matters, contact eric@historic.camera
Contributors will be acknowledged in:
- The CONTRIBUTORS file
- Release notes
- Documentation credits section
Thank you for contributing! Your work helps the ComfyUI community! 🚀