Skip to main content
After you deploy your Build on Comfy Cloud, you can release new versions of the Build, change the deployment’s GPU and workers, and call the deployment from your application at its own URL. A deployment costs GPU time while its workers run and storage until you delete it. You keep managing it after you create it. This page shows how to start a Build from other sources, release versions, choose the GPU and workers, call the deployment, add a model to it, watch it, and stop or delete it. To create your first Build and deployment, see Custom Builds.
If Comfy Cloud already supports every Node in your Workflow, you can run the Workflow on Comfy Cloud without a Build or deployment. See Deploy on Comfy Cloud.

Before you begin

Each task on this page works in two places: on the Developer Platform at platform.comfy.org in your browser, and with comfy-cli in a terminal. Make sure you have these:
  • A workspace with Comfy Credits or an active plan: creating or starting a deployment needs one of them.
  • For the comfy-cli tabs, comfy-cli signed in to your Comfy account: run comfy cloud login.
To create a Build and deployment with comfy-cli instead of the browser, run these commands in your ComfyUI install folder:
comfy build init writes the Build file, comfy-build.yaml, to the folder. Later comfy build commands read it, so run them in the same folder.

Start a Build from Comfy Desktop, a Workflow file, or ComfyUI

If you don’t have a Build yet, you can start one from something you already have. Custom Builds shows the main browser flow, from a Workflow saved on Comfy Cloud. Pick the tab for what you start from.
A Comfy Desktop snapshot carries an instance’s ComfyUI version, Custom Nodes, and Python packages into a Build. It carries no models, so add them on the Build’s later steps.
  1. In Comfy Desktop, click Manage on your instance, and then click the Snapshots tab.
  2. If the instance’s current state isn’t listed, click Create Snapshot.
  3. On the snapshot you want, click Export. Comfy Desktop Snapshots tab with the selected snapshot's Export button highlighted
  4. On the Developer Platform, in the Developer Platform sidebar, click Deploy, and then click New build. If you have no Builds yet, click Start from scratch instead.
  5. On the Start with a workflow or snapshot? step, drop the exported .json file onto the drop area, or click the area to browse.
Another snapshot you drop replaces the current one. Continue with Build with the suggested defaults in Custom Builds.

Find your deployment

From here on, the page assumes you have a Build with at least one deployment. Every later task starts from the deployment, so find it first. Reading a deployment costs nothing. Pick the tab for the place you work in.
  1. In the Developer Platform sidebar, click Deploy.
  2. In the Deployments section, click the deployment’s name.
The deployment’s page opens. Under its name, it shows the status, such as Ready or Stopped, and the version it runs, such as v2. The Overview tab shows its Runtime configuration.

Release a version of your Build

A published version of a Build never changes. To add a Custom Node, you publish a version, and then move the deployment onto it. To add a model or LoRA to one deployment without a new version, see Add a model to a running deployment. The Developer Platform calls a version v1, v2, and so on. comfy-cli calls it a release.
Moving a deployment to another version, or rolling it back, costs GPU time while the old and the new version both run. On the Developer Platform, the Change version dialog shows the amount.
To publish a version:
  1. In the Developer Platform sidebar, click Deploy.
  2. In the Builds section, click your Build.
  3. Click New version, and make your changes in the steps.
  4. On the last step, click Save changes. The Build’s page shows Changed since vN, where N is the latest version.
  5. Click Publish. In the Choose build targets dialog, keep Serverless build selected, and then click Publish.
Building usually takes 10 to 15 minutes. If the build fails, see Fix a failing build or deployment.To move the deployment onto the version:
  1. Open the deployment’s page. When a newer version is ready, the page shows vN available under the deployment’s name.
  2. Click Change version.
  3. Select the version, and then click Update to vN.
The deployment keeps serving the version it runs until the new one is ready, and its URL stays the same. When the update finishes, the version under the deployment’s name reads vN.To go back to an earlier version:
  1. On the deployment’s page, click the History tab.
  2. On the version’s row, click Roll back to this version.
Every version of every Build counts toward your workspace’s limit of Build versions. When you reach it, delete a version you no longer need. See Clean up.

Change the GPU or region

