A custom node for ComfyUI that integrates DeepSeek's powerful chat and instruction API, enabling seamless AI interactions within your ComfyUI workflows.
-
Dual Operating Modes
- Chat mode with conversation memory
- Single-turn instruction mode
-
Vision Integration
- Support for image context through vision descriptions
- Seamless integration with ComfyUI's visual workflows
-
Advanced Configuration
- Customizable max token limit (up to 8192 tokens)
- Optional reasoning display
- Configurable chat history management
- Built-in rate limiting protection
- Clone this repository into your ComfyUI custom nodes directory:
cd ComfyUI/custom_nodes
git clone https://github.com/ShmuelRonen/comfyui-deepseek-chat.git
-
Get your DeepSeek API key:
- Go to platform.deepseek.com/api_keys
- Sign in or create an account
- Generate a new API key
- Copy the key
-
Edit the
config.json
file in the node directory:
{
"deepseek_api_key": "your-api-key-here"
}
Check API availability on this site: [DeepSeek API status](https://platform.deepseek.com/
The node provides several input parameters:
- mode: Choose between "chat" and "instruct"
- prompt: Your input text/question
- max_tokens: Maximum response length (1-8192)
- show_reasoning: Toggle reasoning display
- clear_history: Option to reset conversation
- remember_chat: Enable/disable chat history persistence
- vision_description: Optional image context description. This can be used to:
- Provide image descriptions for visual context
- Connect with image generation nodes
- Enable vision-language tasks
- Process image analysis results
- Add the "DeepSeek-V3 Chat/Instruct" node to your workflow
- Configure the node parameters
- Connect it to other nodes as needed
- Execute the workflow
The node provides two outputs:
latest_response
: The most recent AI responsefull_chat_history
: Complete conversation history
The node implements a 1-second minimum interval between requests to comply with API limits.
- Comprehensive error logging
- Graceful handling of API failures
- Clear error messages in node outputs
API Endpoint: https://api.deepseek.com/v1/chat/completions
Model: deepseek-reasoner
- Supports full chat context with message history
- Handles authentication via API key
- Implements rate limiting protection
comfyui-deepseek-chat/
├── deepseek_chat_node.py
├── config.json
├── chat_history.json
└── README.md
- Python 3.6+
- requests library
- ComfyUI environment
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built for ComfyUI
- Powered by DeepSeek's API
- Inspired by community needs for AI integration in visual workflows