Commit Graph
17 Commits
Author SHA1 Message Date
benjcooley 4c665f3263 Expand secure V2 SDK surface 2026-08-31 12:50:58 -07:00
benjcooley 6f4b46a204 fix(sdk): unwrap_outputs must preserve ui/expand/block_execution
`unwrap_outputs` rebuilds a node's NodeOutput in order to swap output refs back
for real objects. It rebuilt it from the results alone — `NodeOutput(*resolved)`
— silently discarding `ui`, `expand` and `block_execution`.

The practical effect: no SDK_REFS node could be an output node. ComfyUI only
emits the `executed` websocket event, the one that delivers a node's results to
the frontend, for nodes that return ui data (`if len(output_ui) > 0`). So a
converted PreviewImage-style node executed perfectly and then displayed
nothing, with no error anywhere to explain it. `expand` (subgraph expansion)
and `block_execution` were lost the same way.

Resolving refs is a transport concern and has no business changing what the
node said. Generic fix, not specific to any backend: it applies equally to the
in-process path.
2026-08-31 12:49:46 -07:00
benjcooley 342b12ab6d feat(sdk): execution seam carries the work unit — plan.inputs/node_module, dispatch(plan, local_call, runtime)
Generic out-of-process enablement: the ExecutionPlan now ships the node's
module spec and ref-wrapped inputs, and dispatch receives the per-node host
runtime (refs/ctx/ops) so an external backend can execute the node elsewhere
and broker guest calls against the same ref table. In-process default ignores
all of it; legacy nodes unaffected (seam tests green).
2026-08-31 12:49:46 -07:00
benjcooley cf167e2b4f feat(sdk): ops-first asset interface — OpsProvider seam, SDK_REFS marshaling, raw() escape hatch
Nodes operate on assets (image.invert()) and never receive buffers; compute
runs on the trusted plane via the OpsProvider seam. Raw buffer access becomes
a permissioned, discouraged escape hatch (raw(); forces dedicated tier under
the overlay). The execution seam wraps heavy inputs as refs for SDK_REFS
nodes and resolves output refs for downstream legacy nodes. The .pyi contract
no longer imports torch.

POC stand-ins (interface debt, ledgered in the overlay repo DEBT.md):
invert/scale enumerated on OpsProvider; duck-typed wrap_inputs; SDK_REFS
class-attr opt-in.
2026-08-31 12:49:46 -07:00
benjcooley 1f07da19ac feat(sdk): wire execution seam + .pyi contract + POC node & test
- execution.py: route V3 node dispatch through providers.execution_backend
  with a behavior-preserving local_call closure (exact sync/async-task
  semantics retained); bind per-node ctx+refs inside the invocation scope so
  the concurrent-async path is correct. V1 nodes untouched. Default backend =
  in-process => byte-identical to today.
- comfy_api/latest/_sdk_public.pyi: authoritative type contract for the secure
  SDK (backend analog of the frontend comfy-api.d.ts): refs, ctx + domains,
  ctx() accessor; host/overlay seam separated.
- custom_nodes/comfy_sdk_poc: SandboxInvert POC node authored to the SDK.
- tests-unit: seam regression (sync+async SDK nodes through the real engine;
  provider-swap intercept). Verified PASS.
2026-08-31 12:49:46 -07:00
Terry Jia f938505952 feat: add VideoTrim and VideoCrop nodes with VIDEO_EDIT widget inputs (#15637) 2026-08-30 15:54:48 -07:00
Alexander Piskun d8e7bbc9d5 fix(video): remux HEVC to mp4/mov as hvc1 via hevc_mp4toannexb (#15809) 2026-08-26 20:28:50 -04:00
comfyanonymous 9db05e0e1f Add colorspace option and change bit_depth to a combo on CreateVideo. (#15810) 2026-08-22 21:07:29 -04:00
comfyanonymous 76135e557d Add HDR color space options to h264 codec in Save Video node. (#15764) 2026-08-20 20:16:31 -04:00
comfyanonymous dcbcf8c2e1 Support HDR video saving, AV1 codec, mkv and webm. (#15741) 2026-08-20 19:29:20 -04:00
comfyanonymous 2881e61610 Store mp4 metadata at the beginning of the file when possible. (#15195) 2026-08-01 03:21:28 -04:00
comfyanonymous 235b466a0c Add crf option to save video node. (#15191) 2026-08-01 00:27:48 -04:00
Alexander Piskun cc6b352511 fix(Video): stream the video transcode instead of buffering every frame in RAM (CORE-353) (CORE-351) (#14813) 2026-07-15 15:23:43 +08:00
Alexander Piskun fe54b5e955 Add 10-bit video support (#14452)
Create Video gets a bit_depth option (8-bit/10-bit); the selected depth is carried by the video and applied when it gets encoded. Save Video and Video Slice now keep the source bit depth instead of always quantizing to 8-bit, so 10-bit videos stay 10-bit. 10-bit uses h264 with the yuv420p10le pixel format,so there's no new codec or container.

Signed-off-by: bigcat88 <bigcat88@icloud.com>
2026-06-13 16:05:25 +03:00
431fadb520 fix(api-io): serialize MultiCombo multi_select as object config (#13484)
* fix(api-io): serialize MultiCombo multi_select as object config
* fix: remove dead code and redundant top-level keys from MultiCombo serialization
* fix: correct skip warning to mention comfy_entrypoint, remove nonexistent NODES_LIST
* fix: validate MultiCombo list values against options individually
* fix: gate multiselect validation on schema config, improve error message, add tests

---------

Co-authored-by: Ni-zav <ni-zav@users.noreply.github.com>
Co-authored-by: guill <jacob.e.segal@gmail.com>
2026-05-05 13:58:32 -07:00
Christian Byrne f1f9763b4c Add get_duration method to Comfy VIDEO type (#8122)
* get duration from VIDEO type

* video get_duration unit test

* fix Windows unit test: can't delete opened temp file
2025-05-15 00:11:41 -04:00
Christian Byrne cd18582578 Support saving Comfy VIDEO type to buffer (#7939)
* get output format when saving to buffer

* add unit tests for writing to file or stream with correct fmt

* handle `to_format=None`

* fix formatting
2025-05-04 23:26:57 -04:00