The GPU decides how much VRAM a Workflow gets and what each worker costs per hour. The region decides where the deployment runs, and the GPUs you can pick depend on it.
On a running deployment, a GPU or region change starts a copy of the deployment on the new GPU. The old copy keeps serving, and costs GPU time, until Comfy Cloud moves the deployment to the new copy. On a stopped deployment, the change applies the next time you start it.
You choose the Location when you create a deployment: Anywhere or United States. The Developer Platform can’t change the location of an existing deployment. To run in another location, deploy the Build again from its page.To change the GPU:
  1. On the deployment’s page, click Edit settings.
  2. In Edit deployment, select a GPU. Each GPU shows its VRAM and its price per hour.
  3. Click Save changes.

Scale the workers

Each worker is one GPU that runs your jobs. You set two numbers:
  • Always-warm workers: workers that stay running so jobs don’t wait for a GPU to start. With 0, the deployment turns its GPUs off when no jobs come in.
  • Max workers: the most workers the deployment runs at once when jobs arrive. Requests beyond that wait in the deployment’s queue until a worker is free.
Always-warm workers bill GPU time the whole time they run, even with no jobs.
  1. On the deployment’s page, click Edit settings.
  2. Set Always-warm workers and Max workers.
  3. Click Save changes.
The Runtime configuration shows the values you saved.
Your plan sets the most workers one deployment can run. To see it, open Limits on the Developer Platform and check Max workers per deployment.

Stop and start a deployment

Stop a deployment to keep it, with its URL and models, without running jobs. Start it again when you need it.
A stopped deployment still costs storage. Storage billing ends when you delete the last deployment of the Build in that region. See Clean up.
To stop and start the deployment in the browser, see Stop or delete your deployment.To start a stopped deployment on another version:
  1. Click the arrow next to Start, and then select Start on vN.
  2. In the dialog, click Start on vN.

Call your deployment from your application

Your application sends API-format Workflows to the deployment’s URL with the Comfy API v2, using a workspace API key. Before you send a job, check that the deployment’s status reads Ready. A job on a deployment with 0 always-warm workers can wait a few minutes while a GPU starts.
  1. On the deployment’s page, find Run via API on the Overview tab.
  2. Copy the Deployment URL.
  3. Click Create API key, and copy the key.
  4. Copy the Python, JavaScript, or cURL snippet.
  5. Run the snippet with the key in the COMFY_API_KEY environment variable.
To test the deployment from the page, use Quick test. It runs a small Workflow with no models on the deployment.
A Quick test uses GPU time on the deployment.
  1. Open Test this deployment.
  2. Select Quick test.
  3. Click Run.
When the test finishes, it reads Finished in followed by the time it took.
From your own code, use the Comfy SDKs. Set COMFY_BASE_URL to the Deployment URL. See Choosing a base URL.

Add a model to a running deployment

You can add a model or LoRA to one deployment without publishing a new version of the Build. The file goes onto the same storage as the Build’s models, so every worker reads it from disk with no download. The deployment keeps its URL. The Build and your other deployments don’t change.
An added model counts toward the deployment’s model storage, which bills as Deployment billing describes. Each add also replaces the deployment’s running workers with new ones that have the file, and the new workers bill GPU time as usual.

Before you begin

Make sure you have these:
  • A deployment whose status reads Ready or Stopped: while it starts, stops, or updates, an add is refused.
  • The model file on your computer: a file name of letters, digits, ., _, and -, as Rules and errors describes.

Add the file

  1. In the cloud menu to the left of Run, select the deployment under Run on.
  2. In the Left sidebar, click Model Library, and then click + (tooltip Add models to this deployment).
  3. Drag a .safetensors file into the dialog, and set What type of model is this? to the type that matches the folder, such as LoRA for loras.
  4. Click Upload, and wait until the entry reads Ready.
While the file reads adding, the deployment copies it onto its storage, starts new workers that have it, and stops the old ones. Jobs already running finish on the old workers. In our tests, a 130 MB LoRA read ready between 40 seconds and about 3 minutes after the add. On a stopped deployment, the file reads ready once its upload is complete, and the next start places it. A file that reads failed was not added. Remove it, and then add it again.
To add a file from your own code, use the deployment API with a workspace API key. You need:
  • The deployment’s ID: it’s the first part of the Deployment URL, such as dep-2bf42665-0a61-4702-962f-0774c6391e96 in https://dep-2bf42665-0a61-4702-962f-0774c6391e96.run.comfy.app.
  • A workspace API key: see Getting an API key. The commands below read it from the COMFY_API_KEY environment variable and send it in the X-API-Key header.
