GCP Storage List Files
Browse your GCS bucket from inside ComfyUI — no gsutil, no terminal
- file_list
Before you can download a model or an image out of your bucket, you need to know what's in it and what the exact gs:// path is. That's this node's whole job: list files in Google Cloud Storage from inside the graph and hand you the paths as one text blob you can eyeball or copy. It's part of the GCP Cloud Storage Integration pack (koirpraw/ComfyUI-GCP-storage-decouple), which exists to let ComfyUI run on a cloud VM where the local disk is just a cache.
How it works: it lists blobs under a prefix. bucket_path is that prefix - the path to filter on. Leave it empty and it lists from the root of the bucket; set it to models/checkpoints/ and you get just that folder's objects. Two optional inputs round it out: bucket_name to override the bucket from your env config (it defaults to GCP_STORAGE_BUCKET), and max_results (1–1000, default 100) to cap how many objects come back. It returns a single file_list (STRING) with one gs://bucket/object per line.
Note the shape of that output: one string with newlines, not a true list. Wire it into any text/string display node to read it, and if you want to pull a single path out, copy it from the preview or run it through a string-splitting utility. This is a browsing tool more than a data source - its job is to tell you what exists so you can feed exact paths into the pack's download nodes.
Honest take: if you keep your bucket tidy, you'll use this rarely. But the first time you're staring at a blank GCP Storage Download Model field wondering whether the file lives at models/checkpoints/foo.safetensors or models/foo.safetensors, this node answers it in one click. It's also a decent auth sanity check: if listing works, your credentials are fine, and any download failure from here on is a path problem, not a permission problem.
Install via ComfyUI Manager (search "GCP Cloud Storage"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/koirpraw/ComfyUI-GCP-storage-decouple
then restart ComfyUI and make sure the Google deps are installed (pip install google-cloud-storage, per the pack's requirements.txt). The node reads the standard env config: GCP_PROJECT_ID, GCP_STORAGE_BUCKET, and credentials via GOOGLE_APPLICATION_CREDENTIALS or GCP_CREDENTIALS_JSON.
Troubleshooting is the same short list as the rest of the pack: listing needs at least roles/storage.objectViewer on the bucket, so a 403 Forbidden means the service account is too locked down - grant it read on that bucket. DefaultCredentialsError means the credential env var is missing or pointing at a bad key file. 404 means the bucket name doesn't exist in your project. And if the output looks shorter than you expected, check max_results - 100 is the default ceiling, and a busy bucket fills it fast.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| bucket_path | STRING | Path prefix to filter files | |
| bucket_nameopt | STRING | Override default bucket name | |
| max_resultsopt | INT | 1001–1000 | Maximum number of files to list |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| file_list | STRING | — |