Skip to content

v0.2.0

Choose a tag to compare

@mattmillerai mattmillerai released this 10 Sep 20:24
· 11 commits to main since this release
Immutable release. Only release title and notes can be modified.
272574f

Uploaded assets get a directly-fetchable URL, and an error answered by something in front of the service now says so — and keeps the one line that explains it.

Highlights

Asset.get_download_url() / AsyncAsset.get_download_url(). A directly-fetchable URL for an uploaded asset's bytes, mirroring Output.get_download_url() (same DownloadUrl, commits the asset first if needed). On Comfy Cloud it is a short-lived signed URL any fetcher can read until expires_at, which is what lets a local image be passed to a URL-taking image-to-image model via client.models.run(): upload the file as an asset, resolve its URL, put the URL in the model's input. The README's "Image to image — upload an asset first" section walks through the flow.

An error nothing in the stack recognised names its status. Such a response now carries .code == "http_<status>" (http_503, http_500) instead of "error". It is reached only after the envelope's own code, Router's error bucket and the status table have all declined, so a bare 401 still maps to Unauthorized and every documented code is untouched. Read it as answered by something in front of Router rather than by the service itself, so no service verdict was reached; retry per your own policy — nothing about what the SDK retries changed.

The body that explains a bare 503 is kept. A load balancer's no healthy upstream or upstream connect error or disconnect/reset before headers arrives as plain text with no JSON and no request id, and used to be discarded with the response. It is now on comfy_low.errors.ApiError.body_excerpt, and str() of the exception you catch — at both the protocol and the SDK layer — reads HTTP 503: no healthy upstream. The excerpt is one line, capped at 256 characters, with control, bidi and zero-width characters replaced, and it is None whenever the response stated a message of its own.

Upgrading

Additive except for one string: code that matched the literal "error" on an unrecognised ComfyError should match code.startswith("http_") instead.

Full detail in CHANGELOG.md.