Flows

On this page

Three modes

Switch at the top of the Images and Video tabs:

ModeFor
Basictype and get a picture or a video
Advanceddecide how a few large blocks connect
Expertone block per low-level operation, build anything

Images and Video each have their own flows.

Start from an example

Advanced flow

The list at the top left has built-in examples:

ExampleWhat it does
Text to imagedraws what you describe
Image to imageredraws starting from your picture
Inpaintredraws only the white part of a mask
Upscale and refinedraws small, enlarges, then refines
Text to videomakes a short video from a description

"Image to image" needs a picture in the "Load picture" block. "Inpaint" needs two: the picture, and a black picture of the same size with the area to redraw painted white.

Press "Run flow". The result appears below and goes into the gallery.

Advanced blocks

Click on the left to add a block, then drag from a dot on its right to the left of the next block. Click a block to change its settings on the right; press Delete to remove it.

BlockPurpose
Modelwhich model to use
Promptwhat to make and what to avoid
Empty canvasthe size, and the number of frames for video
Load picturebrings a picture in
Encode pictureturns a picture into the form a model can change
Samplethe generation itself: steps, CFG, sampler, seed, strength
Decodeturns the result back into a picture
Resize picturemakes it larger or smaller
Save picture, Save videothe end of the flow

Fields left empty in "Sample" use the model's recommended values. "Strength" matters when editing a picture: lower stays closer to the original.

Expert

Expert mode needs an Enterprise license. On Free and Team you can import and open expert flows; blocks beyond your license are marked ⚠ and the flow is read-only, and running it (including from chat, the API or the command line) reports an insufficient license. It runs as soon as you switch to Enterprise. You can still edit the script in Advanced mode, but only with functions the Advanced blocks use; other engine functions, your own functions, if, map and fold need Enterprise.

Expert flow

"Open in Expert" in Advanced mode splits the current flow into low-level blocks for you to change. Search all functions on the left; fill in a block's parameters on the right, or tick "wire" to connect them from another block. There are three helper blocks:

  • Variable: text, a number, a model file or a picture. A variable named prompt is filled in by the chat model.
  • Expression: a short formula; $a $b $c $d stand for the wired values.
  • Return result: what the flow hands back.

The flow script

"Flow script" below the blocks is what actually runs (DGL), and you can edit it. After editing, the script is what counts and the blocks are locked. Two buttons undo this:

  • Back to the blocks' script: drop your edits.
  • Reset to the built-in example: blocks and script go back to the example.

A script can only read the model folders and the pictures you added to flows.

Saving and sharing

Give it a name and press "Save". "Save a copy" makes a variation. "Export" writes a file and "Import" reads it back; the script is rebuilt from the blocks when importing.

A flow records where a model sits inside the model library, so it works on another computer that has the same models.

Letting chat use your flow

"Chat uses" at the top of the tab decides what a chat runs when it makes a picture or a video: "Basic" by default, or one of your saved flows. Images and Video are set separately.

The flow needs a "Prompt" block with "Filled in by the chat model" ticked. Deleting the flow in use brings back "Basic". If the flow uses a model this computer does not have (for example only another node in the cluster has it), chat uses "Basic" instead.

A model chosen in the chat's tool list takes precedence.

Who can change flows

Without accounts everything is allowed. Once there are accounts:

WhoWhat the Advanced and Expert modes show
Administrator, flow managerThe full editor; "Save" publishes right away
Flow designerThe full editor; "Save" keeps a draft
Other usersOnly the list of published flows; they can change the description, what to avoid and the seed, then run

Review:

  1. The designer saves a draft and can run it to test.
  2. They press "Submit for review".
  3. A flow manager opens it under "Drafts" in the list, then presses "Approve", or gives a reason and presses "Return".
  4. Only an approved draft replaces the published version. Until then everyone keeps using the old one.

On the review screen, the flow script is what will actually run; judge by it.

If this page differs from the Traditional Chinese version, the Traditional Chinese version prevails.