Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 105 additions & 21 deletions development/deploy/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,131 @@
icon: "map"
---

Choose Comfy Cloud for an always-available managed ComfyUI, Comfy API for a versioned environment deployed as an endpoint, or self-hosting for infrastructure you manage.
You can run your ComfyUI Workflows on Comfy Cloud, on your own Comfy API deployment, or on a server you manage. Comfy Cloud and Comfy API run on Comfy GPUs, so they don't need a GPU on your computer. Pick the option that fits your Workflow, and start from its card.

Check warning on line 8 in development/deploy/overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/deploy/overview.mdx#L8

Did you really mean 'GPUs'?

<CardGroup cols={3}>
<Card title="Comfy Cloud" icon="cloud" href="/development/deploy/cloud">
Run workflows without creating a Build or deployment.
Run Workflows whose Custom Nodes and models are already on Comfy Cloud, with no build or deployment.
</Card>
<Card title="Comfy API" icon="cloud-arrow-up" href="/development/serverless/quickstart">
Package models and custom nodes into a managed, autoscaling endpoint.
Package Custom Nodes, models, and Python dependencies into a build, and run it as an autoscaling endpoint.

Check warning on line 15 in development/deploy/overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/deploy/overview.mdx#L15

Did you really mean 'autoscaling'?
</Card>
<Card title="Self-Host" icon="server" href="/development/deploy/self-hosting">
Run ComfyUI on your own hardware, rented GPUs, or containers.
<Card title="Self-hosting" icon="server" href="/development/deploy/self-hosting">
Run ComfyUI on a machine you manage, and serve it on your network with `--listen`.
</Card>
</CardGroup>

All three options run [API-format workflows](/development/api-development/workflow-api-format). Choose based on whether you want Comfy to manage the environment or want to manage it yourself.
To call any of the three from your own code, send the Workflow in [API format](/development/api-development/workflow-api-format).

## Deploy from the ComfyUI app

ComfyUI adds a **Deploy to Comfy API** entry to the **Workflow actions** menu of every top-level workflow. It is available in the local app, Comfy Cloud, and the Desktop app, and the entry is marked **NEW** in the menu.
In ComfyUI on your computer or in Comfy Desktop, the **Deploy to Comfy API** card starts a Comfy API build from the open Workflow.

<Warning>
Publishing a version is free. When its build finishes, the **Serverless build** row shows a **Deploy** button. Deploying costs storage from the moment you deploy, plus GPU time while a worker is up. The deploy dialog shows the estimated cost before you confirm.
</Warning>

<Steps>
<Step title="Open Workflow actions">
In the top bar, open the **Workflow actions** menu on the workflow tab.
</Step>
<Step title="Choose Deploy to Comfy API">
ComfyUI activates the workflow, then opens an introduction card with a short product video and a summary of the node packs, models, and node classes the workflow uses.
<Step title="Open the Workflow actions menu">
In the **Top bar**, right-click the Workflow's tab. You can also click the **Workflow actions** button at the top left of the **Canvas**.

