Nodes/comfyui-zegr/ZEGR_ALI_UF
ComfyUI Node

ZEGR_ALI_UF

Push a Model to Alibaba OSS Without Leaving ComfyUI

By Positliver·Created 2 years ago·Updated 2 years ago· 1
ZEGR_ALI_UF
    • upload_status
    file_path
    bk_nametempres
    key
    endpointhttp://oss-cn-shanghai.aliyuncs.com

    If you've ever trained or generated a finished model on a box with no public IP - a rented GPU instance, a lab machine - and then spent an hour trying to scp it somewhere useful, ZEGR_ALI_UF is the node that turns that whole dance into one boring step. It uploads a file to Alibaba Cloud OSS (think Alibaba's S3) straight from your graph. This is the node the entire comfyui-zegr pack exists for; the README is literally one line: "Convenient to share models to Ali OSS." That's the whole pitch, and the node does exactly that.

    It's a pure file operation. No GPU, no sampler, no model download. It runs when the graph runs, pushes a file to a bucket, and hands you back a status string. If you don't use Alibaba Cloud, skip this one - but if you do, it's a tidy little end-of-workflow finishing move.

    What you actually set

    • file_path - the full path to whatever you're uploading. Wire it from ZEGR_LF (same pack) to pick a model out of ComfyUI's model folders, or type any absolute path.
    • bk_name - your OSS bucket name. The default tempres is a placeholder; put your real bucket here, and make sure it already exists in the OSS console. The node uploads into a bucket; it doesn't create one.
    • key - the fiddly one. It's AccessKeyId,AccessKeySecret - both halves of an Alibaba Cloud access key, comma-separated, in one string. Get the format wrong and the upload dies silently (see below).
    • endpoint - defaults to the Shanghai endpoint (http://oss-cn-shanghai.aliyuncs.com). Your bucket's region has to match, or the request goes nowhere.

    Output is upload_status, a STRING that reports Upload successful: File 'name' with key '...' or one of the failure messages.

    How it works

    The node splits key on the comma, builds an oss2.Auth from the two halves, connects an oss2.Bucket to your endpoint and bucket name, then calls put_object_from_file. The object key is always {today's date}/{filename} - so a file uploaded on 2026-08-16 lands at 2026-08-16/my-lora.safetensors. One detail worth knowing: the OSS SDK is vendored inside the pack's third_party/ folder, so there's no separate pip install oss2. The requirements.txt pulls in crcmod, pycryptodome, and the Alibaba SDK core packages, which Manager installs for you.

    Where people get burned

    The node's try/except swallows the real error. Any exception becomes a generic "Upload failed: An error occurred", so debugging is the boring checklist: does the file exist, does key have both halves with the comma, is the bucket name right, does the endpoint region match the bucket? Also note that uploading the same filename twice on the same day silently overwrites - the date-folder object key has no collision protection, so keep names unique or expect last-one-wins.

    One genuinely important warning: your access key sits in the workflow as a plaintext widget. Workflows save as JSON and get shared around - a shared workflow is a shared key. Use a RAM sub-account with PutObject-only permission scoped to a single bucket, never a root key, and rotate it.

    Install

    ComfyUI Manager → search comfyui-zegr → Install → restart. Or the manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Positliver/comfyui-zegr
    

    Restart ComfyUI and the node shows up under File Operations. It has zero model downloads and no heavy dependencies - it's about as lightweight as custom nodes get.

    CategoryFile Operations

    Inputs (4)

    NameTypeDefaultDescription
    file_pathSTRING
    bk_nameSTRINGtempres
    keySTRING
    endpointSTRINGhttp://oss-cn-shanghai.aliyuncs.com

    Outputs (1)

    NameTypeDescription
    upload_statusSTRING