mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-31 03:17:23 +08:00
Pass-through SaveImage variant with accumulating previews and a promote/lock feature. The node: - Saves images and passes the input tensor through as the output, so it fits naturally mid-graph (unlike core SaveImage which is a sink). - Exposes an 'accumulate' flag, mirroring upstream PR #12647 — the frontend uses this to append previews to a per-node gallery instead of replacing it. - Accepts an optional 'promoted_asset_ref' STRING widget that the frontend writes when the user clicks a 'lock' UI on a preview. When set, the node skips saving, loads the referenced image from output/input/temp, and outputs that image. Stale refs silently fall back to pass-through. - IS_CHANGED returns a ref-derived key (incl. file mtime) when locked, so re-queues with the same lock are cache hits and upstream ancestors are skipped. Unlocked, it defers to normal input-signature caching. Includes unit tests covering ref parsing (incl. path-traversal and symlink-escape rejection), path resolution, pass-through and locked execution, and IS_CHANGED behavior. 24/24 pass; ruff clean. |
||
|---|---|---|
| .. | ||
| app_test | ||
| assets_test | ||
| comfy_api_test | ||
| comfy_extras_test | ||
| comfy_quant | ||
| comfy_test | ||
| execution_test | ||
| folder_paths_test | ||
| prompt_server_test | ||
| seeder_test | ||
| server/utils | ||
| server_test | ||
| utils | ||
| deploy_environment_test.py | ||
| feature_flags_test.py | ||
| README.md | ||
| requirements.txt | ||
| websocket_feature_flags_test.py | ||
Pytest Unit Tests
Install test dependencies
pip install -r tests-unit/requirements.txt
Run tests
pytest tests-unit/