Vast.ai Lease Configuration
Rent the exact GPU your workflow needs, right from the canvas
Ever built a workflow your own GPU can't fit - a video model, a 34B Qwen on 12GB of VRAM - and wished you could rent a bigger card from inside ComfyUI instead of uploading to some web UI and praying? That's the whole pitch of the Modal Sync pack (ttulttul/ComfyUI-Modal), and VastAILeaseConfiguration is the knob that tells its scheduler what to rent on Vast.ai.
The name is accurate but understated: this node does no compute. It's a declaration. You drop one (or several) on the canvas, leave it completely disconnected - no wires, ever - and at queue time the pack's planner reads it as a "capacity pool" it's allowed to rent from. Want a fast expensive card for one job and a cheap one for another? Drop two with different settings and the scheduler picks per workflow. The disconnect is deliberate: it's a configuration document, not a pipeline stage, so nothing flows through it.
How it actually works
When you queue a workflow with its provider policy set to Vast.ai only or Automatic, the planner collects every Vast config node, searches the marketplace for each distinct profile (up to eight searches in parallel), and ranks matching on-demand offers by predicted cost. Here's the smart part: it raises each pool's VRAM and RAM floors to whatever the workflow's actual models need before searching, so a 24GB profile doesn't "win" for a checkpoint that needs 48GB. An existing managed lease gets credit for the retention time you've already paid, so reusing capacity beats renting fresh. Marketplace results are cached in-process for 60 minutes; restart ComfyUI to clear the cache.
The node validates your profile when executed but produces no output - it's marked is_output_node in the schema with zero outputs, which is why nothing plugs into it.
The inputs that matter
Most fields are minimums the marketplace offers must clear. You'll realistically touch these four, then forget the rest:
- profile_name - a unique, workflow-local name for the pool (letters, digits, dots, underscores, hyphens, max 63 chars). This is how the scheduler and the lease registry identify the pool.
- gpu_count - exact number of GPUs to rent (1–8, default 1).
- minimum_gpu_vram_gb - minimum nameplate VRAM per GPU (default 24).
- maximum_hourly_cost_usd - the hard cap on total hourly price (default $1.00). That default is a starting point, not a budget: a 24GB card on Vast typically costs more than a buck an hour, so if nothing ever matches, this is the first thing to raise.
The long tail of advanced fields is Vast's own filter language: minimum_reliability (default 0.99), verified_hosts_only (default true), minimum_offer_duration_days, minimum_download_mb_per_second, minimum_dlperf, and the optional allowed_geolocations ("US, CA" if you want regional pinning). Two to actually read before renting: allocated_disk_gb - Vast won't let you resize it after creation - and idle_retention_hours (default 24), because Vast bills you during the idle window, after which an in-instance watchdog destroys the lease.
What it needs before it does anything
The node is one layer; the pack needs three things configured before Vast works at all, all via environment variables (never stored in the workflow):
export COMFY_MODAL_EXECUTION_MODE=remote
export VAST_API_KEY='your-vast-api-key'
export COMFY_MODAL_VAST_IMAGE='ghcr.io/owner/comfy-modal-worker@sha256:...'
You build that worker image yourself and push it to a registry (public images only, for now - private registry credentials deliberately aren't supported):
uv run python scripts/build_vast_worker_image.py --push
Then verify credentials and watch lease activity under Settings → Remote Execution: Vast.ai leases.
Install
It's a pack install, not a node install: grab the whole Modal Sync pack under custom_nodes/ and restart.
cd ComfyUI/custom_nodes
git clone https://github.com/ttulttul/ComfyUI-Modal
Or use ComfyUI Manager and search for Modal Sync (registry name modal-sync). Build workflows first in local mode - COMFY_MODAL_EXECUTION_MODE=local exercises the whole pipeline with no credentials and no bill - then flip to remote when you're ready to spend.
Where people get burned
- It's alpha. The README says so in a warning at the top: missing features, rough edges, breaking changes. Don't build a production pipeline on it yet.
- Set the policy. A config node sitting on the canvas does nothing until the workflow's provider policy is Vast.ai only or Automatic (right-click → Remote Execution, or workflow metadata).
- Disk is forever. Wrong
allocated_disk_gbmeans destroying the lease and re-renting. - Idle leases cost money. Keep
idle_retention_hoursshort or remember the watchdog's deadline. Check the leases panel before walking away. - Boundary errors are queue-time. If the planner says a
MODEL/CLIP/VAEcan't cross the local/remote boundary, mark the upstream producer remote too.
It's early, it's fiddly, and it will happily spend your money if you let it - but the ability to say "give me an 80GB GPU for the next hour, priced like this, only in the US" from a disconnected canvas node is genuinely novel. Nothing else treats Vast capacity as a first-class graph citizen.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| profile_name | STRING | vast-default | Unique workflow-local name for this Vast capacity pool. |
| gpu_count | INT | 11–8 | Exact number of GPUs to rent. |
| minimum_gpu_vram_gb | FLOAT | 240–1024 | Minimum nameplate VRAM required on each GPU. |
| minimum_total_tflops | FLOAT | 00–100000 | Minimum theoretical aggregate TFLOPS. Leave zero to avoid filtering on theoretical compute. |
| minimum_cpu_ram_gb | FLOAT | 641–4096 | Minimum system RAM for the rented instance. |
| allocated_disk_gb | FLOAT | 2008–10000 | Instance disk allocation. Vast does not allow resizing it after creation. |
| maximum_hourly_cost_usd | FLOAT | 1.000.001–128 | Hard maximum total hourly offer price in USD. |
| idle_retention_hours | FLOAT | 240–8760 | Keep the running instance after its last activity for this many hours, then destroy it. Vast bills during this period. |
| minimum_cpu_cores | FLOAT | 81–1024 | Minimum effective CPU core allocation. |
| minimum_dlperf | FLOAT | 00–100000 | Optional Vast DLPerf floor; zero disables this filter. |
| minimum_download_mb_per_second | FLOAT | 1000–100000 | Minimum advertised internet download rate in MB/s. |
| minimum_reliability | FLOAT | 0.9900–1 | Minimum Vast host reliability score. |
| minimum_offer_duration_days | FLOAT | 70–365 | Require the offer to remain available for at least this long. This is separate from idle retention. |
| verified_hosts_only | BOOLEAN | true | Exclude unverified Vast marketplace hosts. |
| maximum_instances | INT | 11–16 | Maximum simultaneously managed instances for this pool. |
| allowed_geolocationsopt | STRING | Optional comma-separated Vast locations or country codes, such as US, CA. Blank allows all locations. |
Outputs (0)
No outputs