Nodes/ComfyUI-MinioConnector/Minio Create Bucket If Not Exists ๐Ÿ‘
ComfyUI Node

Minio Create Bucket If Not Exists ๐Ÿ‘

Make sure the bucket exists before your upload runs โ€” without ever failing twice

By MieMieeeeeยทCreated about a year agoยทUpdated about a year agoยท 5
Minio Create Bucket If Not Exists ๐Ÿ‘
  • minio_connector
  • bucket_name
  • log
โ—„bucket_nameโ–บ

This is the pack's little housekeeping node, and it solves a genuinely annoying failure mode: uploading to a bucket that doesn't exist yet. In MinIO you don't get buckets for free - creating one is a separate admin action - and if your workflow targets a fresh server, the first run of an upload node dies with an S3Error about a missing bucket. Slap this node in front and that class of error stops being a thing.

What it does. It takes your minio_connector and a bucket_name, checks whether the bucket exists, creates it if it doesn't, and leaves it alone if it already does. Idempotent in the way that actually matters: run the workflow a hundred times and the hundredth run behaves exactly like the first, no "bucket already exists" tantrum.

The inputs are just the two you'd expect:

  • minio_connector - from InitMinioConnector.
  • bucket_name - the name you want to guarantee exists. Empty string raises an error, which is fine: a nameless bucket check would be a silent no-op, and this one chooses to yell instead.

The interesting part is the two outputs. It returns both bucket_name (a plain STRING) and log. That first output is the neat trick: it passes the bucket name through, so you can wire it straight into MinioUploadFile or MinioDownloadBucket without re-typing the name on every node. You type the bucket once, at this node, and it flows. Combined with InitMinioConnector upstream, the whole "get a bucket ready and put stuff in it" chain becomes one clean line of nodes.

How it works. Under the hood it calls the MinIO SDK's bucket_exists and, when needed, make_bucket, wrapped in an S3Error handler that reports failure as a log line instead of a crash. One caveat worth knowing: "if not exists" isn't magic. If the bucket name is taken by someone else's account, or your credentials lack s3:CreateBucket permission, the create fails and you get the failure in the log. On a single-tenant home MinIO install that's rarely a problem, but shared servers can be pickier.

Install. This pack installs once for all its nodes. ComfyUI Manager, search "ComfyUI-MinioConnector", restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/MieMieeeee/ComfyUI-MinioConnector
cd ComfyUI-MinioConnector
pip install -r requirements.txt

No models, no heavy deps - just the minio client. If the node doesn't show up after install, restart ComfyUI fully; half-loaded packs after a missing dependency are the usual culprit.

Bottom line: it's the least glamorous node in the pack and one of the most useful, purely because it removes a whole class of first-run failures from your workflows.

Category๐Ÿ‘ Minio-Connector/๐Ÿ‘ Minio Connector

Inputs (2)

NameTypeDefaultDescription
minio_connectorMINIO_CONNECTORโ€”
bucket_nameSTRINGโ€”

Outputs (2)

NameTypeDescription
bucket_nameSTRINGโ€”
logSTRINGโ€”