mirror of
https://github.com/Comfy-Org/comfy-python-sdk.git
synced 2026-11-04 23:37:47 +00:00
[PR #142] [MERGED] feat(assets): add Asset.get_download_url and document Router image-to-image #142
Labels
No labels
audit:ai-readiness
audit:community
audit:github
audit:health-scoring
audit:policy
audit:release
audit:supply-chain
effort:medium
effort:small
effort:small
effort:trivial
priority:nice-to-have
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-python-sdk#142
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-python-sdk/pull/142
Author: @robinjhuang
Created: 9/10/2026
Status: ✅ Merged
Merged: 9/10/2026
Merged by: @mattmillerai
Base:
main← Head:claude/pensive-bell-5db52q📝 Commits (3)
03c84bbfeat(assets): add Asset.get_download_url and document Router image-to-imagef3b57fcfix: address bot review comments88f50e9Merge remote-tracking branch 'origin/main' into claude/pensive-bell-5db52q📊 Changes
4 files changed (+161 additions, -1 deletions)
View changed files
📝
CHANGELOG.md(+12 -0)📝
README.md(+62 -0)📝
src/comfy_sdk/assets.py(+37 -0)📝
tests/test_assets.py(+50 -1)📄 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.get_download_url()existed,Assethad nothing.Asset.get_download_url()/AsyncAsset.get_download_url(): commits the asset if needed (hash → dedup probe → upload), then resolves the sameDownloadUrlanOutputreturns — a short-lived, self-authorizing signed URL on Cloud/serverless, or the auth-guarded content endpoint (withexpires_at=None) on self-hosted.get_download_url()→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 reaching into
comfy_low) way to feed a local image to a Router image-to-image model. A matching docs.comfy.org page and a mirror change in the TypeScript SDK (Asset.getDownloadUrl()) are in flight; the docs page's Python snippet depends on the release that carries this.Validation
Full local CI suite green:
ruff check,ruff format --check,mypy src,pytest(721 passed, 4 skipped), andcheck_public_repo_hygiene.py.🤖 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.