> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding Custom Builds to Comfy Cloud

> Run a Workflow with your own Custom Nodes on Comfy Cloud: create a Build, run its deployment from the editor, upload a LoRA, and delete the deployment.

A Build packages your Custom Nodes, private Custom Nodes, LoRAs and other models, and Python dependencies so your Workflows can run on Comfy Cloud. You start the Build from the Comfy Cloud editor, create and deploy it on the Developer Platform, and then run your Workflow on it in the editor.

A deployment of your Build also gives you GPU workers that serve only your Workflows, even when Comfy Cloud already supports every Node in them.

> [!NOTE]
>
> To use your own LoRA or another model with Nodes that Comfy Cloud already supports, you don't need a Build. Upload the model to your **Model Library** instead. See [Add your own LoRA or model](#add-your-own-lora-or-model).

### Prerequisites

Before you create a Build, make sure you have these:

* **A saved Workflow on Comfy Cloud**
* **An active subscription or a Comfy Credits balance above zero**

> [!WARNING]
>
> A Build costs nothing to create or keep. A deployment costs GPU time while a GPU is on for it. It also costs storage for as long as the deployment exists, even while it's stopped or no GPU is on. The deploy dialog shows the estimated cost before you confirm. To stop paying, delete the deployment. See [Stop or delete your deployment](#stop-or-delete-your-deployment).

## Create a Build from your Workflow

If your Workflow uses Custom Nodes Comfy Cloud doesn't support, Comfy Cloud shows a dialog when you open it. The dialog lists the missing Custom Node packs (groups of Custom Nodes) and models, such as LoRAs. To run the Workflow, create a Build with them. When you pick your saved Workflow, the Developer Platform finds its Custom Nodes and models and selects them for you.

**1. Open the Developer Platform**

In the dialog, click **Create on Platform**. The Developer Platform opens in a new tab, on its **Deploy** page.

