Skip to content

Lesson 2: Prompt an Image

Welcome to the second tutorial in our Griptape Nodes series! This guide focuses on getting familiar with the GenerateImage node.

While the workflow itself is exceedingly simple (consisting of just this single node), the GenerateImage node will be your primary workhorse for image generation in your early projects. This powerful node truly is the cornerstone for creating a wide variety of visual content.

What we'll cover

In this tutorial, you will:

  • Learn how to open saved workflows
  • Learn about the GenerateImage node
  • Generate images using text prompts

To begin this tutorial, you'll need to return to the main landing page. Click on the navigation element at the top left of the editor to go back to where all the template workflows and your own saved files are displayed.

Nav Bar

Open the Image Prompt Example

On the landing page, locate and click on the "Prompt an Image" tile to open this example workflow.

Prompt an Image example

Understand the GenerateImage Node

When the example loads, you'll notice it consists of just a single node. Don't be fooled by its simplicity – this node is one of the most powerful tools in Griptape Nodes and will likely feature prominently in your future flows.

GenerateImage node

This node has been configured to handle many tasks that would typically require a more complex flow, making it perfect for getting started with AI image generation.

Generate Images Using Text Prompts

The primary point of interaction for this node is the text prompt field where you describe what image you want the AI to create.

To generate your first image:

  1. Locate the text prompt field in the node
  2. Type a description for the image you want to create

Text prompt field

Now, run your node. There are three UI buttons but those perform only two distinct operations:

Ways to run

  1. Run the whole workflow:

    1. Click the Run Workflow button at the top of the editor. This executes the entire workflow from start to finish. All nodes will be processed in sequence according to their connections.
  2. Run a single node in the workflow (two methods that do the same thing):

    1. Click the Run Node button in the top right corner of a specific node.
    2. Or, select a node and click Run Selected from the toolbar.

Running a single node can be very useful for testing or debugging specific parts of your workflow, or simply getting things to run faster if you don't care about updating other parts of the workflow just yet.

The difference is in scope - the first option runs everything, while the second options run just the selected node and everything that precedes it that it may need.

Generation times

For those new to image generation: generation operations can take time. Please notice the yellow outlines and spinning Running icon on nodes, where the run node icon was before execution began. These visual hints tell you which nodes are currently resolving, letting you know that things are functioning as expected.

Node running

Experiment with Different Descriptions

Let's try generating some images with different prompts:

  1. First Example: The workflow loads with "A potato making an oil painting" in the prompt field. Run the flow

    Potato painting result

  2. Second Example: Change the prompt to "A potato doing aerobics in 70s workout attire" and run the flow again

    Potato aerobics result

Notice how dramatically different the results are just by changing a few words in your prompt. This demonstrates the flexibility and power of the GenerateImage node. Anything you can describe, you can generate.

Summary

In this tutorial, we covered:

  • How to open saved workflows
  • The GenerateImage node
  • How to generate images using text prompts

The GenerateImage node is a fundamental building block for creative flows in Griptape Nodes. As you progress, you'll discover how to combine it with other nodes to develop even more powerful applications.

Next Up

In the next section: Lesson 3: Coordinating Agents, we'll learn how to get AIs to team up and form a bucket-brigade through a workflow.