Custom Workflow
Lifetime license users can import their own ComfyUI workflows and pick them on nodes like official workflows. On import, DFCine makes a copy that the DFCine server signs over the internet. The signed copy works with this license only. Your original folder is not changed.
Prepare the workflow folder
A custom workflow is one folder:
my-workflow/
workflow.config.json required: name, category, prompt and parameter bindings
execution.comfyui.json required: the ComfyUI execution graph in API format
workflow.agent.json optional: only when an agent should operate the workflow via MCPGenerate it with an AI assistant (recommended)
The workflow pack includes a packaging skill at workflows/skills/dfcine-custom-workflow in the DFCine install folder. With an AI coding assistant such as Claude Code, Codex, or WorkBuddy, have it read the skill's SKILL.md, then give it your ComfyUI execution graph. It generates the configuration and checks the bindings.
The skill's scripts/dfwf.py uses only the Python standard library, so you can also run it yourself:
python dfwf.py inspect graph.json
python dfwf.py scaffold graph.json --out my-workflow --id custom.image.my-flux --name "My Flux" --label "My Flux T2I"
python dfwf.py validate my-workflowinspect lists the controls you can bind, scaffold writes a first draft, and validate checks the bindings. DFCine checks only the configuration structure on import, not whether the bindings are correct, so always run validate before importing and fix every ERROR.
Step 1: Export the graph in API format
Run the workflow successfully in ComfyUI, then export it with Export (API) (Save (API Format)). A file with nodes and links is the regular format and cannot be used. Remove PreviewImage and other preview nodes before exporting, or an output may pick up a preview instead of the final result.
Step 2: Write workflow.config.json
{
"schemaVersion": 1,
"id": "custom.image.my-flux",
"version": "1.0.0",
"name": "My Flux",
"nameLabel": { "zh-CN": "我的 Flux 文生图", "en-US": "My Flux T2I" },
"nodeKind": "image",
"category": "image",
"runnerType": "comfyui",
"primaryCategory": "my-workflows",
"primaryCategoryLabel": { "zh-CN": "我的工作流", "en-US": "My Workflows" },
"prompt": { "binding": { "target": "comfyui", "nodeId": "6", "path": "inputs.text" } },
"inputs": [],
"outputs": [{ "id": "image", "name": "Image", "dataType": "image", "required": true }],
"parameters": [
{
"id": "seed", "type": "seed",
"label": { "zh-CN": "种子", "en-US": "Seed" },
"defaultValue": 123456, "min": 0, "max": 2147483647, "step": 1, "randomizable": true,
"binding": { "target": "comfyui", "nodeId": "25", "path": "inputs.noise_seed" },
"ui": { "placement": "primary", "order": 1 }
}
],
"execution": { "file": "execution.comfyui.json" }
}The node IDs here only show the structure; use the real values from your graph. Key fields:
| Field | Notes |
|---|---|
id | Must start with custom. and use only letters, digits, ., -, and _, up to 200 characters. Importing again with the same id updates the workflow; also raise version. |
runnerType / schemaVersion | Always comfyui and 1. |
nodeKind | The node type it appears on: image, video, audio, text, model3d, or upload. |
primaryCategory / primaryCategoryLabel | The group in the workflow menu. Both are required. |
prompt.binding | The canvas prompt replaces this control's text entirely. Bind it to the text encoder connected to the sampler's positive input. |
execution.file | The graph file name, with exactly matching case. |
Leave out execution.timeoutMs in most cases. Without it there is no time limit; loading models for the first time often takes several minutes, and a short timeout makes the task fail.
Binding rules
Bindings write prompts, parameters, and media from DFCine into a control in the graph. This is where most mistakes happen.
- Write
nodeIdas a string ("6").pathis usuallyinputs.<control name>. - Bind only scalar controls. A value like
["12", 0]is a link; find the actual control on the upstream node. - Spell
pathexactly. With a misspelled control name, DFCine adds a new key that does nothing: no error, but the parameter has no effect. - Always set
defaultValueto the value in the graph. It must be withinmin–maxand aligned tostep. - Bind each control to one parameter only.
Canvas media (inputs)
Put image, video, and audio media in inputs[], not in string parameters. Choose binding.valueType by the loader node:
| Loader node | path | valueType |
|---|---|---|
LoadImage | inputs.image | comfyui-image-upload |
LoadAudio | inputs.audio | comfyui-image-upload |
LoadVideo (ComfyUI core) | inputs.file | comfyui-image-upload |
VHS_LoadVideo | inputs.video | comfyui-image-upload |
VHS_LoadVideoPath and other path-based loaders | the path control | raw |
Rule of thumb: a control that is a file dropdown in ComfyUI uses comfyui-image-upload; a typed path text box uses raw. Name inputs input1, input2, and so on, and set "required": true for required media.
Outputs
After a run, DFCine collects the files from all ComfyUI nodes. Each output takes the first result of its type:
- Declare
dataTypeasimage,video, oraudio. For 3D, only.glbfiles written bySaveGLBare used. - Remove preview nodes so outputs do not pick up previews.
- With
batch_sizeabove 1, only the first image reaches the output.
Parameter display rules
type | Control | Required fields |
|---|---|---|
seed | Integer box with a random button | defaultValue, min: 0, max (often 2147483647), step: 1 |
integer / float | Number box | defaultValue, min, max, step |
enum | Dropdown | options[] (each with label and value), defaultValue |
boolean | Switch | defaultValue as a JSON boolean true / false |
string | Single-line text box | defaultValue; do not use it in place of the main prompt |
- Parameters with
ui.placement: "primary"appear in the main area, up to 4 including the seed. Others go in the advanced area. - Expose only a few common parameters that cannot break the result, such as seed, width and height, or frame count. Do not expose model file names, file paths, or memory options.
enumoption values must match the ComfyUI dropdown text exactly.- Keep
labelshort. - The seed is not randomized on each run; click the random button to change it.
Import into DFCine
Open Settings → Basic Settings → Workflows and license, click Import in the Custom Workflows row, and select the whole source folder. With a term license, the row reads "Lifetime license feature" and the button is disabled.

Imported workflows are listed under the row with their version, signing time, and status. Create a node of the matching type, pick the workflow, and run it once at a small size and low step count.
To update, change the source folder and import it again with the same
id. Deleting removes only the copy inside DFCine; your source folder is not touched. Keep the source folder for later edits and backups.
Do not copy the folder into the DFCine workflow directory by hand. Unsigned custom workflows are not loaded.
Let an agent operate it
For an agent to write prompts, change parameters, run, and read results through MCP, the source folder needs a workflow.agent.json with the matching permissions; otherwise those MCP calls are refused. dfwf.py scaffold ... --agent generates it. The file is signed with the folder, so changing it later needs another import.
Common errors
| Message | Cause |
|---|---|
| Custom workflows are a feature of the lifetime license | The current license is not a lifetime license. |
| The workflow id … must start with "custom." | The id format is wrong. |
| An official workflow already uses this id | Choose another id. |
| The folder is too large (at most 50 MB and 200 files) | Do not include models, caches, or backups. |
| Import limit reached | At most 10 imports per license per day and 20 per network per hour. |
| The signing service cannot be reached | Importing needs an internet connection. |
graph_node when running | A binding's nodeId does not exist in the graph. |
required_input when running | A required media input has nothing connected. |
material_type when running | The connected media type does not match dataType. |
ComfyUI Invalid image file | The media valueType is wrong (upload and path loaders mixed up). |
To change only the default parameters of an official workflow, you do not need a custom workflow. See Set as my default in Workflow Update.
