mirror of
https://github.com/Comfy-Org/comfy-remote-nodes.git
synced 2026-11-04 23:37:22 +00:00
[PR #12] [MERGED] feat(serialization): tighten batch dispatch + accept response-side batch URIs #13
Labels
No labels
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-remote-nodes#13
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-remote-nodes/pull/12
Author: @Kosinkadink
Created: 5/15/2026
Status: ✅ Merged
Merged: 5/15/2026
Merged by: @Kosinkadink
Base:
main← Head:feat/batch-uri-followups📝 Commits (1)
35b8a3bfeat(serialization): tighten batch dispatch + accept response-side batch URIs📊 Changes
3 files changed (+420 additions, -4 deletions)
View changed files
➕
notes/run_batch_uri_followups.py(+352 -0)📝
proxy_node.py(+48 -2)📝
serialization.py(+20 -2)📄 Description
Follow-up #2 / #3 / #4 to PRs #9 (
feat/batch-envelope-externalization) and #10 (feat/image-max-batch-rule).Three small cleanups identified during the post-PR review pass:
1. Encoding-keyed dispatch in
maybe_externalizeThe batch branch now keys off
encoding == "png_base64_batch"instead of the presence of aframesfield. The oldisinstance(frames, list) and framesheuristic would silently take the batch path on a malformed envelope that mixed both fields and externalise garbage under a non-batch encoding.2. Empty
frames=[]is now a hard errorAn empty / missing
frameslist on apng_base64_batchenvelope raisesRnpProtocolError(INTERNAL)rather than silently no-op-ing through to the wire (where the server'sresolve_image_envelope_pngsrejects it after the round trip anyway). Mirrors the server-sidemake_image_batch_envelopecontract: an empty batch is a hard wire bug.3. Response-side
png_base64_batch_uridecoderproxy_node._deserialize_outputnow accepts the externalised batch shape on the response path. No server emits this shape today — this is purely future-proofing the symmetric counterpart of the request-side externalisation. The decoder owns the symmetry: any envelope shape the client may externalise on the way out, the client must also accept on the way in.Per-frame URIs are fetched in parallel via
asyncio.gatherso a 9-frame batch import is one round-trip rather than N. Frame ordering is preserved (gather returns positional results) — the IMAGE tensor's batch axis carries semantic order. Fetched bytes are re-stamped as inlineframesso the existing_decode_image_batch_envelopepath handles them uniformly.Verification
New smoke
notes/run_batch_uri_followups.pyexercises all three changes (encoding-keyed dispatch, empty-frames hard-error, response-side batch URI parallel fetch + ordering):Existing
notes/run_image_max_batch.pystill passes.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.