ComfyUI Extension: ComfyUI_ComfyGroq
A streamlined ComfyUI custom node package for interacting with GROQ's AI models, including both text and vision capabilities.
Custom Nodes (0)
README
ComfyUI_ComfyGroq
A streamlined ComfyUI custom node package for interacting with GROQ's AI models, including both text and vision capabilities.
Features
- GROQ LLM Node: Generate text using GROQ's language models
- GROQ Vision Node: Analyze images with GROQ's vision-language models
- API Key Management: Set API key per-node or via environment variable
- Simple Interface: Easy-to-use nodes with sensible defaults
Installation
-
Clone or download this repository into your ComfyUI
custom_nodes
directory:cd ComfyUI/custom_nodes git clone https://github.com/yourusername/ComfyUI_ComfyGroq.git
-
Install the required dependencies:
pip install groq
Usage
Setting Up Your API Key
You can provide your GROQ API key in one of two ways:
- Per-node: Enter your API key directly in the node's input field
- Environment Variable: Set
GROQ_API_KEY
in your environment variables
Available Nodes
GROQ LLM
Generates text using GROQ's language models.
Inputs:
api_key
: Your GROQ API key (or leave empty to use environment variable)model
: The language model to useprompt
: Your input promptsystem_message
: System message to guide the model's behaviortemperature
: Controls randomness (0.0 to 2.0)max_tokens
: Maximum number of tokens to generatetop_p
: Nucleus sampling parameterseed
: Random seed for reproducibility
GROQ Vision
Analyzes images using GROQ's vision-language models.
Inputs:
api_key
: Your GROQ API key (or leave empty to use environment variable)model
: The vision model to useimage
: Input image to analyzeprompt
: Your question or instruction about the imagetemperature
: Controls randomness (0.0 to 2.0)max_tokens
: Maximum number of tokens to generate
Examples
Text Generation
- Add a "GROQ LLM" node to your workflow
- Enter your API key or set the
GROQ_API_KEY
environment variable - Type your prompt and adjust parameters as needed
- Run the workflow to generate text
Image Analysis
- Add an image loader node and a "GROQ Vision" node
- Connect the image to the Vision node
- Enter your question about the image
- Run the workflow to get the model's analysis
License
This project is licensed under the MIT License.