Setup for Nodes that use Hugging Face
Account and Token Creation
This guide will walk you through setting up a Hugging Face account, creating an access token, and installing the required models for use with Griptape Nodes.
Info
If you already have an account skip ahead to Step 2
1. Create a new account on Hugging Face
- Go to https://huggingface.co/
- Click Sign Up in the top-right corner
- Complete the verification step to prove you're not a robot
2. Create an Access Token
-
Access Your Account Settings
-
Log in to your Hugging Face account
-
Click on your profile icon in the top right corner
-
Select Settings from the dropdown menu (or go directly to Settings)
Email Verification Required
If you encounter issues during token creation, ensure you've verified your email address. Complete the verification process before continuing.
- Navigate to Access Tokens in the settings menu
-
Click Create new token in the top right area
-
Select Read as the token type for the access you'll need
- Give your token a descriptive name (GriptapeNodes, for example)
- Click Create Token. That will bring up a window with you new token in it. Read and understand the messages there; this really is the only time you'll be able to see or copy this key.
- Copy and securely store your token
- Click Done to close the token window.
Security Notice
It is recommended to save this token in a password locker or secure notes app, so you can find it, but also keep it secure.
Your access token is a personal identifier for requests made to Hugging Face services. Never share it with anyone, and take precautions to avoid displaying it in screenshots, videos, or during screen-sharing sessions.
Treat it like you would a credit card number.
Install Required Files
Now that you have a token associated with your account, you can install the Hugging Face CLI (Command Line Interface) to interact with Hugging Face from the command line.
1. Install the Hugging Face CLI
Open a terminal and run:
pip install -U "huggingface_hub[cli]"
For more information, visit the official CLI documentation.
2. Login with Your Token
In your terminal, authenticate with the access token you made earlier:
huggingface-cli login
You'll be prompted to enter your token.
3. Install Models as Required
Each Hugging Face node is designed to work with specific models. While some nodes work with only one model, others are compatible with multiple options. The table below outlines which models can be used with each node:
Node | Compatible Model(s) |
---|---|
TilingSpandrelPipeline | 4x-ClearRealityV1.pth |
FluxPipeline | FLUX.1-dev, FLUX.1-schnell |
TilingFluxImg2ImgPipeline | FLUX.1-dev, FLUX.1-schnell |
Model Installation Considerations
You have two options for model installation. Your choice depends on your specific workflow requirements, available disk space, and internet connection speed.
-
Selective Installation: Install only the specific models needed for the nodes you plan to use.
- Advantages: Reduced download time and disk space usage.
- Disadvantages: Limited functionality until additional models are installed.
-
Complete Installation: Download all available models.
- Advantages: Full access to all node capabilities without additional downloads.
- Disadvantages: Longer initial download time and greater disk space requirements.
Download Time
These model downloads are quite large an may collectively take anywhere from 30 minutes to several hours to complete, depending on your internet connection speed. You can continue to the last step while downloads are ongoing.
Download Location
Models will be downloaded into your Hugging Face Hub Cache Directory. To see where this is, you can use the huggingface-cli, and look for HF_HUB_CACHE.
Running this command in the terminal will produce a list with several entries
huggingface-cli env
Look for an entry that starts with - HF_HUB_CACHE:
- HF_HUB_CACHE: /Users/jason/.cache/huggingface/hub
For TilingSpandrelPipeline
huggingface-cli download skbhadra/ClearRealityV1 4x-ClearRealityV1.pth
For FluxPipeline and TilingFluxImg2ImgPipeline
huggingface-cli download black-forest-labs/FLUX.1-schnell
For FLUX.1-dev
huggingface-cli download black-forest-labs/FLUX.1-dev
Download errors
It is possible to encounter errors during download that start like this:
Cannot access gated repo for url https://huggingface.co...
The end of those errors will contain a link, though, with instructions to request access.
Follow those instructions:
Visit https://huggingface.co/black-forest-labs/FLUX.1-schnell to ask for access. When that is successful you should see a message about being granted access, and you can try to download again.
Add Your Token to Griptape Nodes settings
Overview
Now that you've set up your Hugging Face account and installed the required models, you need to configure Griptape Nodes to use your token. This process is straightforward.
1. Open the Griptape Nodes Settings Menu
- Launch Griptape Nodes
- Look for the Settings menu located in the top menu bar (just to the right of File and Edit)
- Click on Settings to open the configuration options
2. Add your Hugging Face Token in API Keys & Secrets
- In the Configuration Editor, locate API Keys and Secrets in the bottom left
- Click to expand this section
- Scroll down to the HUGGINGFACE_HUB_ACCESS_TOKEN field
- Paste your previously created token into this field
- Close the Configuration Editor to automatically save your settings
Setup Complete
After completing these steps, the Hugging Face Nodes should be ready to use in Griptape Nodes!