Skip to content
Open
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
47 changes: 45 additions & 2 deletions custom-nodes/workflow_templates.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,49 @@ Under `ComfyUI-MyCustomNodeModule/example_workflows/` directory:
- `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.

In this example ComfyUI's template browser shows a category called `ComfyUI-MyCustomNodeModule` with two items, one of which has a thumbnail.
For a real-world example, see [ComfyUI-Impact-Pack's example_workflows folder](https://github.com/ltdrdata/ComfyUI-Impact-Pack/tree/Main/example_workflows).

## Customization
More extensive configuration can be done by adding an `index.json` to the example workflow folder.
This index should follow the core workflows standard and optionaly contain:
* `description` the custom node description
* `templates` A list of The customized templates

Each template can contain the following keys:
* `name`: needs to match the template file name. Mandatory
* `title`: The template title. Optional, default to workflow name
* `description`: The title description. Optional, default to workflow name
* `mediaSubtype`: the workflow thumbnail file(s) extenstion (`jpg`, `png`, `webp`, ...), default to `jpg`. Optional.
* `thumbnailVariant`: custom thumbnail variant, either `compareSlider` or `hoverDissolve` for now. Requires a `mediaSubtype` to be set and the thumbnails files suffixed with `-1` and `-2`. Optional

### Example
This example `index.json`
```json
{
"description": "An awesome CustomNode module.",
"templates": [
{
"name": "My_example_workflow_1",
"title": "My First Workflow",
"description": "A workflow generating an awesome Image.",
},
{
"name": "My_example_workflow_2",
"title": "My Second Workflow",
"description": "A workflow upscaling an image with more details.",
"mediaSubtype": "webp",
"thumbnailVariant": "compareSlider"
}
]
}
```

Will work with the following structure under `ComfyUI-MyCustomNodeModule/example_workflows/` directory:
- `index.json`
- `My_example_workflow_1.json`
- `My_example_workflow_1.jpg`
- `My_example_workflow_2.json`
- `My_example_workflow_2-1.webp`
- `My_example_workflow_2-2.webp`