Skip to content

vantang/ComfyUI-MediaHub

Repository files navigation

ComfyUI MediaHub logo

ComfyUI MediaHub

Connect cloud image and video generation APIs to composable ComfyUI workflows.

简体中文 · Support and Issues · Contributing

ComfyUI MediaHub banner

Why MediaHub

MediaHub aims to bring the world's useful, popular, and capable generative media APIs into ComfyUI through clear, composable nodes.

The number of providers currently supported is still limited by the provider accounts and API access available to the maintainer. This is an open invitation to the wider community: pull requests for new providers and improvements are welcome, issue reports are valuable, and coding agents are welcome to contribute when they follow the project's architecture and verification rules.

MediaHub keeps provider-specific configuration separate from provider-neutral execution. This lets workflows share a stable image/video execution pipeline without pretending that different providers have identical APIs.

Supported Providers

The first release is planned to include:

Provider Image Video
MiniMax CN T2I, I2I T2V, I2V, first/last-frame video, subject-reference video
Agnes Image 2.1 T2I, I2I Video 2.0 T2V, I2V, multi-image, keyframes
Seed Volcengine Seedream T2I, I2I Seedance T2V, I2V, first/last-frame video
Alibaba Cloud Bailian CN Wan image generation/editing Wan T2V/I2V and HappyHorse T2V/I2V

Provider availability, model access, pricing, regional endpoints, and accepted parameters are controlled by each provider. Final first-release capabilities remain subject to release verification.

Design

Image workflow:

Prompt / source image -> Provider Image Config -> MediaHub Generate Image -> Preview Image
API Key ---------------------------------------> MediaHub Generate Image

Video workflow:

Prompt / source image -> Provider Video Config -> MediaHub Submit Video
API Key ---------------------------------------> MediaHub Submit Video

MediaHub Submit Video -> MediaHub Resolve Video -> SaveVideo
API Key -------------> MediaHub Resolve Video
  • Provider config nodes expose documented provider parameters and validation.
  • Generic execution nodes do not contain provider dropdowns or provider fields.
  • Image output connects directly to ComfyUI's Preview Image.
  • Video output connects directly to ComfyUI's built-in SaveVideo.
  • Provider packages are isolated from ComfyUI and from one another.

Installation

ComfyUI Registry / Manager

Registry installation will be available after the first public release under the node ID mediahub-cloud.

Manual Installation

Clone this repository into ComfyUI/custom_nodes, install its dependencies with the Python environment used by ComfyUI, and restart ComfyUI:

cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/vantang/ComfyUI-MediaHub.git
/path/to/ComfyUI/python -m pip install -r ComfyUI-MediaHub/requirements.txt

After restart, find nodes under the MediaHub category. Importable workflows for every supported provider path are available in examples/.

Quick Start

  1. Import a workflow from examples/.
  2. Obtain an API key and model access from the selected provider.
  3. Enter the key in MediaHub API Key.
  4. Configure the provider node.
  5. Queue the workflow.

Provider-specific reference snapshots and implementation notes are stored under docs/providers/.

API Key Security

The inline password control masks the key on screen only. ComfyUI may still serialize the API key into workflow JSON or generated-media metadata.

Before sharing a workflow or generated file:

  • Remove the API key from the workflow.
  • Inspect exported workflow JSON and metadata.
  • Revoke and rotate any key that may have been exposed.

Secure local credential storage is not implemented yet.

Contributing

MediaHub needs more providers, tests, documentation, and real-world validation. Human contributors and coding agents are equally welcome.

Before implementing a provider:

  1. Open or reference an issue describing the provider and operations.
  2. Use current official API documentation as the source of truth.
  3. Preserve provider and media-family isolation.
  4. Add tests, user workflows, deterministic API fixtures, and verification evidence.
  5. Never commit provider credentials.

Read CONTRIBUTING.md, AGENTS.md, and docs/AGENT_EXECUTION_PROTOCOL.md before making implementation changes.

Prompt for Coding Agents

Use this prompt when asking an agent to add a provider or operation:

Contribute <provider> <operation> support to ComfyUI-MediaHub.

Before editing, read AGENTS.md, docs/CURRENT_STATE.md, docs/DEVELOPMENT.md,
docs/AGENT_EXECUTION_PROTOCOL.md, and the latest ComfyUI log.

Use the provider's current official API documentation as the source of truth.
Save dated documentation evidence under docs/providers/<provider>/ and clearly
record endpoints, authentication, models, parameters, accepted values, errors,
response formats, and temporary URL behavior. Do not infer one regional API
from another.

Follow the existing architecture:
- keep provider code isolated under mediahub/providers/<provider>/;
- do not import ComfyUI or another provider from provider packages;
- keep image, video, and future media families independent;
- expose provider-specific parameters in provider config nodes;
- reuse provider-neutral execution nodes and stable request/job contracts;
- do not add extra_params or provider-name branches to generic services.

Add payload/validation/error tests, node-contract tests, user-facing workflows
under examples/, deterministic API fixtures under tests/fixtures/, and any
required frontend behavior. Run targeted tests, the full suite, static checks,
JSON validation, a restarted-ComfyUI smoke test, and explicit live provider
verification when credentials are authorized. Update docs/CURRENT_STATE.md
with reproducible evidence and remaining gaps. Never print or commit API keys.

Development Verification

.venv/bin/python -m pytest -q
node --check js/mediahub.js
.venv/bin/python -m compileall -q .
for file in examples/*.json tests/fixtures/*.json; do
  .venv/bin/python -m json.tool "$file" >/dev/null
done

After restarting ComfyUI:

.venv/bin/python scripts/smoke_comfyui.py

Live provider tests consume provider credits and must be run explicitly.

Support

Use GitHub Issues for bugs, provider requests, compatibility reports, and implementation proposals. Include the provider, operation, model, ComfyUI version, relevant error output, and a redacted workflow when possible.

License

ComfyUI MediaHub is released under the MIT License.

About

Connect cloud image and video generation APIs to composable ComfyUI workflows.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors