GCP Storage Download Model
Grab a model from Google Cloud Storage on demand — and get a real local path back
- local_path
Models are the worst thing about running ComfyUI on a cloud VM with a small disk. A checkpoint is gigabytes, and ten checkpoints will finish your boot disk. The GCP Storage Download Model node from the koirpraw/ComfyUI-GCP-storage-decouple pack is the pull-it-when-you-need-it escape hatch: give it a gs:// path, it downloads the file to a local path, and hands you that path as a string.
How it works: you set gcs_path - the full gs://bucket/path/to/model.safetensors, and it has to start with gs:// - plus local_path, where the file should land locally. Leave local_path empty and it drops the file in ComfyUI's temp directory under its original filename. The node parses the bucket and blob name, creates the directory if needed, streams the file down with blob.download_to_filename, and returns the absolute local_path (STRING) as its only output.
Where people get burned: ComfyUI's standard loaders - CheckpointLoaderSimple, LoraLoader, VAELoader - pick files by name from inside models/... folders; they don't accept arbitrary paths. If you let this node dump a checkpoint into temp and then try to wire that local_path string into a checkpoint loader, you'll wonder where it went. The fix is to set local_path to a real path under your models directory, e.g. models/checkpoints/my_model.safetensors. Download it there and it shows up in the loader dropdown like any other file (refresh the node list first). If you're handing the path to a script or a path-taking utility node, temp is fine.
Two more notes. First, the pack also has a transparent mode: set COMFYUI_ENABLE_GCP_STORAGE=true plus the env vars and it patches ComfyUI's folder handling so models get pulled from the bucket automatically when a loader asks for them, with a local cache so repeat loads are fast. This node is the explicit, manual version of the same idea - you reach for it when you want control over exactly what lands where. Second, downloads here aren't resumable: if a 6 GB model dies at 90% (spot instance, network hiccup), re-running starts from zero. Do big one-time transfers with gsutil - the README's own recommendation - and use this node for the occasional on-demand pull.
Install via ComfyUI Manager (search "GCP Cloud Storage"), or clone:
cd ComfyUI/custom_nodes
git clone https://github.com/koirpraw/ComfyUI-GCP-storage-decouple
Restart, then install the Google dependencies (google-cloud-storage and friends; the pack's requirements.txt handles it). Configure GCP_PROJECT_ID, GCP_STORAGE_BUCKET, and credentials via GOOGLE_APPLICATION_CREDENTIALS or GCP_CREDENTIALS_JSON. setup_gcp_storage.sh automates the bucket and service account if you have gcloud.
Auth errors dominate troubleshooting: DefaultCredentialsError means bad or missing credentials, 403 means the service account needs roles/storage.objectAdmin on the bucket, 404 means a wrong bucket name, and a missing google.cloud module means you didn't pip install. Since this node reads real cloud credentials from your environment, keep the service account scoped to one bucket and keep ComfyUI off the open internet.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| gcs_path | STRING | gs://bucket-name/models/model.safetensors | Full GCS path to model |
| local_path | STRING | Local path to save model (empty for temp) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| local_path | STRING | — |