ComfyUI Node

GCP Storage Upload Image

Ship your outputs back to GCS — the upload half of the story

By koirpraw·Created 10 months ago·Updated 10 months ago· 1
GCP Storage Upload Image
  • images
  • gcs_urls
  • local_filenames
bucket_pathoutputs/images/
filename_prefixComfyUI
formatPNG
quality95
naming_schemetimestamp_uuid
bucket_name

The whole point of the GCP Cloud Storage Integration pack (koirpraw/ComfyUI-GCP-storage-decouple) is that your ComfyUI runs on a VM where the local disk is a cache, not a home. So generating an image is only half the job - you have to get it into the bucket before the instance disappears. That's GCP Storage Upload Image: feed it an IMAGE tensor, it encodes it, uploads it to Google Cloud Storage, and hands you back the gs:// URLs.

How it works: it takes the tensor, converts it to a PIL image, picks a filename based on the naming scheme, encodes to your chosen format, and uploads the bytes straight to the bucket - no temp file round-trip. The README is blunt about its role: "To save the output to Cloud storage, use the GCP Storage Upload Image node in your workflow."

Inputs worth caring about:

  • images - the IMAGE tensor from VAE decode.
  • bucket_path - folder in the bucket, default outputs/images/.
  • filename_prefix - default ComfyUI, prepended to every filename.
  • format - PNG, JPEG, or WEBP; quality (1–100, default 95) only affects JPEG/WEBP.
  • naming_scheme - timestamp_uuid (default) or simple_counter. The README warns you'll hit an error if you leave it blank, so always pick one. timestamp_uuid produces things like ComfyUI_20260816_120000_1a2b3c4d.png and appends _NNN for multi-image batches; simple_counter gives ComfyUI_00000.png and will happily overwrite on a re-run - use it only when you're fine with that.
  • bucket_name - optional override of the env-configured bucket.

Outputs are gcs_urls and local_filenames, both STRING (newline-joined if you feed it a batch of images). Wire gcs_urls into a text display or anything that needs the file's durable address.

The counterintuitive bit: both outputs are strings, not images - this is a sink node (marked as an output node), so it lives at the end of your workflow. Wire VAE decode into it and the graph ends there. It's the cloud-era replacement for "Save Image," with the caveat that it depends on the GCP config being right, so your first runs fail loudly rather than silently. Also worth knowing: the pack can sync outputs automatically in its transparent mode, but this node is the explicit version that always runs when you place it.

Install and config are the pack-wide story: ComfyUI Manager → search "GCP Cloud Storage" (or git clone https://github.com/koirpraw/ComfyUI-GCP-storage-decouple into custom_nodes and restart), then pip install google-cloud-storage (the pack's requirements.txt does this), and set GCP_PROJECT_ID, GCP_STORAGE_BUCKET, plus credentials via GOOGLE_APPLICATION_CREDENTIALS or GCP_CREDENTIALS_JSON.

Failures here are almost always auth: 403 means the service account can't write (grant roles/storage.objectAdmin on the bucket), 404 means the bucket name is wrong, DefaultCredentialsError means the credential env var is broken, and a missing google.cloud module means you skipped the install. And yes - leaving naming_scheme empty really does error; it's the pack's most avoidable footgun.

CategoryGCP Storage

Inputs (7)

NameTypeDefaultDescription
imagesIMAGE
bucket_pathSTRINGoutputs/images/Path in bucket to store images
filename_prefixSTRINGComfyUIPrefix for generated filenames
formatCOMBOPNG3 options: PNG, JPEG, WEBP
qualityINT951–100Quality for JPEG/WEBP
naming_schemeCOMBOtimestamp_uuidUnique naming: timestamp_uuid or simple counter
bucket_nameoptSTRINGOverride default bucket name

Outputs (2)

NameTypeDescription
gcs_urlsSTRING
local_filenamesSTRING