Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions essentials/comms_routes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The prompt queue is defined in `execution.py`, which also defines the `PromptExe
|`/`|get|load the comfy webpage|
|`/embeddings`|get|retrieve a list of the names of embeddings available|
|`/extensions`|get|retrieve a list of the extensions registering a `WEB_DIRECTORY`|
|`/workflow_templates`|get|retrieve a map of custom node modules and associated template workflows|
|`/upload/image`|post|upload an image|
|`/upload/mask`|post|upload a mask|
|`/view`|get|view an image. Lots of options, see `@routes.get("/view")` in `server.py`|
Expand Down
22 changes: 22 additions & 0 deletions essentials/custom_node_workflow_templates.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: "Workflow templates"
---

If you have example workflow files associated with your custom nodes
then ComfyUI can show these to the user in the template browser (`Workflow`/`Browse Templates` menu).
Workflow templates are a great way to support people getting started with your nodes.

All you have to do as a node developer is to create an `example_workflows` folder and place the `json` files there.
Optionally you can place `jpg` files with the same name to be shown as the template thumbnail.

Under the hood ComfyUI statically serves these files along with an endpoint (`/api/workflow_templates`)
that returns the collection of workflow templates.

## Example

Under `ComfyUI-MyCustomNodeModule/example_workflows/` directory:
- `My_example_workflow_1.json`
- `My_example_workflow_1.jpg`
- `My_example_workflow_2.json`

In this example ComfyUI's template browser shows a category called `ComfyUI-MyCustomNodeModule` with two items, one of which has a thumbnail.
3 changes: 2 additions & 1 deletion mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@
"essentials/comms_messages",
"essentials/comms_routes"
]
}
},
"essentials/custom_node_workflow_templates"
]
},
"essentials/models",
Expand Down