ComfyUI Extension: Ninode Utils
Utility nodes for ComfyUI including OpenAI Compatible Chat - Works with any OpenAI-compatible API endpoint including Lemonade, Ollama, OpenAI API, and LM Studio
Custom Nodes (0)
README
ComfyUI-Ninode-Utils
A collection of utility nodes for ComfyUI, featuring OpenAI Compatible Chat functionality and more.
๐ Features
OpenAI Compatible Chat Node
A flexible chat node that works with any OpenAI-compatible API endpoint, providing complete compatibility with the original ChatGPT node while supporting:
- Local servers like Lemonade Server (
http://127.0.0.1:8000/api/v1/chat/completions
) - Ollama (
http://localhost:11434/v1/chat/completions
) - OpenAI API (
https://api.openai.com/v1/chat/completions
) - LM Studio (
http://localhost:1234/v1/chat/completions
) - Any other OpenAI-compatible service
โจ Key Features
- ๐ Complete Input Compatibility - All inputs from the original ChatGPT node are supported
- ๐ฌ Multi-turn Conversations - Context persistence for ongoing conversations
- ๐ผ๏ธ Image Support - Vision model support with image inputs
- ๐ File Support - Document analysis with file inputs
- โ๏ธ Advanced Options - Fine-tuned control with advanced configuration
- ๐ Flexible API Configuration - Custom URLs and API keys
- ๐ค System Message Support - Set assistant behavior and personality
- ๐๏ธ Configurable Parameters - Temperature, top_p, max_tokens, and more
- ๐ก๏ธ Robust Error Handling - Graceful handling of various edge cases
VibeVoice Voice Design Node
A drop-in replacement for Minimax Voice Design node that generates custom voices from text descriptions using VibeVoice TTS. Perfect for the full-loop-Sora2-ComfyUI workflow!
Features:
- ๐๏ธ Voice Generation from Text Descriptions - Create custom voices based on detailed prompts
- ๐ Drop-in Compatibility - Same inputs/outputs as Minimax Voice Design node
- ๐ต Voice Cloning Support - Optional reference audio for voice cloning
- ๐ Local Processing - No API keys required, runs entirely locally
- โก High Quality - Uses VibeVoice's advanced TTS technology
โจ Key Features
- ๐ Complete Input Compatibility - Same interface as Minimax Voice Design node
- ๐ฏ Text-to-Voice Generation - Generate voices from detailed text descriptions
- ๐ต Reference Audio Support - Optional voice cloning with reference audio
- โ๏ธ Advanced Generation Controls - CFG scale, inference steps, temperature, top-p
- ๐ง Model Selection - Choose from available VibeVoice models
- ๐พ Audio Output - Saves generated audio as WAV files
- ๐๏ธ Memory Management - Optional model offloading for memory efficiency
๐ฆ Installation
Method 1: Git Clone (Recommended)
cd ComfyUI/custom_nodes
git clone https://github.com/iGavroche/ComfyUI-Ninode-Utils.git
cd ComfyUI-Ninode-Utils
pip install -r requirements.txt
Method 2: Manual Installation
- Download or clone this repository
- Place the
ComfyUI-Ninode-Utils
folder in your ComfyUIcustom_nodes
directory - Install dependencies:
pip install aiohttp torch Pillow numpy
- Restart ComfyUI
๐ฏ Usage
OpenAI Compatible Chat Node
The node appears in the "ComfyUI-Ninode-Utils" category and can be used as a drop-in replacement for the original ChatGPT node.
Required Parameters
- API URL: Your OpenAI-compatible endpoint (e.g.,
http://127.0.0.1:35841/v1/chat/completions
) - Model: Model name (e.g.,
gpt-4o-mini
,llama3.2
, etc.) - API Key: Authentication key (leave empty for local servers)
- Prompt: Your text input
- Persist Context: Enable multi-turn conversations
Optional Parameters
- Images: Image inputs for vision models
- Files: File inputs for document analysis
- Advanced Options: Advanced configuration from OpenAI Chat Advanced Options node
- Max Tokens: Response length limit
- Temperature: Creativity control (0.0-2.0)
- Top P: Diversity control (0.0-1.0)
- System Message: Assistant behavior setting
๐ง Configuration Examples
Lemonade Server
API URL: http://127.0.0.1:35841/v1/chat/completions
Model: gpt-4o-mini
API Key: (leave empty)
Ollama
API URL: http://localhost:11434/v1/chat/completions
Model: llama3.2
API Key: (leave empty)
OpenAI API
API URL: https://api.openai.com/v1/chat/completions
Model: gpt-4o
API Key: your-openai-api-key
LM Studio
API URL: http://localhost:1234/v1/chat/completions
Model: codellama-7b-instruct
API Key: (leave empty)
๐งช Testing
The package includes comprehensive tests to ensure reliability:
cd ComfyUI-Ninode-Utils
python test_node.py # Basic functionality tests
python test_new_inputs.py # Input compatibility tests
python test_advanced_options.py # Advanced options handling tests
python test_tensor_handling.py # Image tensor processing tests
๐ Requirements
- ComfyUI (latest version)
- Python 3.9+
- Dependencies:
aiohttp>=3.8.0
torch>=2.0.0
Pillow>=9.0.0
numpy>=1.25.0
๐ ๏ธ Development
Project Structure
ComfyUI-Ninode-Utils/
โโโ __init__.py # Package initialization
โโโ nodes.py # Main node implementations
โโโ pyproject.toml # Project configuration
โโโ requirements.txt # Dependencies
โโโ README.md # This file
โโโ test_node.py # Basic tests
โโโ test_new_inputs.py # Input compatibility tests
โโโ test_advanced_options.py # Advanced options tests
โโโ test_tensor_handling.py # Tensor processing tests
โโโ IMPLEMENTATION_SUMMARY.md # Technical documentation
Adding New Nodes
- Add your node class to
nodes.py
- Update
NODE_CLASS_MAPPINGS
andNODE_DISPLAY_NAME_MAPPINGS
- Add tests for your node
- Update documentation
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐จโ๐ป Author
- iGavroche - GitHub - [email protected]
๐ Acknowledgments
- ComfyUI community for the amazing framework
- OpenAI for the API specification
- All contributors and testers
๐ Changelog
v0.9.0 (Current)
- Initial release
- OpenAI Compatible Chat Node with full input compatibility
- Support for multiple API endpoints (Lemonade, Ollama, OpenAI, LM Studio)
- Comprehensive test suite
- Robust error handling and edge case management
๐ Bug Reports
If you encounter any issues, please:
- Check the Issues page
- Create a new issue with:
- ComfyUI version
- Python version
- Error message and traceback
- Steps to reproduce
๐ Support
For support, please open an issue on GitHub or contact iGavroche.
Made with โค๏ธ for the ComfyUI community