Registry / ai-ml / comfyui-workflow-templates-media-api

comfyui-workflow-templates-media-api

JSON →
library0.3.84pypypi✓ verified 25d ago

This library provides a collection of API-driven workflow templates (JSON files) for ComfyUI, specifically tailored for various media processing tasks. It acts as a data bundle, offering ready-to-use workflows accessible within the ComfyUI user interface, rather than adding new Python functionality or custom nodes. The current version is 0.3.68, and it's part of a rapidly evolving ComfyUI ecosystem with frequent updates.

pip install comfyui-workflow-templates-media-api
INSTALL
IMPORT
SIG · COMFYUI-WORKFLOW-T
C
comfyui-workflow-templates-media-api
ai-mlpythonv0.3.84
Install
2.9s avg
Import
48ms
Disk
112MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.84 · 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.050s · 113.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.9s · import 0.046s · 114MB
112MB installed
● package 112MB
Code
Verified usage

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

template_paths
import importlib.resources # To access the installed template files (e.g., for inspection or programmatic loading): # paths = importlib.resources.files('comfyui_workflow_templates_media_api').joinpath('templates')
This library is primarily a data bundle (JSON workflow files), not a code library with typical Python classes/functions. Direct programmatic import is usually to access the installed template files, not to call functional APIs from this package itself. The main interaction is via the ComfyUI UI.

This library delivers JSON workflow templates for ComfyUI. The primary way to use these templates is through the ComfyUI graphical user interface. After installation, launch ComfyUI and access the templates via the 'Workflow' menu.

# This package provides workflow *templates* for ComfyUI, not Python functions for direct execution. # The primary quickstart is within the ComfyUI application itself. # 1. Install ComfyUI (if not already installed, e.g., via git clone or desktop app). # For example: git clone https://github.com/Comfy-Org/ComfyUI # 2. Install this package: # pip install comfyui-workflow-templates-media-api # 3. Start ComfyUI: # cd ComfyUI # python main.py # 4. In the ComfyUI web interface (usually http://127.0.0.1:8188): # Click on 'Workflow' in the top menu. # Select 'Browse Templates'. # Find and select the desired workflow from the 'media-api' bundle.
Debug
Known issues
breakingComfyUI and its custom node ecosystem are under rapid development (often weekly releases). Workflows, including those from this package, can become incompatible with newer ComfyUI versions or updated custom nodes due to changes in backend, frontend, or node definitions.
fix
Regularly update ComfyUI and associated custom nodes. Check ComfyUI's changelog for breaking changes. Re-saving workflows in newer API formats might be necessary for programmatic use. For critical workflows, consider pinning ComfyUI and custom node versions.
affects: All versions of ComfyUI and associated templates/custom nodes.
gotchaThis package is a *data bundle* containing JSON workflow templates, not a Python library providing new programmatic functionality or custom nodes for direct import and execution. Its purpose is to augment the ComfyUI user interface with pre-built workflows.
fix
Understand that interaction is primarily through the ComfyUI GUI's 'Browse Templates' feature. If programmatic access to the *content* (JSON files) is needed, use standard Python resource loading (e.g., `importlib.resources`).
affects: All versions
gotchaTo use these workflow templates programmatically via the ComfyUI API (e.g., for automation or integration into other applications), you often need to enable 'Dev Mode Options' in ComfyUI settings and save the desired workflow in 'API Format' first. This involves interacting with ComfyUI's built-in API, not directly with this Python package.
fix
Refer to the ComfyUI official documentation for details on using its API (WebSocket, `/prompt` endpoint, etc.) and preparing workflows for API consumption. This typically involves using the ComfyUI frontend to export the workflow JSON in the correct API format.
affects: All versions
Errors
Common errors & fixes
Specified workflow does not appear to be an API workflow json
The loaded JSON file is not structured correctly as an API-compatible ComfyUI workflow, or it might be a standard UI workflow JSON when an API-specific format is expected.
fix
Ensure you are loading a workflow saved in 'API Format' from ComfyUI (enable 'Dev mode options' in settings to see the 'Save (API Format)' button). Verify the JSON structure against ComfyUI's API workflow specifications.
Missing nodes are highlighted in red on the canvas / Install these nodes to run this workflow
The workflow template requires custom ComfyUI nodes that are not currently installed in your ComfyUI setup.
fix
Use the ComfyUI Manager (accessible via the 'Manager' button in the toolbar) to automatically detect and install missing custom nodes. After installation, restart ComfyUI.
Error fetching workflow templates: Request failed with status code 404 (templates/index.json)
ComfyUI is unable to locate the `index.json` file which lists the available workflow templates, often due to an incomplete update, incorrect installation, or file path issues.
fix
Ensure ComfyUI is fully updated by running the update script (e.g., `update_comfyui.bat` or `git pull`). Verify that the `templates` directory and its `index.json` are present and correctly placed within your ComfyUI installation.
ComfyUI API Error: Bad escaped character in JSON
When dynamically injecting values or modifying a workflow's JSON structure, special characters (like quotes or backslashes) within the input are not properly escaped, leading to malformed JSON.
fix
Ensure that any dynamic text or variables inserted into the JSON payload are correctly escaped to prevent breaking the JSON format. Use appropriate escaping functions for characters like `"` and `\` if manually constructing or modifying the JSON.
Upgrade
Version history
0.3.84latest on PyPI · released Jun 30, 2026
Audit
Dependencies
ComfyUIrequiredThis package provides workflow templates for ComfyUI and is not functional without a running ComfyUI installation. ComfyUI itself is typically installed by cloning its GitHub repository or using a desktop installer, not via pip as a direct Python dependency of this package.
Agent activity
25 hits · last 30 days
node
18
OpenAI (training)
2
Resources
comfyui-workflow-templates-media-api — pip install comfyui-workflow-templates-media-api · libregistry