> ## Documentation Index
> Fetch the complete documentation index at: https://comfyart.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom workflows

> Run your own ComfyUI workflows for ComfyArt's features.

Every canvas action runs a ComfyUI workflow. Most features can run your own workflow instead of the built-in one, for example a different image model or edit model.

ComfyArt finds the nodes to fill by their **title**: you title the nodes that receive the image, prompt or size, export the workflow in API format and upload it. You can do this yourself or let an agent do it.

## Let an agent do it

Ask the [ComfyArt agent](/guides/agent), or any agent connected over [MCP](/guides/mcp), something like "connect this workflow to quick edit" and give it the API-format file. It reads the rules with the `custom_workflow` tool, titles the nodes, checks the workflow and installs it. The rules are also a built-in skill, **Connect a custom workflow**.

For an agent that is not connected to ComfyArt, open **Custom workflows** in the project menu and copy the rules with the button next to the agent hint.

## Do it by hand

### 1. Title the nodes

In ComfyUI right-click a node → **Title** and add a marker:

| Marker | Node | ComfyArt fills |
| - | - | - |
| `@image` | Load Image | the selected image |
| `@image2` | Load Image | a second image (style reference) |
| `@mask` | Load Image (as Mask) or Load Image | the area to change, white = change |
| `@last` | Load Image | the last frame of a video |
| `@prompt` | a node with the text as a widget: CLIP Text Encode, TextEncodeQwenImageEdit, String (Multiline)... | the prompt |
| `@size` | a node with `width` and `height`, e.g. Empty Latent Image | width and height (and `batch_size` when there is no `@count`) |
| `@width`, `@height` | Int | width and height, when they are separate |
| `@count` | Int, or a node with `batch_size` / `amount` | how many results |
| `@seconds` | Int / Float, or a node with `seconds` / `duration` | video length in **seconds** |
| `@save` | Save Image, Save Video, Preview Image... | the result. Needed only when the workflow has several end nodes |

Titles are case-insensitive and other words are ignored, so `Positive @prompt` works. A node that receives several values takes several markers: `@prompt @size`. Each marker goes on one node only.

When the text of a CLIP Text Encode comes from another node, put `@prompt` on that node. When a video workflow counts frames instead of seconds, add an Int node titled `@seconds` and turn it into frames with a math node.

ComfyArt randomizes every `seed` and `noise_seed` on each run and finds models in subfolders, so these need no marker.

ComfyArt's own workflows in `custom_nodes/ComfyArt/workflows/` are titled the same way, so one of them is a good starting point. Other `@` names in them (`@sampler`, `@decode`...) are internal and ignored for custom workflows. The built-in expand workflow pads the image inside the graph, so it is not a template for expand.

### 2. Export in API format

In ComfyUI choose **Workflow → Export (API)**. A normally saved workflow (with a `nodes` list) is rejected.

### 3. Upload and assign

Open the project menu (top-left icon) → **Custom workflows**. Features are grouped into image generation, image editing, image tools and video. Click the upload button next to a feature: ComfyArt checks the markers, says what is missing, and uses the workflow for that feature once it passes. Each feature keeps its files in its own folder, `comfyart/workflows/<feature>/` in your ComfyUI user folder (`edit`, `upscale`, `video`...), and its menu lists only those. Pick **Built in** to switch back. ComfyArt never deletes your workflows; to remove one, delete its file in that folder; a feature whose file is gone goes back to built in.

## Markers per feature

| Feature | Required | Optional | Notes |
| - | - | - | - |
| Text to image | `@prompt`, `@size` (or `@width` + `@height`) | `@count` | Appears as an extra model in the generator. Reference and base images are not passed. |
| Quick edit / edit text | `@image`, `@prompt` | | Also used by compose and mockup blending. |
| Style transfer | `@image`, `@prompt` | `@image2` | Without a reference, `@image2` gets the same image. |
| Inpaint / edit region | `@image`, `@prompt` | | ComfyArt crops the region for your workflow and pastes the result back. The result node needs an `images` input. |
| Expand | `@image`, `@mask`, `@prompt` | | ComfyArt pads the image first; your workflow gets the padded image and the mask of the new area. |
| Upscale | `@image` | | ComfyArt resizes the result to the chosen factor. The result node needs an `images` input. |
| Remove background | `@image` | | |
| Eraser | `@image`, `@mask` | | Also fills the background behind edited elements and split layers. |
| Multi-angle | `@image`, `@prompt` | | The prompt is a camera description such as `<qma> front-right quarter view eye-level shot medium shot`. |
| Split layers | `@image` | `@prompt`, `@count` | `@count` is the number of layers. |
| Video generation | `@prompt`, `@size` | `@image`, `@last`, `@seconds` | Used by the first/last frame mode. Reference, motion control, lip sync and storyboard keep the built-in model. |
| Animate image | `@image`, `@prompt` | `@size`, `@seconds`, `@last` | With loop on, `@last` gets the source image again. |

If ComfyArt has an image to pass (a first frame, a last frame, a style reference) and the workflow has no marker for it, the run fails with a message instead of ignoring the image.

Storyboard, video extend, creative upscale, move object and video upscale always use the built-in workflows.

## Example: use another edit model

1. Open your edit workflow in ComfyUI.
2. Title the Load Image node `@image` and the node with the edit instruction `@prompt`.
3. Export in API format, upload it, and pick it for **Quick edit / edit text**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.