Registry / ai-ml / comfyui-workflow-templates-core

comfyui-workflow-templates-core

JSON →
library0.3.326pypypi✓ verified 25d ago

ComfyUI Workflow Templates Core provides fundamental utilities and helper functions for managing and loading ComfyUI workflow templates. It's a core component of the broader ComfyUI workflow template system, facilitating programmatic interaction with template manifests and their associated files. The library is actively developed as part of the Comfy-Org/workflow_templates repository, with releases tied to ComfyUI updates. The current PyPI version is 0.3.194. [1, 7, 9]

pip install comfyui-workflow-templates-core
INSTALL
IMPORT
SIG · COMFYUI-WORKFLOW-T
C
comfyui-workflow-templates-core
ai-mlpythonv0.3.326
Install
1.6s avg
Import
83ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.326 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.084s · 18.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.082s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

get_asset_path
from comfyui_workflow_templates_core import get_asset_path
from workflow_templates_core.manifest import WorkflowTemplateManifest
get_template_entry
from comfyui_workflow_templates_core import get_template_entry
load_manifest
from comfyui_workflow_templates_core import load_manifest

This quickstart demonstrates how to programmatically interact with `workflow_templates_core` by creating a mock workflow template manifest and then using the library's `WorkflowTemplateManifest` model to parse and validate it. It simulates the core functionality of loading template metadata, which is essential for ComfyUI's template browsing system. [1]

import json from pathlib import Path from workflow_templates_core.loader import WorkflowTemplateLoader # Create a dummy workflow template manifest JSON file dummy_manifest_content = { "id": "my_first_template", "name": "My First ComfyUI Template", "description": "A simple example template.", "version": "1.0.0", "tags": ["example", "basic"], "dependencies": [], "workflow": "path/to/my_first_template.json" } dummy_dir = Path('./my_templates') dummy_dir.mkdir(exist_ok=True) manifest_path = dummy_dir / 'my_first_template.manifest.json' workflow_path = dummy_dir / 'my_first_template.json' with open(manifest_path, 'w') as f: json.dump(dummy_manifest_content, f, indent=2) with open(workflow_path, 'w') as f: # A minimal dummy ComfyUI workflow JSON json.dump({"nodes": [], "links": []}, f, indent=2) print(f"Created dummy manifest: {manifest_path}") print(f"Created dummy workflow: {workflow_path}") # Initialize the loader with the base path where templates are stored # The loader expects manifests in a 'manifests' sub-directory or directly in the templates_path # For this example, we'll point it to the directory containing our manifest. loader = WorkflowTemplateLoader(templates_path=dummy_dir) # Load the manifest (usually done by scanning the templates_path) # In a real scenario, you'd iterate through discovered manifests. # For this quickstart, we'll simulate loading a specific manifest file directly. # Note: The loader's `load` method typically expects the manifest file itself, not its containing directory. # A more typical usage would involve the loader *finding* manifests. # As a direct example, we can parse the content into a Manifest object: print("\nAttempting to parse manifest content...") try: with open(manifest_path, 'r') as f: raw_manifest = json.load(f) manifest = WorkflowTemplateManifest(**raw_manifest) print(f"Successfully parsed manifest: {manifest.name} (ID: {manifest.id})") print(f"Workflow file referenced: {manifest.workflow}") except Exception as e: print(f"Error parsing manifest: {e}") # Clean up dummy files manifest_path.unlink() workflow_path.unlink() dummy_dir.rmdir() print("\nCleaned up dummy files.")
Debug
Known issues
breakingIncomplete ComfyUI updates can lead to missing or broken workflow templates. This library is a core dependency of ComfyUI's template system and must be updated alongside ComfyUI's main code and other related packages (like `comfyui-frontend-package` and `comfyui-embedded-docs`) to ensure compatibility and access to the latest templates. [7]
fix
Always update ComfyUI and its core dependencies together. If using `git pull`, ensure all associated sub-modules or `requirements.txt` dependencies are also updated, typically via the official update scripts or ComfyUI Manager.
affects: All versions
gotchaWhen creating or modifying workflow templates, ensure the JSON structure conforms to the `WorkflowTemplateManifest` schema. Crucially, any models required by the workflow must be correctly embedded with `name`, `url` (direct download link), and `directory` (relative to `ComfyUI/models`) fields. Incorrectly formatted model information can prevent templates from being fully functional or models from being auto-downloaded. [4]
fix
Refer to the ComfyUI documentation on embedding models within workflow templates. Use safe model formats like `.safetensors` or `.sft` for embedded models, as unsafe formats (e.g., `.gguf`) may be flagged and not offer download links. [4]
affects: All versions
gotchaFor developers creating custom nodes that include example workflow templates, these templates must be placed in a specific folder structure (e.g., `example_workflows`, `workflow`, `workflows`, `example`, or `examples`) within the custom node's directory for ComfyUI's template browser to discover and display them. [5]
fix
Organize custom node example workflow JSONs and their corresponding `.jpg` thumbnails within one of the recognized example workflow directories in your custom node's repository.
affects: All versions
Upgrade
Version history
0.3.326latest on PyPI · released Aug 27, 2026
Audit
Dependencies
ComfyUIrequiredThis library provides core helpers for ComfyUI's native workflow template system and is intended to be used within or alongside a ComfyUI installation. It's often updated alongside ComfyUI's core and other related frontend/documentation packages.
Agent activity
24 hits · last 30 days
node
18
OpenAI (training)
1
Resources
comfyui-workflow-templates-core — pip install comfyui-workflow-templates-core · libregistry