
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
comfyui-workflow-templates
Advanced tools
This repo hosts the official ComfyUI workflow templates. The repository now ships a package-per-media structure:
packages/core β manifest + loader helpers shipped as comfyui-workflow-templates-corepackages/media_* β the actual template JSON + preview assets for each media typepackages/meta and the root pyproject.toml β the comfyui-workflow-templates meta package that depends on all othersMost contributors only touch the templates/ folder and bundles.json, but the build
pipeline now requires the helper scripts described below. See the sections on "Adding
new templates" and "Publishing" for the exact steps.
index.jsonI will demonstrate how to add a new template by walking through the process of adding the Wan text to video template.
Set up ComfyUI_frontend dev environment. In the ComfyUI_frontend/.env file, add the line DISABLE_TEMPLATES_PROXY=true then start the dev server with npm run dev.
Copy the templates folder from this repository to the ComfyUI_frontend/public folder.
Either
Save => ExportI will get my workflow from the ComfyUI_examples Wan 2.1 page. To get the workflow from the video on that page, I'll drag the video into comfyui-embedded-workflow-editor. Then I'll copy and paste it into a new json file on my computer.
[!IMPORTANT]
Make sure you start ComfyUI with
--disable-all-custom-nodeswhen creating the workflow file (to prevent custom extensions adding metadata into the saved workflow file)
Ideally, the thumbnail is simply the output produced by the workflow on first execution. As an example, see the output of the Mixing ControlNets template:
![]()
For my Wan 2.1 template, I'll just use the webp video I got the workflow from.
Choose the content type and hover effect (optional) for your thumbnail:
| Content Types | Hover Effects |
|---|---|
Image: Default image with no extra effect | Compare Slider: Before/after comparison tool |
Video: Webp animation | Hover Dissolve: Dissolves to 2nd image on hover |
Audio: Audio playback | Hover Zoom: Same as default but zooms more |
[!WARNING]
For video thumbnails, thumbnails need to be converted to webp format first
Since my Wan 2.1 thumbnail is already an animated video, I'll use a video thumbnail but choose not to add an effect.
Attempt to compress the assets. Since the thumbnails will never be taking up a large portion of the screen, it is acceptable to lower their size. It's also good to convert them to a space-efficient file format like webp or jpeg, applying a lossy compression algorithm (e.g., convert at 65% quality).
EzGif has free tools for changing resolution, compressing, and converting file types. Use whatever tool you are comfortable with.
[!TIP]
Convert to webp first, then resize to a smaller resolution. You can maintain high quality and still get near 95% reduction if e.g., converting from png.
Give the workflow a filename that has no spaces, dots, or special characters. Then rename the thumbnail file(s) to match, but with a counter suffix.
your_template_name.json
your_template_name-1.png
your_template_name-2.png
I'll name the Wan 2.1 template as text_to_video_wan.json. So my files will be:
text_to_video_wan.json
text_to_video_wan-1.webp
Then move the renamed files to your templates folder.
Each template lives in one bundle (media-image, media-video, etc.). Update
bundles.json with the template ID so the correct media package ships it.
After editing templates/ or bundles.json, regenerate the manifest and copy assets into
the package directories:
python scripts/sync_bundles.py
# or via Nx
npm run sync
This step must be run before committing; CI will fail if the manifest/bundles are out of sync.
index.jsonThere's an index.json file in the templates folder which is where template configurations are set. You will need to add your template to this file, using the fields outlined below:

If your template doesn't fit into an existing category, you can add a new one:
{
"moduleName": "default",
"title": "Basics",
"type": "image",
"templates": [
{
"name": "default",
"mediaType": "image",
"mediaSubtype": "webp",
"description": "Generate images from text descriptions."
},
]
},
+ {
+ "moduleName": "default",
+ "title": "Your New Category"s Name",
+ "type": "video",
+ "templates": [
+ {
+ "name": "your_template_name",
+ "description": "A description of your template workflow",
+ "mediaType": "image",
+ "mediaSubtype": "webp",
+ "description": "Your template"s description.",
+ "tutorialUrl": "https://link-to-some-helpful-docs-if-they-exist.como"
+ "thumbnailVariant": "zoomHover",
+ },
+ ]
+ }
The Wan 2.1 template I'm adding already fits into the "Video" category, so I'll just add it there:
{
moduleName: "default",
title: "Video",
type: "video",
templates: [
{
name: "ltxv_text_to_video",
mediaType: "image",
mediaSubtype: "webp",
tutorialUrl: "https://comfyanonymous.github.io/ComfyUI_examples/ltxv/"
},
+ {
+ "name": "text_to_video_wan",
+ "description": "Quickly Generate videos from text descriptions.",
+ "mediaType": "image",
+ "mediaSubtype": "webp",
+ "tutorialUrl": "https://comfyanonymous.github.io/ComfyUI_examples/wan/"
+ },
]
},
The thumbnailVariant field is where you add the choice of thumbnail variant.
Now you can start ComfyUI (or refresh browser if already running) and test that your template works.
[!WARNING]
Make sure to use double-quotes
"instead of single-quotes'when adding things to json files
Now we need to embed metadata for any models the template workflow uses. This way, the user can download and run the workflow without ever leaving ComfyUI.
For instance, my Wan 2.1 template requires 3 models:

