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, Ollama, and various image processing tools into ComfyUI, allowing users to leverage these powerful models and features directly within their ComfyUI workflows.
The Gemini API node allows you to interact with Google's Gemini models:
Integrate local language models running via Ollama:
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 requests vtracer
config.json
file in the extension directory with the following content:
{
"GEMINI_API_KEY": "your_api_key_here"
}
http://localhost:11434
).config.json
:
{
"GEMINI_API_KEY": "your_api_key_here",
"OLLAMA_URL": "http://localhost:11434"
}
After installation and configuration, a new node called "Gemini Ollama API" will be available in ComfyUI.
api_choice
: Choose between "Gemini" and "Ollama"prompt
: The text prompt for the AI modelgemini_model
: Select the Gemini model (for Gemini API)ollama_model
: Specify the Ollama model (for Ollama API)stream
: Enable/disable streaming responsesimage
(optional): Input image for vision-based taskstext
: The generated response from the chosen AI modelget_gemini_api_key()
: Retrieves the Gemini API key from the config file.get_ollama_url()
: Gets the Ollama URL from the config file.generate_content()
: Main function to generate content based on the chosen API and parameters.generate_gemini_content()
: Handles content generation for Gemini API.generate_ollama_content()
: Manages content generation for Ollama API.tensor_to_image()
: Converts a tensor to a PIL Image for vision-based tasks.Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.