Skip to main content
ComfyUI 部署到某处后,您的应用程序便可针对它运行工作流:提交工作流,等待执行,然后下载输出。本页面梳理了每种部署方式分别应使用哪个客户端。

Start here: the Comfy SDKs

For a new integration, use the official Comfy SDKs (Python and TypeScript) and the Comfy API v2 they call. The same code runs against every deployment target; only the base URL changes.

Comfy SDKs

Install the SDK, submit a workflow, and download the outputs. Currently in beta.

什么和什么兼容

自托管实例也可以完全跳过 SDK,直接使用原生 ComfyUI 服务器 API(REST + WebSocket)。它暴露完整的本地接口,包括队列和节点信息,但不保证跨版本兼容。

应该使用哪个 API?

所有这些 API 都接受相同的工作流格式(API 格式),因此你可以在本地开发和测试工作流,并将其迁移到其他部署环境,无需任何更改。

入门

Comfy SDK

使用 Python 或 TypeScript 针对任何部署目标运行工作流。

自托管 API 代理

在你自己的 ComfyUI 前面提供 v2 API,以便 SDK 可以访问它。

工作流 API 格式

以 API 接受的 JSON 格式导出工作流。

ComfyUI 服务器 API

自托管实例的原始 REST 和 WebSocket API。

前提条件

  • 任何涉及 Comfy Cloud、Serverless 部署或合作节点的操作都需要 API 密钥。纯本地运行的 ComfyUI 则不需要。
  • API 格式 导出的工作流。