Skip to content

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

  1. Go to https://huggingface.co/
  2. Click Sign Up in the top-right corner
  3. Complete the verification step to prove you're not a robot

HF Site

Signup

2. Create an Access Token

  1. Access Your Account Settings

  2. Log in to your Hugging Face account

  3. Click on your profile icon in the top right corner

  4. Select Settings from the dropdown menu (or go directly to Settings)

    Settings

Email Verification Required

If you encounter issues during token creation, ensure you've verified your email address. Complete the verification process before continuing.

  1. Navigate to Access Tokens in the settings menu

Access Tokens

  1. Click Create new token in the top right area

  2. Select Read as the token type for the access you'll need

Token Read

  1. Give your token a descriptive name (GriptapeNodes, for example)
  2. 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.

Save Token

  1. Copy and securely store your token
  2. 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.

  1. 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.
  2. 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.

Gated model

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

  1. Launch Griptape Nodes
  2. Look for the Settings menu located in the top menu bar (just to the right of File and Edit)
  3. Click on Settings to open the configuration options

Settings Menu

2. Add your Hugging Face Token in API Keys & Secrets

  1. In the Configuration Editor, locate API Keys and Secrets in the bottom left
  2. Click to expand this section
  3. Scroll down to the HUGGINGFACE_HUB_ACCESS_TOKEN field
  4. Paste your previously created token into this field
  5. Close the Configuration Editor to automatically save your settings

Token Configuration

Setup Complete

After completing these steps, the Hugging Face Nodes should be ready to use in Griptape Nodes!