To add them to the workflow json, find each associated node and add the metadata to their properties:
{
"id": 39,
"type": "VAELoader",
"pos": [866.3932495117188, 499.18597412109375],
"size": [306.36004638671875, 58],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [76],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "VAELoader",
+ "models": [
+ {
+ "name": "wan_2.1_vae.safetensors",
+ "url": "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors?download=true",
+ "hash": "2fc39d31359a4b0a64f55876d8ff7fa8d780956ae2cb13463b0223e15148976b"
+ "hash_type": "SHA256",
+ "directory": "vae"
+ }
+ ]
},
"widgets_values": ["wan_2.1_vae.safetensors"]
},
{
"id": 38,
"type": "CLIPLoader",
"pos": [12.94982624053955, 184.6981658935547],
"size": [390, 82],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CLIP",
"type": "CLIP",
"links": [74, 75],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "CLIPLoader",
+ "models": [
+ {
+ "name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ "url": "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors?download=true",
+ "hash": "c3355d30191f1f066b26d93fba017ae9809dce6c627dda5f6a66eaa651204f68",
+ "hash_type": "SHA256",
+ "directory": "text_encoders"
+ }
+ ]
},
"widgets_values": [
"umt5_xxl_fp8_e4m3fn_scaled.safetensors",
"wan",
"default"
]
},
{
"id": 37,
"type": "UNETLoader",
"pos": [485.1220397949219, 57.094566345214844],
"size": [346.7470703125, 82],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [92],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "UNETLoader",
+ "models": [
+ {
+ "name": "wan2.1_t2v_1.3B_bf16.safetensors",
+ "url": "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/diffusion_models/wan2.1_t2v_1.3B_bf16.safetensors?download=true",
+ "hash": "6f999b0d6cb9a72b3d98ac386ed96f57f8cecae13994a69232514ea4974ad5fd",
+ "hash_type": "SHA256",
+ "directory": "diffusion_models"
+ }
+ ]
},
"widgets_values": ["wan2.1_t2v_1.3B_bf16.safetensors", "default"]
},
You can find the hash and hash_type for a model on huggingface (see below)or by calculating it yourself with a script or online tool.

Workflow spec and ModelFile Zod schema for more details.
[!CAUTION]
Ensure that the filename being downloaded from the links matches the filenames in the
widgets_valuesexactly.
If your template requires a specific version of Comfy or a custom node, you can specify that using the same process as with models.
The Wan 2.1 workflow requires the SaveWEBM node which wasn't fully supported until ComfyUI v0.3.26. I can add this information into the SaveWEBM node:
{
"id": 47,
"type": "SaveWEBM",
"pos": [2367.213134765625, 193.6114959716797],
"size": [315, 130],
"flags": {},
"order": 9,
"mode": 4,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 93
}
],
"outputs": [],
"properties": {
"Node name for S&R": "SaveWEBM",
+ "cnr_id": "comfy-core",
+ "ver": "0.3.26"
},
"widgets_values": ["ComfyUI", "vp9", 24, 32]
},
This can help diagnose issues when others run the workflow and ensure the workflow is more reproducible.
If your template corresponds with a page on https://github.com/comfyanonymous/ComfyUI_examples, https://docs.comfy.org/custom-nodes/workflow_templates, etc., you can add a MarkdownNote node with links:

Raw markdown used:
### Learn more about this workflow
> [Wan - ComfyUI_examples](https://comfyanonymous.github.io/ComfyUI_examples/wan/#text-to-video) β Overview
>
> [Wan 2.1 Tutorial - docs.comfy.org](https://docs.comfy.org/tutorials/video/wan/wan-video) β Explanation of concepts and step-by-step tutorial
Before creating your PR, sync your template to all language versions using the translation management script.
Run the translation sync script:
python3 scripts/sync_i18n.py --templates-dir templates
The script will:
scripts/i18n.json for translation tracking(Optional) Add translations in scripts/i18n.json:
{
"templates": {
"your_template_name": {
"title": {
"en": "Your Template Title",
"zh": "ζ¨η樑ζΏζ ι’"
},
"description": {
"en": "Your template description",
"zh": "ζ¨η樑ζΏζθΏ°"
}
}
}
}
Run sync again to apply your translations
For detailed instructions, see scripts/I18N_GUIDE.md.
templates foldertemplates/index.json filepyproject.toml (example)Version bumping and package building are automated via CI/CD. Bumping the root pyproject.toml version automatically:
Here is the PR I made for the Wan template: https://github.com/Comfy-Org/workflow_templates/pull/16
Once the PR is merged, if you followed step 6 correctly, a new version will be published to the comfyui-workflow-templates PyPi package.
FAQs
ComfyUI workflow templates package
We found that comfyui-workflow-templates demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rustβs crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.