* updated Readme instructions (#1) * Update README.md * Fix no input connected error * added string concatenate node * added example * Merge branch 'main' into dev * Concatenate Nodes is now Merge Nodes * Merge branch 'main' into dev * updated the description
ComfyUI Griptape Nodes
This repo creates a series of nodes that enable you to utilize the Griptape Python Framework with ComfyUI, integrating AI into your workflow. This repo creates a series of nodes that enable you to utilize the Griptape Python Framework with ComfyUI, integrating AI into your workflow.
It has a subset of Griptape nodes, including nodes for:
- Creating Agents
- OpenAI
- Amazon Bedrock
- Google Gemini
- Anthropic Claude
- Image Generation
- OpenAI
- Amazon Bedrock Stable Diffusion
- Amazon Bedrock Titan
- Leonardo.AI
- Image Querying
- Image Variation (in beta)
- Tools
Example
In this example, we're using three Image Description nodes to describe the given images. Those descriptions are then Merged into a single string which is used as inspiration for creating a new image using the Create Image from Text node, driven by an OpenAI Driver.
Installation
1. ComfyUI
Install ComfyUI using the instructions for your particular operating system.
2. Install Griptape-ComfyUI
There are two methods for installing the Griptape-ComfyUI repository. You can either download or git clone this repository inside the ComfyUI/custom_nodes, or use the ComfyUI Manager.
-
Option A - ComfyUI Manager (Recommended)
- Install ComfyUI Manager by following the installation instructions.
- Click Manager in ComfyUI to bring up the ComfyUI Manager
- Click Install via Git URL
- Enter the URL for ComfyUI-Griptape: https://github.com/griptape-ai/ComfyUI-Griptape
- Click OK
- Follow the rest of the instructions.
-
Option B - Git Clone
-
Open a terminal and input the following commands:
cd /path/to/comfyUI cd custom_nodes git clone https://github.com/griptape-ai/ComfyUI-Griptape
-
3. Make sure libraries are loaded
There are required libraries for the ComfyUI-Griptape nodes. They're called out in the requirements.txt file:
griptape[all]
python-dotenv
These should get installed automatically if you used the ComfyUI Manager installation method. However, if you're running into issues, please install them yourself either using pip or poetry, depending on your installation method.
-
Option A - pip
pip install "griptape[all]" python-dotenv -
Option B - poetry
poetry add "griptape[all]" python-dotenv
4. Add API keys to your Environment
Certain API keys are required for various nodes to work. It's recommended to add these to a .env file in your base comfyUI folder before you start ComfyUI.
Note: Most nodes will work fine with just the OPENAI_API_KEY, so at least make sure you have that one.
These should get installed automatically if you used the ComfyUI Manager installation method. However, if you're running into issues, please install them yourself either using pip or poetry, depending on your installation method.
-
Option A - pip
pip install "griptape[all]" python-dotenv -
Option B - poetry
poetry add "griptape[all]" python-dotenv
4. Add API keys to your Environment
Certain API keys are required for various nodes to work. It's recommended to add these to a .env file in your base comfyUI folder before you start ComfyUI.
Note: Most nodes will work fine with just the OPENAI_API_KEY, so at least make sure you have that one.
OPENAI_API_KEY=
GOOGLE_API_KEY=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
LEONARDO_API_KEY=
You can get the appropriate API keys from these respective sites:
- OPENAI_API_KEY: https://platform.openai.com/api-keys
- GOOGLE_API_KEY: https://makersuite.google.com/app/apikey
- AWS_ACCESS_KEY_ID & SECURITY_ACCESS_KEY:
- Open the AWS Console
- Click on your username near the top right and select Security Credentials
- Click on Users in the sidebar
- Click on your username
- Click on the Security Credentials tab
- Click Create Access Key
- Click Show User Security Credentials
- LEONARDO_API_KEY: https://docs.leonardo.ai/docs/create-your-api-key
Troubleshooting
API Keys
When you run ComfyUI with the Griptape nodes installed, the installation method will check your environment variables and automatically install the appropriate API keys in a file called: griptape.config.json.
If for some reason your environment variables aren't being set properly, you can do this manually by simply copying over the griptape.config.json.default file to griptape.config.json and add the proper keys there.
If you ever need to change your API keys, go ahead and update that configuration file with the proper key. You can get the appropriate API keys from these respective sites:
- OPENAI_API_KEY: https://platform.openai.com/api-keys
- GOOGLE_API_KEY: https://makersuite.google.com/app/apikey
- AWS_ACCESS_KEY_ID & SECURITY_ACCESS_KEY:
- Open the AWS Console
- Click on your username near the top right and select Security Credentials
- Click on Users in the sidebar
- Click on your username
- Click on the Security Credentials tab
- Click Create Access Key
- Click Show User Security Credentials
- LEONARDO_API_KEY: https://docs.leonardo.ai/docs/create-your-api-key
Troubleshooting
API Keys
When you run ComfyUI with the Griptape nodes installed, the installation method will check your environment variables and automatically install the appropriate API keys in a file called: griptape.config.json.
If for some reason your environment variables aren't being set properly, you can do this manually by simply copying over the griptape.config.json.default file to griptape.config.json and add the proper keys there.
If you ever need to change your API keys, go ahead and update that configuration file with the proper key.
Webscraper
The WebScraper tool uses Markdownify .
The playwright browser should get installed automatically when you install the Griptape Nodes, but if it doesn't you may need to install this manually to get it to work.
In your terminal, execute the following code:
playwright install
Webscraper
The WebScraper tool uses Markdownify .
The playwright browser should get installed automatically when you install the Griptape Nodes, but if it doesn't you may need to install this manually to get it to work.
In your terminal, execute the following code:
playwright install