![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](https://mintcdn.com/dripart/oPsov_e3HUhk_xUX/images/development/deploy/run-on-custom-deployment.png?fit=max\&auto=format\&n=oPsov_e3HUhk_xUX\&q=85\&s=da981d7d6d591244e63f7c3e91979419)

![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](https://mintcdn.com/dripart/oPsov_e3HUhk_xUX/images/development/deploy/run-on.png?fit=max\&auto=format\&n=oPsov_e3HUhk_xUX\&q=85\&s=3ed4851ed8cf0355d60d208bc64650c4)

> [!TIP]
>
> To create a Build without the dialog, click the cloud menu to the left of **Run**. By default, it's set to **Comfy Cloud**.
>
> * If your workspace has no deployments yet, select **Create a custom deployment**, and then click **Create on Platform**.
> * If it already has deployments, select **Manage deployments**.

**2. Start a new Build**

On the **Deploy** page, click **New build**. If you have no Builds yet, click **Start from scratch** instead.

**3. Pick your Workflow**

1. Click **Pick from Comfy Cloud**.
2. Select your Workflow, and then click **Add 1 workflow**.

You can also drag the Workflow's `.json` file, or a `.png` image made with it, onto the drop area.

![Developer Platform new Build page on its first step, with the drop area, the Pick from Comfy Cloud button, the picked Workflow name with a check mark, the Suggested defaults list, and the Customise build and Build with defaults buttons](https://mintcdn.com/dripart/jxn4ma9PhGXye-0C/images/development/deploy/missing-nodes.png?fit=max\&auto=format\&n=jxn4ma9PhGXye-0C\&q=85\&s=2b2c2fb604fd942aae8db27dbd749dfe)

The step succeeds when your Workflow's name appears under the drop area with a check mark, and the **Suggested defaults** list shows the Build's **Custom nodes**.

**4. Build with the suggested defaults**

Click **Build with defaults…**. The **Choose build targets** dialog opens.

If **Build with defaults…** is unavailable, a line under the button says why. When it reads *Add the missing models and custom nodes on their steps first.*, add what's missing:

1. Click **Customise build**.
2. Click **Next** until a step lists the missing Custom Nodes or models.
3. On each one, click **Use suggestion** or **Upload**.

To change what goes into the Build, click **Customise build** instead and go through the steps. Two steps decide what the Build holds:

* **Which custom nodes does the build need?**: choose the Custom Nodes.
* **Which models ship inside the build?**: choose which models the Build includes. A model the Build doesn't include downloads the first time a job uses it.

### Publish the Build

Publishing turns your Build into a numbered version, such as `v1`, that you can deploy now and later. Publishing is free.

1. In the **Choose build targets** dialog, keep **Serverless build** selected. It's the target that runs on Comfy Cloud.
2. Click **Publish**.

Your Build's page opens with the new version. The **Serverless build** row shows the build's progress. Building usually takes 10 to 15 minutes, and you can leave the page and come back. When the build finishes, the **Serverless build** row shows a **Deploy** button.

To come back to the version later:

1. In the **Developer Platform sidebar**, click **Deploy**.
2. In the **Builds** section, click your Build.
3. Under **Versions**, click the latest version.

> [accordion] What if the build fails?
>
> Some Custom Nodes fail to build. When that happens, the **Serverless build** row on your Build's page shows **Build failed**.
>
> 1. Open **Logs** on the row to read what failed.
> 2. Click **Edit build**, and change the Build, such as by removing the Custom Node that failed.
> 3. Publish the Build again.
>
> The row's **Debug with your agent** button opens a prompt that describes the failure. Copy it to a coding agent to repair the Build.

### Deploy and run your Workflow

A deployment is your Build running on Comfy Cloud GPUs. Deploy the Build, and then switch the Comfy Cloud editor to the deployment to run your Workflow.

1. On the **Serverless build** row, click **Deploy**. The **Deploy v1 of** *your Build's name* dialog opens.

2. Select a GPU. Each GPU shows its VRAM (GPU memory) and its price per hour.

3. If the dialog shows **Ready for the Cloud editor**, leave it selected. It's on by default.

4. Leave the other settings at their defaults. With **Always-warm workers** at `0`, the deployment turns its GPUs off when no jobs come in. By default, **Keep worker up after a job** keeps a GPU on for 3 minutes after the last job, and that idle time is billed at the GPU rate.

5. Check the **Estimated cost** panel. It shows the GPU time per hour and the model storage per month.

6. Click **Create deployment**. The deployment's page opens. Wait until the status under the deployment's name reads **Ready**.

7. In the Comfy Cloud editor, click the cloud menu to the left of **Run**. Under **Run on**, select your deployment. The editor reloads, and your tabs stay open.

   ![Run on menu open next to the Run button, with a check mark next to the selected deployment](https://mintcdn.com/dripart/oPsov_e3HUhk_xUX/images/development/deploy/selected-deployment.jpg?fit=max\&auto=format\&n=oPsov_e3HUhk_xUX\&q=85\&s=805ead9743e23cd00c44c686b3073bc4)

8. Open your Workflow, and then click **Run**. Your first job can wait while the deployment starts a GPU.

This browser keeps running your Workflows on the deployment until you select another one. To switch back, select **Comfy Cloud** in the same menu. If a Workflow has unsaved changes, the **Save your workflows before switching?** dialog opens. Click **Save and switch**, or **Switch without saving**.

## Add your own LoRA or model

The **Model Library** holds the models your workspace uploads. A model you upload runs on Comfy Cloud and on your deployments.

Before you upload a model, make sure you meet these requirements:

* **An active Pro, Creator, Team, or Enterprise plan**: your workspace needs one to upload a model.
* **A `.safetensors` file of 2 GB or less**: put larger base models, such as SDXL or Flux, in the Build.

> [!WARNING]
>
> Some deployments created before library models were available can't load them. To use library models, create a new deployment. On an older deployment, a job can fail with `Library model "<file name>" is unavailable on this deployment. Retry the job. If it still fails, contact support with the job ID.`

### Upload the model

You can upload in the Comfy Cloud editor or on the Developer Platform. Pick the tab for the place you're working in.

> [tab] Cloud editor
>
> 1. In the cloud menu to the left of **Run**, make sure **Comfy Cloud** is selected under **Run on**. On a deployment, the **Model Library** has no **Import** button.
> 2. In the **Left sidebar**, click **Model Library**, and then click **Import**.
> 3. Click **Choose a file**, or drag a `.safetensors` file into the dialog.
> 4. Under **What type of model is this?**, keep **LoRA** for a LoRA, or select the type that matches the file.
> 5. Click **Upload**. When the dialog says *Model successfully imported.*, click **Finish**.
>
>    ![Import a model dialog with my\_style\_lora\_9e2417.safetensors (97.37 MB) chosen, What type of model is this? set to LoRA, and the Back and Upload buttons](https://mintcdn.com/dripart/A-FVGUweJXUuD_Sl/images/development/serverless/library-models-editor-import.png?fit=max\&auto=format\&n=A-FVGUweJXUuD_Sl\&q=85\&s=472fb8f96344cdeca95a18dd901c48e5)
>
> To import a model from a Civitai or Hugging Face link instead:
>
> 1. In the **Import** dialog, paste the model's link in **Paste link here**.
> 2. Click **Continue**.
> 3. Under **What type of model is this?**, select the model type.
> 4. Click **Import**.
>
> A link import in another format, such as `.ckpt`, imports into the **Model Library** but doesn't run on a deployment.

> [tab] Developer Platform
>
> 1. On the **Which models ship inside the build?** step of a Build, click **Upload Models**.
> 2. Select **Workspace library**.
> 3. Drag a `.safetensors` file onto the drop area, or click the area to browse.
> 4. Under **Model type**, keep **LoRA** for a LoRA, or select the type that matches the file.
> 5. Click **Upload**.
>
>    ![Upload Models dialog on a Build's Which models ship inside the build? step, with the Public, Private, and Workspace library tabs, Workspace library selected, the drop zone, Model type set to LoRA, a line saying the file is in your workspace library, and the Cancel and Upload buttons](https://mintcdn.com/dripart/A-FVGUweJXUuD_Sl/images/development/serverless/library-models-platform-upload.png?fit=max\&auto=format\&n=A-FVGUweJXUuD_Sl\&q=85\&s=3dd2998d080ef5e98d7e7c52c2c00465)

### Use the model in your Workflow

Once the model is uploaded, you can use it on Comfy Cloud or on your deployment.

1. In the cloud menu to the left of **Run**, select where to run: **Comfy Cloud**, or your deployment.
2. Add a `Load LoRA (Model and CLIP)` Node, or open a Workflow that has one.
3. In the Node's `lora_name` list, select your file.
4. Click **Run**.

![Workflow with Load Checkpoint and Load LoRA (Model and CLIP) Nodes, the uploaded LoRA selected in lora\_name, and the queue panel's top row reading Downloading my\_style\_lora\_9e2417.safetensors 0 B of 97.37 MB](https://mintcdn.com/dripart/A-FVGUweJXUuD_Sl/images/development/serverless/library-models-editor-downloading.png?fit=max\&auto=format\&n=A-FVGUweJXUuD_Sl\&q=85\&s=7e7bb638ea4aa1f7599ca742dbcbcf09)

> [!TIP]
>
> On a deployment, the first run downloads the model, and the job's row in the queue shows `Downloading <file name>`. Later jobs on the same running GPU skip the download. A GPU the deployment starts later downloads the model again. To skip the download, add the model to the Build.

Follow these rules so a job finds your model:

* **Pick the matching type.** A loader Node lists only models of its type. A `Load LoRA (Model and CLIP)` Node lists models uploaded as LoRA.
* **Use a new file name.** If your Build already has a model with the same name, a job on your deployment uses the Build's file, not your upload.
* **Match the base model.** A LoRA must match the base model your Workflow loads.
* **Use a loader Node that Comfy Cloud has.** If the loader Node comes from a Custom Node that Comfy Cloud doesn't have, add the model to the Build.

### Change or delete a library model

When a deployment is selected under **Run on**, the **Model Library** lists only the Build's models. To change or delete a model you uploaded, [switch back to Comfy Cloud](#deploy-and-run-your-workflow) first, and then in the **Left sidebar**, click **Model Library**.

To change the model type:

1. Hover over the model's card, and then click **Model Info**.
2. Select a new **Model Type**.

> [!WARNING]
>
> Deleting a model removes it from the **Model Library** permanently. A job that still uses the file fails with a `Value not in list` error on the loader Node.

To delete the model:

1. Hover over the model's card, click **More**, and then click **Delete**.
2. In **Delete this model?**, click **Delete**.

## Stop or delete your deployment

A deployment costs storage until you delete it, even while it's stopped. Stop a deployment to keep it for later without running jobs. Delete it to stop paying for it.

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](https://mintcdn.com/dripart/oPsov_e3HUhk_xUX/images/development/deploy/deployments.jpg?fit=max\&auto=format\&n=oPsov_e3HUhk_xUX\&q=85\&s=deff6c47fd097f0e0ffe25a781b44c62)

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. Your Build and its versions stay, so you can deploy again later.

To delete the deployment:

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**.

The next time you open the editor in this browser, the editor runs your Workflows on Comfy Cloud.

## Next steps

> [card] [Library models in API requests](https://docs.comfy.org/development/serverless/overview.md#use-workspace-library-models-in-api-requests)
>
> Upload a model from a terminal and pick it per request with `lora_name`.

> [card] [Comfy API Quickstart](https://docs.comfy.org/development/serverless/quickstart.md)
>
> Call your deployment from your own code as an autoscaling endpoint.

> [card] [Usage and Limits](https://docs.comfy.org/development/deploy/cloud-usage.md)
>
> See how Comfy Cloud credits and concurrent job limits work.

> [card] [Workflow API Format](https://docs.comfy.org/development/api-development/workflow-api-format.md)
>
> Export a Workflow in the format that API requests send.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.