mirror of
https://github.com/Comfy-Org/ComfyUI.git
synced 2026-09-29 09:28:35 -05:00
`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.
Pytest Unit Tests
Install test dependencies
pip install -r tests-unit/requirements.txt
Run tests
pytest tests-unit/