![Workflow actions menu open from a Workflow tab, with Deploy to Comfy API and its NEW badge below Export (API)](/images/development/deploy/deploy-to-comfy-api.png)
</Step>
<Step title="Open the platform">
Click **Deploy on Platform** to continue on [platform.comfy.org](https://platform.comfy.org). The Build Wizard there starts from an imported workflow JSON or a Comfy Desktop snapshot, and [Build sources](/development/serverless/build-sources) covers both. The card also carries a **Read the docs** link to the developer documentation.
<Step title="Select Deploy to Comfy API">
Select **Deploy to Comfy API**. The entry is marked **NEW**. The **Deploy to Comfy API** card opens and counts the Node packs, models, and Node classes the Workflow uses.

![Deploy to Comfy API card with a product video, the Node pack, model, and Node class counts, and the Deploy on Platform button](/images/development/deploy/deploy-api-ui.png)
</Step>
<Step title="Or hand the workflow to a coding agent">
Click **Build with your agent** to copy a brief for the open workflow, then paste it into your coding agent.
<Step title="Continue on the Developer Platform">
Click **Deploy on Platform**. The Developer Platform at [platform.comfy.org](https://platform.comfy.org) opens in a new tab.
</Step>
</Steps>

Comfy API packages the workflow's custom nodes, models, and Python dependencies into a reproducible build, then runs it as an autoscaling endpoint. See [Comfy API](/development/serverless/quickstart) for the build and deployment flow.
On the Developer Platform, you create a build from the Workflow, publish a version, and deploy it. [Build sources](/development/serverless/build-sources) covers starting a build from a Workflow file, and the [Comfy API quickstart](/development/serverless/quickstart) covers the same flow with comfy-cli.

## Run a deployment from the Cloud editor

Your deployment can run Workflows in ComfyUI on Comfy Cloud, with the Custom Nodes and models in its build.

### Create a deployment from Comfy Cloud
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

On Comfy Cloud, the **Workflow actions** menu has no **Deploy to Comfy API** entry. Start from the menu next to **Run** instead:

1. Click the menu next to **Run**.
2. Select **Create a custom deployment**, and then click **Create on Platform**. Your builds on the Developer Platform open in a new tab.

![Run on menu open next to the Run button, with Comfy Cloud checked, the message This workspace has no deployments yet, and Create a custom deployment below it](/images/development/deploy/run-on.png)

When your workspace already has deployments, the menu shows **Manage deployments** instead. It opens the same builds page on the Developer Platform.

When you open a Workflow that uses Custom Nodes Comfy Cloud doesn't have, the **Run this workflow on a custom deployment** dialog lists what's missing. Click **Create on Platform** to start a build for it.

![Comfy Cloud dialog for a Workflow with Custom Nodes Comfy Cloud doesn't have, listing the missing Nodes above the Read the docs link, the Build with your agent button, and the Create on Platform button](/images/development/deploy/run-on-custom-deployment.png)

### Open your deployment in the Cloud editor

1. In the deploy dialog, leave **Ready for the Cloud editor** selected if the dialog shows it. The option is on by default. If you clear **Ready for the Cloud editor**, opening the deployment in the editor later takes a minute.
2. On the deployment's page, wait for the status under its name to read **Ready**. **Open in ComfyUI** stays disabled until then.
3. Click **Open in ComfyUI**. ComfyUI on Comfy Cloud opens in a new tab and reloads onto your deployment.

![Deployment page with the Ready status under the deployment name and the Open in ComfyUI button at the top right](/images/development/deploy/deployment-detail.jpg)

To check where your Workflows run:

1. Click the menu next to **Run**.
2. Find the check mark next to the deployment your Workflows run on.
3. Click **Run** to run the Workflow on it.

![Run on menu open next to the Run button, with a check mark next to the selected deployment](/images/development/deploy/selected-deployment.jpg)

- The menu lists every deployment in your workspace. Select a **Ready** deployment to switch to it.
- Switching reloads the editor. By default, your tabs stay open.
- This browser keeps running your Workflows on the selected deployment until you select another one.

### Switch back to Comfy Cloud

1. Click the menu next to **Run**.
2. Select **Comfy Cloud**.

The editor reloads. If a Workflow has unsaved changes, a **Save your workflows before switching?** dialog opens. Click **Save and switch**, or **Switch without saving**.

## Stop or delete a deployment

Stop a deployment to stop its jobs, or delete it to remove it and end its storage billing. Both actions are on the deployment's page on the Developer Platform.

<Warning>
A stopped deployment runs no jobs, but its storage still bills. Delete the deployment to end storage billing.
</Warning>

To open the deployment's page:

1. In the Developer Platform sidebar, click **Deploy**.
2. In the **Deployments** section, click the deployment's name.

![Deployments section of the Deploy page, with each deployment's name in the leftmost column and its status in the Status column](/images/development/deploy/deployments.jpg)

To stop the deployment:

1. Click **Stop**.
2. In the **Stop deployment** dialog, click **Stop**.

The status reads **Stopping**, and then **Stopped**.

To run the deployment again:

- Click **Start**.

<Warning>
Deleting removes the deployment and its history permanently. The build stays.
</Warning>

To delete the deployment:

### Build with your agent
1. On a stopped deployment, click **Delete**. On a running deployment, open the **More actions** menu, and then select **Delete**.
2. In the **Delete deployment** dialog, click **Delete**.

**Build with your agent** is the alternative to building by hand. It copies a plain-text brief and runs no command. ComfyUI also downloads the workflow JSON so your agent has the file to build from. In the Desktop app it does not download a separate file: the brief points at the newest snapshot in the `.launcher/snapshots` directory of the Desktop install, and importing that snapshot sends its JSON to the builder the same way. The brief names the workflow's node classes, node packs, and models, and points your agent at the current `comfy skills show comfy-build` recipe, which owns the comfy-cli commands, the version pins, the release cut, and how to read a failure. Your agent confirms with you before it uploads the workflow and again before the first cut. It then fixes one cause per cut, tells you the cause, the exact edit, and which build it is before every new cut, and stops after three cuts. A release is not a deployment, so the brief stops at a green release and deploying stays a separate decision.
The next time a browser that ran the Cloud editor on the deployment loads ComfyUI, ComfyUI runs on Comfy Cloud instead of the deleted deployment.

## Next step: run workflows against it
## Run Workflows from your application

Once a deployment is live, see [Running Workflows](/development/run-workflows/overview) to call it from your application. The [Comfy SDKs](/development/api-development/sdks) work against every deployment target; self-hosted instances additionally need the [API Proxy](/development/comfyui-server/api-proxy) to serve Comfy API v2.
When a deployment is **Ready**, see [Running Workflows](/development/run-workflows/overview) to call it from your application. The [Comfy SDKs](/development/api-development/sdks) work with Comfy Cloud and with your deployments. A self-hosted ComfyUI needs the [API Proxy](/development/comfyui-server/api-proxy) to serve Comfy API v2.
Loading
Loading