- Universal metadata extraction and conversion across AI platforms - Support for A1111, ComfyUI, Civitai, Forge, Tensor.AI, Leonardo.AI - Template-driven architecture for easy platform extension - Model dependency resolution with download URLs - Custom 'meta' PNG chunk standard for cross-platform compatibility - Comprehensive validation and testing system
6.0 KiB
Contributing to MetaMan
Thank you for considering contributing to MetaMan! This project aims to create universal metadata interoperability across AI image generation platforms.
🤝 How to Contribute
Types of Contributions Welcome
- New Platform Support: Add templates for new AI image generation services
- Bug Fixes: Fix parsing errors, conversion issues, or template problems
- Feature Enhancements: Improve existing functionality or add new capabilities
- Documentation: Improve setup guides, examples, or API documentation
- Testing: Add test cases, validation scripts, or example workflows
- Optimization: Performance improvements or code quality enhancements
Getting Started
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/MetaMan.git cd MetaMan - Install dependencies:
pip install -r requirements.txt - Run tests to ensure everything works:
python test_installation.py python validation.py
Development Process
-
Create a feature branch:
git checkout -b feature/your-feature-name -
Make your changes following these guidelines:
- Follow existing code style and conventions
- Add docstrings to new functions and classes
- Update templates and schema as needed
- Add validation tests for new features
-
Test your changes:
python test_installation.py python validation.py -
Commit your changes:
git add . git commit -m "Add feature: your descriptive commit message" -
Push to your fork:
git push origin feature/your-feature-name -
Create a Pull Request on GitHub
🔧 Adding New Platform Support
To add support for a new AI image generation service:
1. Create Service Template
Copy an existing template and modify:
cp templates/services/automatic1111.yaml templates/services/newservice.yaml
Key sections to update:
service_name: Unique identifier for the serviceoutput_format: How metadata should be formattedfield_mappings: How universal fields map to service fieldspng_chunk: How metadata is stored in PNG filesvalidation: Service-specific validation rules
2. Update Universal Schema (if needed)
If the new service has unique metadata fields:
- Add fields to
templates/universal_schema.yaml - Specify
supported_bylist including your new service - Define field types, validation rules, and mappings
3. Test Your Template
Run validation to ensure your template is correct:
python validation.py
4. Add Examples
Create example metadata files in the examples/ directory showing:
- Typical metadata from your service
- Expected conversion output
- Any special handling requirements
📝 Code Style Guidelines
- Python: Follow PEP 8 with 4-space indentation
- YAML: Use 2-space indentation, consistent key ordering
- Comments: Document complex logic and platform-specific quirks
- Error Handling: Always include try/catch blocks for external API calls
- Type Hints: Use type hints for function parameters and return values
🧪 Testing
Running Tests
# Full test suite
python test_installation.py
# Template validation
python validation.py
# Test specific service template
python validation.py templates/services/yourservice.yaml
Adding Tests
When adding new features:
- Add test cases to
validation.py - Include both positive and negative test scenarios
- Test edge cases (malformed metadata, missing fields, etc.)
- Verify cross-platform conversion accuracy
📚 Documentation
README Updates
When adding new features, update:
- Feature list in main README.md
- Compatibility matrix
- Usage examples
- Installation requirements
Template Documentation
Each service template should include:
- Clear description of the service and its metadata format
- Examples of typical metadata structures
- Notes about any special handling or limitations
- Links to official service documentation
🐛 Bug Reports
When reporting bugs:
- Use GitHub Issues with a descriptive title
- Include steps to reproduce the issue
- Provide sample data (metadata, images, workflows)
- Specify your environment (Python version, OS, ComfyUI version)
- Include error messages and stack traces
Bug Report Template
**Bug Description:**
Brief description of the issue
**Steps to Reproduce:**
1. Load image with metadata from [service]
2. Use MetaMan node with operation [operation]
3. Error occurs when...
**Expected Behavior:**
What should happen
**Actual Behavior:**
What actually happens
**Environment:**
- OS: [e.g., Windows 10, macOS 12, Ubuntu 20.04]
- Python: [e.g., 3.9.7]
- ComfyUI: [version]
- MetaMan: [version/commit]
**Sample Data:**
[Attach sample image or provide metadata text]
💡 Feature Requests
For new features:
- Check existing issues to avoid duplicates
- Describe the use case - why is this needed?
- Propose implementation if you have ideas
- Consider compatibility with existing features
🔄 Release Process
- Version Numbering: We follow semantic versioning (MAJOR.MINOR.PATCH)
- Changelog: Update CHANGELOG.md with new features and fixes
- Testing: All tests must pass before release
- Tagging: Create Git tags for releases
- Documentation: Update installation and setup guides
📞 Getting Help
- GitHub Discussions: For questions and general discussion
- Issues: For bug reports and feature requests
- Documentation: Check README.md and SETUP.md first
🏆 Recognition
Contributors will be recognized in:
- README.md contributors section
- Release notes for significant contributions
- Special thanks for new platform support
📄 License
By contributing to MetaMan, you agree that your contributions will be licensed under the same MIT License as the project.
Thank you for helping make AI image metadata universal and interoperable! 🎉