OSS Image Uploader
Get Your ComfyUI Output Off the Machine
- IMAGE
- url
By default, ComfyUI's output story is "PNG lands in ComfyUI/output/." That's fine when you're the only one looking. It's not fine when the images are going to a CMS, a client portal, a product feed, or a headless batch server nobody ever logs into. That's the gap this node fills: it takes the IMAGE tensor straight off the graph, pushes it into an Alibaba Cloud OSS bucket, and hands you back the public URL as a plain string.
OSS is Object Storage Service - Alibaba's answer to S3. If you're running ComfyUI on Alibaba Cloud hosting (the same company behind Wan and Qwen, and a big chunk of the rented-GPU market for this crowd), a bucket is the natural place for results to live: cheap storage, CDN in front, no USB sticks involved. Worth being clear about one thing: this node doesn't call any model API and has no billing of its own. It just writes a file to a bucket you already pay for.
How it works
Nothing clever, and that's the appeal. The node converts the IMAGE tensor to a PIL image, saves it to ComfyUI's temp directory, then hands the file to the oss2 Python SDK with your credentials and does a put_object call. It retries hard on failure - 20 attempts, three seconds apart in the code (the README says 10; trust the code). The URL comes back as https://{bucket}.{endpoint}/{path}/{filename}, which is what you wire onward.
The inputs that matter
Only eight, all required, no optional sockets:
endpoint,bucket,access_key,access_secret- your OSS region endpoint, bucket name, and an AccessKey pair. The defaults are the author's own (bucketcck-sh, pathaigc/up) - change them. They're production leftovers from the author's setup, not placeholders designed for you.path- the folder prefix inside the bucket.random_filename(default on) - names files like20241210_143052_a3k9m2p7.pngso nothing ever collides. Flip it off to usefilenameinstead.filename- only read whenrandom_filenameis off.
What comes out and where it goes
One output: a url STRING. You can read it off the node, wire it into a Show Text / text saver, or feed it into the next step of a pipeline that needs a URL rather than a file path. Many people end their "generate and ship" workflows here.
Two gotchas that will bite you
First, it always writes PNG bytes. Even if you set filename to result.jpg, the node saves with PNG format - the extension lies. If you genuinely need jpg/webp output, convert upstream. Second, it uploads only the first frame of a batch (IMAGE[0]), so a batch of eight gives you one file per run - feed one image at a time or iterate.
There's a third, subtler one: the node swallows errors. On failure it returns ("Error: ...",) instead of raising, so a bad key or dead bucket won't crash your graph - it'll quietly hand you a string starting with "Error:". If your URL looks like that, check the console log, where the node prints the real exception and the retry messages.
Installing the pack
No model downloads, no GPU hit - this is a pure network-and-disk node. ComfyUI Manager → search "ComfyUI-OSS-Upload" → install, or clone it yourself:
cd ComfyUI/custom_nodes
git clone https://github.com/ahkimkoo/ComfyUI-OSS-Upload
then restart ComfyUI. Dependencies: the README's one-liner is pip install oss2, but the shipped requirements.txt also lists scipy (the audio node in the same pack needs it). To be safe, install the whole file:
pip install -r custom_nodes/ComfyUI-OSS-Upload/requirements.txt
The security bit you shouldn't skim
The keys live in the workflow JSON, and ComfyUI's SaveImage embeds that JSON into every PNG you save - so your OSS credentials can end up inside every image and every workflow you share. Use a dedicated AccessKey limited to write-on-this-bucket (or an STS token), keep the bucket permission-tight, and don't paste this node into a shared workflow with live keys. The README's security notes say the same thing, and it's the one paragraph of this pack worth reading twice.
Reach for this node when your output has somewhere to go besides a local folder. If you save locally and post by hand, it's solving a problem you don't have. If you're on Alibaba Cloud hosting, it's the missing "Save" step.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| IMAGE | IMAGE | — | |
| endpoint | STRING | oss-cn-shanghai.aliyuncs.com | — |
| bucket | STRING | cck-sh | — |
| access_key | STRING | — | |
| access_secret | STRING | — | |
| path | STRING | aigc/up | — |
| random_filename | BOOLEAN | true | — |
| filename | STRING | image.png | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| url | STRING | — |