For every field and answer of these calls, see the API reference for uploads and deployment models.
1

Ask for an upload link

Send the file’s name, size, and SHA-256 hash. kind is always model:
The answer holds the upload’s blobId, an uploadUrl, and expiresAt, the time the link stops working:
2

Upload the file

PUT the file to uploadUrl before expiresAt. The link takes only a body of the size you declared, and it needs the x-goog-if-generation-match: 0 header:
3

Add the upload to the deployment

Send the blobId and the model folder the file goes in, such as loras or checkpoints:
The answer is 202 with the deployment’s entry for the file, which reads adding:
To give the file another name in the folder, add "filename" to the request. Without it, the file keeps the name you uploaded it with.
4

Wait until the file reads ready

List the deployment’s models:
If you didn’t get an answer to an add, send the same add again. While the file reads adding, the same upload, folder, and name return the same entry.Upload a large file in pieces. For a large file, ask for the upload in pieces, so an expired link or a dropped connection doesn’t restart the whole file. Add "parts": true to the upload request. The answer then holds a parts list instead of one uploadUrl. A file is split into at most 32 pieces of at least 64 MiB each, and can be up to 128 GiB.
  1. PUT each piece’s bytes, from offsetBytes for sizeBytes bytes of the file, to that piece’s uploadUrl, with the same x-goog-if-generation-match: 0 header.
  2. If links expire before every piece is in, send POST https://platformapi.comfy.org/builder/v1/blobs/<blobId>/parts for fresh links to the pieces not stored yet.
  3. When every piece is in, send POST https://platformapi.comfy.org/builder/v1/blobs/<blobId>/complete. It joins the pieces into one file.
With pieces, you can add the upload to the deployment before the pieces land. The deployment copies each piece as it arrives, so the file reads ready sooner after the upload ends.

Use the added model

Name the file in your Workflow as you would a model in the Build. For a LoRA, set the loader’s lora_name input to the file name, as Set lora_name in the Workflow shows, and send the job to the deployment. A job that names a file still adding is refused before it reaches a worker. The API answers 422:
A job that names a failed file is refused with the code model_failed and the message my_style.safetensors was not added to this deployment. Remove it and add it again. A run from the Comfy Cloud editor is refused with the same sentence.
Send jobs that use the file only after it reads ready. A loader Node from a Custom Node pack is checked only against what the deployment listed a few seconds earlier, so a job sent right after an add can reach a worker without the file and fail with a Value not in list error.
In the Comfy Cloud editor, a file uploaded with + shows in the loader lists once it reads Ready. For a file added on the Developer Platform or with comfy-cli, select the deployment under Run on, and then reload the page or press R; the editor doesn’t pick those files up on its own. Either way, the file shows in its loader Node’s list, such as the lora_name list of a Load LoRA (Model and CLIP) Node. The deployment keeps its added models when it moves to another version, rolls back, stops, and starts. If a version you move to has its own file with the same folder and name, the deployment uses the version’s file.

Remove an added model

Removing a model deletes the file from the deployment’s storage. Jobs that name it fail. A job already running may still finish. A worker that already loaded the file may keep using it for a few minutes, and a running worker can return the saved result of a job identical to one it already ran.
  1. Open the deployment’s page.
  2. Under Added models, on the file’s row, click Remove.
The file reads removing, and then leaves the list when the removal ends, including when the file couldn’t be deleted. If the version the deployment runs has its own file with the same folder and name, only the entry is removed, and the version’s file stays.

Rules and errors

An add follows these rules:
  • The file name is one name of letters, digits, ., _, and -, and starts with a letter or digit.
  • The folder (type) is a model folder, such as loras, checkpoints, or vae, or another folder inside models. It can’t be custom_nodes or configs, or a different capitalization of a known folder, such as LoRAs.
  • One file per folder and name: a name the Build’s version or the deployment already has in that folder is refused.
  • The Build’s model setting applies: a Build set to Choose which models refuses every added model, and a Build that blocks a file name refuses that name.
Each refusal adds nothing and answers with an error code and a message you can show:

Use workspace library models in API requests

A deployment runs .safetensors models from your workspace library, even when its release doesn’t include them. To pick a LoRA per request, upload it to the library once, and then name it in each Workflow you send.
1

Upload the LoRA to your workspace library

