This extension integrates Google's Gemini API and Ollama into ComfyUI, allowing users to leverage these powerful language models directly within their ComfyUI workflows.
This extension integrates Google's Gemini API, OpenAI (ChatGPT), Anthropic's Claude, Ollama, Qwen, and various image processing tools into ComfyUI, allowing users to leverage these powerful models and features directly within their ComfyUI workflows.
Access Anthropic's Claude models for advanced language tasks:
Integrate local language models running via Ollama:
Access Alibaba's Qwen language models:
Provides advanced image resolution and sizing options:
Extensive styling options for various creative needs:
π¨ General Arts β A broad spectrum of traditional and modern art styles πΈ Anime β Bring your designs to life with anime-inspired aesthetics π¨ Artist β Channel the influence of world-class artists π· Camera β Fine-tune focal lengths, angles, and setups π Camera Angles β Add dynamic perspectives with a range of angles π Aesthetic β Define unique artistic vibes and styles ποΈ Color Grading β Achieve rich cinematic tones and palettes π¬ Movies β Get inspired by different cinematic worlds ποΈ Digital Artform β From vector art to abstract digital styles πͺ Body Type β Customize different body shapes and dimensions π² Reactions β Capture authentic emotional expressions π Feelings β Set the emotional tone for each creation πΈ Photographers β Infuse the style of renowned photographers π Hair Style β Wide variety of hair designs for your characters ποΈ Architecture Style β Classical to modern architectural themes π οΈ Architect β Designs inspired by notable architects π Vehicle β Add cars, planes, or futuristic transportation πΊ Poses β Customize dynamic body positions π¬ Science β Add futuristic, scientific elements π Clothing State β Define the wear and tear of clothing π Clothing Style β Wide range of fashion styles π¨ Composition β Control the layout and arrangement of elements π Depth β Add dimensionality and focus to your scenes π Environment β From nature to urban settings, create rich backdrops π Face β Customize facial expressions and emotions π¦ Fantasy β Bring magical and surreal elements into your visuals π Filter β Apply unique visual filters for artistic effects π€ Gothic β Channel dark, mysterious, and dramatic themes π» Halloween β Get spooky with Halloween-inspired designs βοΈ Line Art β Incorporate clean, bold lines into your creations π‘ Lighting β Set the mood with dramatic lighting effects βοΈ Milehigh β Capture the essence of aviation and travel π Mood β Set the emotional tone and atmosphere ποΈ Movie Poster β Create dramatic, story-driven poster designs πΈ Punk β Channel bold, rebellious aesthetics π Travel Poster β Design vintage travel posters with global vibes
Convert raster images to vector graphics and save them:
Raster to Vector node parameters:
Save SVG node options:
Split text based on specified delimiters:
Clone this repository into your ComfyUI's custom_nodes
directory:
cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/yourusername/GeminiOllama.git
Install the required dependencies:
pip install google-generativeai openai anthropic requests vtracer
Edit config.json
: with your fav AI provider
{
"GEMINI_API_KEY": "your_gemini_api_key",
"OPENAI_API_KEY": "your_openai_api_key",
"ANTHROPIC_API_KEY": "your_claude_api_key",
"OLLAMA_URL": "http://localhost:11434",
"QWEN_API_KEY": "your_qwen_api_key"
}
After installation and configuration, new nodes for each API will be available in ComfyUI.
api_choice
: Choose between "Gemini", "OpenAI", "Claude", and "Ollama"prompt
: The text prompt for the AI modelmodel_selection
: Select the specific model for chosen APItemperature
: Control response randomness (OpenAI and Claude)system_message
: Set system behavior (OpenAI and Claude)stream
: Enable/disable streaming responsesimage
(optional): Input image for vision-based taskstext
: The generated response from the chosen AI modelget_api_keys()
: Retrieves API keys from the config fileget_ollama_url()
: Gets the Ollama URL from the config filegenerate_content()
: Main function to generate content based on the chosen API and parametersgenerate_gemini_content()
: Handles content generation for Gemini APIgenerate_openai_content()
: Manages content generation for OpenAI APIgenerate_claude_content()
: Handles content generation for Claude APIgenerate_ollama_content()
: Manages content generation for Ollama APItensor_to_image()
: Converts a tensor to a PIL Image for vision-based tasksContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.