Files
ComfyUI/tests
Claude 27fedcd8ce Add previewable_outputs_count to the jobs API
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.
2026-07-30 06:04:18 +00:00
..
2023-09-18 23:18:06 -04:00
2023-09-18 23:18:06 -04:00

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

  1. Run an inference test to save a directory of "ground truth" images
    pytest tests/inference --output_dir tests/inference/baseline
  1. Make code edits

  2. Run inference and quality comparison tests

pytest