Skip to main content

How to Use Layer's Workflows Feature

The article for new users beginning their workflows journey

Updated over a week ago

Welcome to Workflows, Layer’s feature that allows you to create many assets and perform multiple AI steps in a single flow. This short document is intended to brief you on the basic nodes in our Workflows MVP, and give you an idea of how they may be used for your own use cases.

What is a Workflow?

A workflow is a chain of nodes that transform data in a specific order. You can think of it like a cooking recipe: You start by gathering raw ingredients, prepare them, then assemble them into the final product. To use this analogy, the reference images and prompts used as your workflow inputs are the "raw" ingredients, while the generator nodes in a workflow is how you "prepare" those ingredients into images, videos, and other assets. You then "cook" those assets using Prompt Edit, the Composition Node, and other nodes until you have the final result you're looking for.

Some recipes are very simple: To turn a prompt into an image, all you need to do is take a prompt node and then add it to a 2D generator. Others are more complex: You may want to create multiple images, place them into a scene at a specific resolution, then make the characters move in a video. Workflows allows you to set up these recipes beforehand and then run them on demand.

Lastly, workflows are scalable. This means they can take in multiple inputs and deliver multiple outputs, what we call a "many to many" relationship in software engineering. Your workflow can take in many different prompts and perform many different actions in parallel. This allows you to perform actions like modify the pose of 50 characters in a single workflow, or generate 15 different versions of a video for your game.

Using Workflows for the First Time

To access workflows, simply click on the Workflows link on the left of your workspace or click on the Workflows tile on the home page.

This will take you to the main Workflows page, where you can start creating your own workflows or start using a Layer-created example. We highly recommend you begin by looking at the Layer-created examples to familiarize yourself with design patterns and try out a few workflows for yourself. You may view them by clicking on Featured Workflows:

To run or edit an example workflow, you’ll want to first import it into your workspace. This will allow you to create a local version of it to edit and update however you’d like. Click on the purple “Import to Workspace” button after clicking on the Workflow you’d like to work with. Or, click on View Workflow to see its node setup.

Once you import the workflow, the button will change to Run Workflow. Once you click that, you’ll be prompted to prepare the workflow by updating or editing any prompts or reference images (if any), and then you may run your workflow. First, click Prepare Workflow:

Then, after editing any prompts or reference images, your workflow will run. Please note that workflows may take minutes and, in the case of exceptionally complex or large workflows, up to an hour to complete. While we run all of our requests in parallel, our partner services may take time to finish rendering and delivering the assets in all the ways your workflow calls for.

Once the workflow is complete, the assets are shown to you:

With the initial release of Workflows, the assets are grouped by the time they are completed. We will be introducing better grouping of the outputs in future updates to the Workflows feature.

Running vs. Editing or Creating a Workflow

Not everyone will want to use the Workflow Editor to create their own workflows, nor does the workflow editor need to be open to run a workflow. We highly recommend that most users of Workflows use the Run Workflow button and UI after the workflow is in a good state:

This flow simplifies the workflow run so you only have to select the specific inputs you want to change in the workflow, and avoids seeing the workflow graph altogether:

When you run workflows, you have access to all of the normal functions Layer provides, like renaming your workflows session, accessing your past Workflow sessions by clicking on the last nav, and having the workflow form remember any changes you made in it during the session.

Copying, Editing, and Publishing an Existing Workflow

To create a copy of an existing workflow, click the three-dot Settings icon on the top-right and choose to duplicate the workflow.

Once you view the workflow you’re duplicated (or clicked View Workflow) on the Workflow Details page, you’ll see one of two things:

  • The current published version of the workflow.

  • Your current draft of any changes you’re making to the workflow.

To start a draft and begin editing the workflow, you’ll need to start a new draft. This ensures that any changes you’re making are local to your own draft and don’t affect the published version, which other people may be using. See below:

Once you’re in your workflow draft, you’ll be able to edit, delete, add, change, and generally adjust the workflow however you’d like. Once you’re ready to test your workflow, you can test in two different ways: Either by running a specific node, or by running the entire workflow.

  • Clicking Run Node will execute that node and any nodes that do not have data before it. This means that if you click Run Node on a node far down a workflow graph, it will execute the previous nodes if they have no existing data in them.

    • If the previous node has existing data in it (typically from a previous run or test), then only the node you select will run and will not trigger the previous nodes.

  • Clicking Test Workflow will run the entire workflow from the start to the end, and generate assets across the entire flow. This also allows you to view the total actions being taken by your workflow and the estimated unit cost of a full run of your workflow.

The image below shows the Test Workflow button that you may use in the graph:

Below shows the Run Node option for an individual node:

And lastly, below shows the estimated unit cost for a workflow, as well as how many actions will be taken for a full workflow run. This may be affected by the number of prompts, reference images, image generation numbers, and assets you’re creating in your workflow.

When you’ve finished your draft, you may publish it back to your workspace or create a new workflow instead. Please note that publishing a workflow and overriding the existing one will update it for any users using the workflow, so we recommend that you create a new workflow if others are using your workflow.

Learn More About Workflows

Make sure to check out our additional articles about the specific workflow nodes, how to configure your Workflow Inputs, and how to use the powerful Composition Node to get advanced control over your outputs.

Did this answer your question?