mirror of
https://github.com/Comfy-Org/comfy-typescript-sdk.git
synced 2026-11-04 23:47:27 +00:00
[PR #132] [MERGED] feat(assets): add Asset.getDownloadUrl for Router image-to-image inputs #134
Labels
No labels
audit:ai-readiness
audit:community
audit:github
audit:health-scoring
audit:policy
audit:release
audit:supply-chain
bug
cursor-review-pin
effort:medium
effort:small
effort:trivial
priority:nice-to-have
priority:recommended
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-typescript-sdk#134
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/comfy-typescript-sdk/pull/132
Author: @robinjhuang
Created: 9/10/2026
Status: ✅ Merged
Merged: 9/10/2026
Merged by: @mattmillerai
Base:
main← Head:claude/asset-get-download-url📝 Commits (2)
7ba2ae9feat(assets): add Asset.getDownloadUrl for Router image-to-image inputs5c6a44bfix: address bot review comments📊 Changes
4 files changed (+125 additions, -0 deletions)
View changed files
📝
CHANGELOG.md(+12 -0)📝
README.md(+62 -0)📝
src/sdk/assets.test.ts(+25 -0)📝
src/sdk/assets.ts(+26 -0)📄 Description
What
An image-to-image call through Comfy Router needs the input image in the form the model's native schema takes. For URL-taking models (e.g.
wan/wan2.5-i2i-preview'sinput.images) that means a URL the provider can fetch, which a local file doesn't have. Uploaded assets already resolve one server-side (the sameGET /api/v2/assets/{id}/contentendpoint outputs use), but the publicAssethandle never exposed it —Output.getDownloadUrl()existed,Assethad nothing.Asset.getDownloadUrl(signal?): commits the asset if needed (hash → dedup probe → upload), then resolves the same{ url, expiresAt }anOutputresolves to — a short-lived, self-authorizing signed URL on Cloud/serverless, or the auth-guarded content endpoint (withexpiresAt: null) on self-hosted. MatchesAsset.get_download_url()in the Python SDK (Comfy-Org/comfy-python-sdk#142); the surface-parity check only coversmodelsmethods and error classes, so no snapshot change is needed.getDownloadUrl()→comfy.models.runwith a URL-taking model, the base64-inline alternative for models likebfl/flux-2-pro, and a pointer from the assets section.Why
There was no documented (or possible, without dropping to the low layer) way to feed a local image to a Router image-to-image model. A matching docs.comfy.org page is in flight; its TypeScript snippet depends on the release that carries this.
Validation
Full local CI suite green:
pnpm lint,pnpm format:check,pnpm typecheck,pnpm test(434 passed),pnpm check:spec-drift,check-public-repo-hygiene.mjs, andpnpm build.🤖 Generated with Claude Code
https://claude.ai/code/session_01WLwhWvHT34Df3199cAAooJ
Generated by Claude Code
Summary by CodeRabbit
New Features
Documentation
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.