Skip to content

Fal.ai Image Generator

Fal.ai Image Generator works with the image models offered by Fal.ai. It can create an image from a written description or start from an image you already have to edit it or upscale it to a higher resolution. You choose the model that best fits what you need and the component returns the images as files so the flow can send, save or publish them.

Use it when you want to try different image models from a single component, or when you need to retouch or upscale images within a flow.

When to use it

  • Create images for campaigns or social media from a description.
  • Edit a product photo, for example to change the background or retouch it.
  • Upscale images before publishing or printing them.
  • Process one image for each item of a list, with Batch Mode.

Configuration

FieldWhat it does
Credential (required)The credential of the Fal.ai API service. Pick one with Choose an option or create one with Add new credential. More in Credentials.
Generation ModeHow it works: text_to_image (create an image from the description) or image_to_image (start from an image you connect to Image Files). Default: text_to_image.
Image to Image modeAppears with image_to_image. What you want to do with the image: edit, upscale (increase its resolution) or others (other transformations). Default: edit. It changes the models offered in Image Model.
Image ModelThe Fal.ai model used. The list depends on Generation Mode and Image to Image mode: choose the mode first.
Image size / Aspect RatioImage format: 1:1, 16:9, 9:16, 4:3 or 3:4.
Number of ImagesHow many images to create on each run. Default: 1. Depending on the model, it may create fewer than you ask for.
PromptThe description of the image you want or, when editing, of the changes you want to make.
Image FilesConnection point for the starting images of the image_to_image mode, as image files.
Negative PromptWhat you don’t want to appear in the image, for example “text, watermarks”. Not every model takes it into account.

Batch processing

With the Batch Mode switch on, the component runs once for each item of the list you connect to Batch Input and returns all the results together as a list. Parallel Executions sets how many items are processed at the same time (1 to 5). Skip if Empty Batch Input skips the component when the list arrives empty, and Skip Branch if Empty Output stops the following components when the result is empty. More in Key concepts.

Using it as an agent tool

You can connect this component to an agent’s Tools input. In the Tool tab, Tool Name and Tool Description are the name and explanation the agent uses to recognise the tool and decide when to call it: write a clear description of what it does.

Output

  • Image: the images created, as files. Connect them to components that receive files, for example the attachments of Gmail Message or Email, the file upload of Drive File Manager, or Describe Image.
  • Tool: the component as a tool, to connect it to an agent’s Tools input. When the agent uses it, the images are saved with the conversation’s files and the agent receives their names and the links to view them.

Example

The estate agency Casas del Turia wants to publish the photos of its flats at a higher resolution:

  1. Add Fal.ai Image Generator and choose the Fal.ai API credential.
  2. Choose image_to_image in Generation Mode and upscale in Image to Image mode.
  3. Choose a model in Image Model.
  4. Connect to Image Files the photo that comes from the previous component.
  5. Connect Image to the file upload of Drive File Manager to save it in the listing’s folder.

With Batch Mode on and the list of photos connected to Batch Input, the component processes all the photos of the flat in a single run.

Good practices

  • Describe the object, the setting, the light and the style in concrete sentences; when editing, say what should change and what should stay the same.
  • Try several models with the same description before settling on one: each model has its own style.
  • Try a single image before turning on Batch Mode with a long list: each image uses your Fal.ai account.