To upload a model in the Comfy Cloud editor or on the Developer Platform, see Add your own LoRA or model. That page also lists the plan and file size an upload needs.To upload from a terminal, set the model type with --type:
When the upload finishes, the command prints Added my_style.safetensors to loras.
2

Set lora_name in the Workflow

In the API-format Workflow, set the loader’s lora_name input to the library file name, including .safetensors:
3

Send the request

Send the Workflow as Call your deployment from your application shows.
To use a different LoRA, change lora_name to another library file name in the next request. You don’t need a new Build, release, or redeploy.
  • A Workflow can name up to 100 library models. A loader that names a 101st library model fails as if the file were not in the library.
  • Keep file names unique across the folders one loader reads. If the library has the same file name in two of those folders, a job sent through the API loads neither file.

Monitor a deployment

Check a deployment’s state when it starts, after you change it, and when jobs fail.
On the deployment’s page:
  • The status under the deployment’s name reads Queued, Provisioning, or Starting while the deployment comes up, and Ready when it serves jobs.
  • While the deployment comes up, Deployment progress shows each step, such as Copying models. The deployment keeps starting on Comfy’s side, so you can close the page and come back.
  • The Boot log tab shows what ComfyUI printed while the deployment started.
  • The History tab lists the versions the deployment ran and what moved it.
On the Deploy page, the Deployments section shows each deployment’s GPU credits over the last seven days in Spend · 7d. Model storage isn’t included.

Clean up

Deleting the last deployment of a Build in a region stops its storage cost, and deleting a version frees a place under your limit of Build versions. You can’t delete a Build or a version while a deployment uses it, so delete the deployment first.
Deleting a deployment, a version, or a Build is permanent. Deleting a deployment removes its URL, so apps that call it stop working. The Build and its versions stay, so you can deploy again. A deployment you create later gets a new URL, because the URL comes from the deployment’s ID. To keep the URL, stop the deployment instead.
To delete a deployment, see Stop or delete your deployment.To delete a version:
  1. Open the Build’s page.
  2. On the version’s row, open Version actions, and then select Delete version.
  3. Click Delete.
To delete the Build:
  1. On the Build’s page, click Delete.
  2. In the Delete build dialog, click Delete.

Fix a failing build or deployment

When a build or a deployment fails, its logs name the cause. Fix the cause, and then publish or start again.
On the Developer Platform, follow What if the build fails? in Custom Builds.With comfy-cli, read the release’s state and its build log in the Build’s folder:
Change the ComfyUI install, such as by removing the Custom Node that failed, and then release again.
The deployment’s page shows the error with This deployment didn’t start. Fix what the error names, then start it again. Click Copy to copy the error. The Boot log tab shows what ComfyUI printed.With comfy-cli, comfy deploy status prints the reason. For the log and the status changes, see Monitor a deployment.Fix what the error names, and then start the deployment again.
Follow the steps in Deployment progress on the deployment’s page, or run comfy deploy status --deployment <deployment> --watch. The Copying models step takes longer the more models the version has. When you create a deployment on the Developer Platform, Estimated time in the deploy dialog shows how long the deployment takes to start.If the GPU you picked has no capacity, change the GPU or region. With comfy-cli, comfy deploy refs compute shows each GPU’s availability.
The deployment stops when your workspace runs out of credits. Add credits, and then start the deployment again.
The stop request failed, so the deployment may still be billing. Click Stop again, or run comfy deploy stop --deployment <deployment> again.
The deployment page reads Update to vN failed., and the deployment keeps serving the version it ran before. Click Retry, or fix the version and release again.

FAQ

For how deployments are billed, see Deployment billing in Usage and Limits.
Yes. When you create a Build on the Developer Platform, you can upload one or more Workflows to preselect their models and Custom Nodes. Include the dependencies of all the Workflows you plan to run, and then send each API-format Workflow to the deployment.Each deployment uses one GPU class. To run Workflows on different GPU classes, create separate deployments of the same Build.

Next steps

Once your deployment is running, use these pages to send Workflows to it from your own code.

Comfy SDKs

Submit Workflows from a Python or TypeScript app and handle inputs, progress, and outputs.

Comfy API v2

Call the HTTP API from any language and check its request and response formats.

Workflow API format

Prepare a Workflow JSON for an API request, or troubleshoot its inputs and outputs.

Get started with comfy-cli

Install comfy-cli and sign in to Comfy Cloud with comfy cloud login.