|
| 1 | +--- |
| 2 | +title: "Templates - ComfyUI Built-in Workflow Templates" |
| 3 | +description: "Templates provide model workflows natively supported by ComfyUI and example workflows from custom nodes. You can find and use workflows for currently supported models here." |
| 4 | +sidebarTitle: "Workflow Templates" |
| 5 | +icon: "clone" |
| 6 | +--- |
| 7 | + |
| 8 | +Workflow Templates is the browser for ComfyUI's natively supported model workflows and also some example workflows from custom nodes. |
| 9 | + |
| 10 | +In ComfyUI’s Workflow Templates, you can find: |
| 11 | + |
| 12 | +- Natively supported model workflows |
| 13 | +- Example workflows from custom nodes |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | +## How to open Templates in ComfyUI |
| 18 | + |
| 19 | +Open via the menu `Workflow` --> `Browse Workflow Templates`. |
| 20 | + |
| 21 | + |
| 22 | +## How to use templates |
| 23 | + |
| 24 | +1. Load a template: Click any template you want to load its workflow. |
| 25 | +2. Download models: When loading a template, ComfyUI automatically checks whether all required model files exist. If anything is missing, it will prompt you to download the models. |
| 26 | +3. Run the workflow: Once all requirements—such as models, input images, and prompts—are ready, click the Run button to start using the workflow. |
| 27 | + |
| 28 | +### Model storage location |
| 29 | + |
| 30 | +Each workflow template embeds links to the required models. On first use, if the corresponding model files are not detected, you will see a download prompt. |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | +1. For desktop version, when you click the `Download` button, the desktop program will automatically download the model files for you. |
| 35 | +2. For other versions, the browser will be used to download the corresponding model. You need to download the model and save it to the corresponding folder under `ComfyUI/models`. For example, the model in the screenshot should be saved in the following location: |
| 36 | + |
| 37 | +``` |
| 38 | +📂 ComfyUI/ |
| 39 | +├── 📂 models/ |
| 40 | +│ ├── 📂 diffusion_models/ |
| 41 | +│ │ └── qwen_image_fp8_e4m3fn.safetensors |
| 42 | +│ ├── 📂 vae/ |
| 43 | +│ │ └── qwen_image_vae.safetensors |
| 44 | +│ └── 📂 text_encoders/ |
| 45 | +│ └── qwen_2.5_vl_7b_fp8_scaled.safetensors |
| 46 | +``` |
| 47 | + |
| 48 | +In the current version, missing-file detection only checks whether there is a file with the same name in the corresponding top-level directory. For example, the file must exist directly under `ComfyUI/models/diffusion_models`. |
| 49 | +If you have already downloaded the model into a subfolder such as `ComfyUI/models/diffusion_models/wan_video`, you can ignore the popup and simply ensure the correct model is selected in the corresponding model loader node. |
| 50 | + |
| 51 | +If you're curious how model links are embedded, we add a `models` field under the node’s `properties`. Below is a complete snippet of a `DualCLIPLoader` node with embedded model information: |
| 52 | +```json |
| 53 | + { |
| 54 | + "id": 40, |
| 55 | + "type": "DualCLIPLoader", |
| 56 | + "pos": [ |
| 57 | + -320, |
| 58 | + 290 |
| 59 | + ], |
| 60 | + "size": [ |
| 61 | + 270, |
| 62 | + 130 |
| 63 | + ], |
| 64 | + "flags": {}, |
| 65 | + "order": 0, |
| 66 | + "mode": 0, |
| 67 | + "inputs": [], |
| 68 | + "outputs": [ |
| 69 | + { |
| 70 | + "name": "CLIP", |
| 71 | + "type": "CLIP", |
| 72 | + "links": [ |
| 73 | + 64 |
| 74 | + ] |
| 75 | + } |
| 76 | + ], |
| 77 | + "properties": { |
| 78 | + "Node name for S&R": "DualCLIPLoader", |
| 79 | + "cnr_id": "comfy-core", |
| 80 | + "ver": "0.3.40", |
| 81 | + "models": [ |
| 82 | + { |
| 83 | + "name": "clip_l.safetensors", |
| 84 | + "url": "https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/clip_l.safetensors", |
| 85 | + "directory": "text_encoders" |
| 86 | + }, |
| 87 | + { |
| 88 | + "name": "t5xxl_fp16.safetensors", |
| 89 | + "url": "https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp16.safetensors", |
| 90 | + "directory": "text_encoders" |
| 91 | + } |
| 92 | + ] |
| 93 | + }, |
| 94 | + "widgets_values": [ |
| 95 | + "clip_l.safetensors", |
| 96 | + "t5xxl_fp16.safetensors", |
| 97 | + "flux", |
| 98 | + "default" |
| 99 | + ] |
| 100 | + } |
| 101 | +``` |
| 102 | + |
| 103 | +The `models` field inside `properties` includes `name`, `url`, and `directory`. |
| 104 | + |
| 105 | +- `name`: the model file name |
| 106 | +- `url`: a direct download link to the file (not a repository page) |
| 107 | +- `directory`: which subfolder under `ComfyUI/models` to store the file, e.g. `vae` means `ComfyUI/models/vae` |
| 108 | + |
| 109 | +Currently, only links from Hugging Face and Civitai are supported. The model format must be a safe format such as `.safetensors` or `.sft`. Formats like `.gguf` are considered unsafe; when embedded they will be flagged as unsafe and the link will not be shown. |
| 110 | + |
| 111 | +You can use [this tool](https://comfyui-wiki.github.io/ComfyUI-Workflow-JSON-Editor/) to edit the model information in workflow templates. At the moment, [@ComfyUI-Wiki](https://github.com/ComfyUI-Wiki) only adds support for native nodes. |
| 112 | + |
| 113 | +## How to update templates? |
| 114 | + |
| 115 | +Templates are managed and updated as a separate dependency: [`comfyui-workflow-templates`](https://pypi.org/project/comfyui-workflow-templates/). |
| 116 | + |
| 117 | +If, after updating ComfyUI, you don’t see the documentation or newly announced templates, you may need to update the corresponding dependency. You can check versions in [`ComfyUI/requirements.txt`](https://github.com/comfyanonymous/ComfyUI/blob/master/requirements.txt). |
| 118 | + |
| 119 | +Typically, the following three dependencies may be upgraded together when ComfyUI is updated: |
| 120 | + |
| 121 | +``` |
| 122 | +comfyui-frontend-package==1.24.4 |
| 123 | +comfyui-workflow-templates==0.1.52 |
| 124 | +comfyui-embedded-docs==0.2.4 |
| 125 | +``` |
| 126 | + |
| 127 | +If you’re not sure how to update correctly, see [Update ComfyUI](/installation/update_comfyui) for how to update ComfyUI and its dependencies. |
| 128 | + |
| 129 | +## How to contribute templates to the ComfyUI repository? |
| 130 | + |
| 131 | +All templates are hosted in the [workflow_templates](https://github.com/Comfy-Org/workflow_templates/) repository. You can contribute templates by submitting a PR. For official templates, we require the following: |
| 132 | + |
| 133 | +1. Do not use any third-party nodes (to avoid extra installations for users who lack those nodes). |
| 134 | +2. The template must not duplicate existing ones and should target supported model capabilities. |
| 135 | +3. You may open an issue in the repository to ask questions. |
| 136 | + |
| 137 | +## Custom node templates |
| 138 | + |
| 139 | +If a custom node author provides templates and example workflows, you can also find them in the Templates browser. Usually, you can locate all templates by finding the category named after the node. |
| 140 | + |
| 141 | +If you are a custom node author, note that we currently only support a single directory level under the `templates` folder (no nested subdirectories), and only JSON-format templates are supported. |
| 142 | + |
| 143 | +## How to add templates for custom nodes? |
| 144 | + |
| 145 | +See [Custom Node Templates](/custom-nodes/workflow_templates) for how to add workflow templates for your custom nodes. |
0 commit comments