mirror of
https://github.com/Comfy-Org/ComfyUI.git
synced 2026-08-05 18:05:08 +08:00
outputs_count (get_outputs_summary) counts every output item across all nodes for a job, including non-previewable files (e.g. SaveLatent's .latent file). The Media Assets sidebar badge reads outputs_count, but the expanded asset view only ever renders previewable outputs (image, video, audio, 3D, text), so the badge can show a higher number than what a user sees when they drill in. Add count_previewable_outputs(), reusing the existing is_previewable() filter, and expose it as previewable_outputs_count on /api/jobs job entries (list, detail, and queue placeholders). get_outputs_summary() and outputs_count are left untouched so the true total stays available.
Automated Testing
Running tests locally
Additional requirements for running tests:
pip install pytest
pip install websocket-client==1.6.1
opencv-python==4.6.0.66
scikit-image==0.21.0
Run inference tests:
pytest tests/inference
Quality regression test
Compares images in 2 directories to ensure they are the same
- Run an inference test to save a directory of "ground truth" images
pytest tests/inference --output_dir tests/inference/baseline
-
Make code edits
-
Run inference and quality comparison tests
pytest