Skip to content

fix(jobs): prefer media over text for job preview_output#14681

Open
DeniDoman wants to merge 1 commit into
Comfy-Org:masterfrom
DeniDoman:fix/jobs-preview-prefer-media-over-text
Open

fix(jobs): prefer media over text for job preview_output#14681
DeniDoman wants to merge 1 commit into
Comfy-Org:masterfrom
DeniDoman:fix/jobs-preview-prefer-media-over-text

Conversation

@DeniDoman

Copy link
Copy Markdown

Addresses #14680

get_outputs_summary shared a single fallback slot between text and
non-output media, so a text node iterated before an image (e.g. a temp
preview) claimed the preview and masked the image, surfacing a text
cover for mixed image+text jobs. Give text its own lowest-priority slot
so a media thumbnail always wins; text is used only when the job
produced no image/video/audio/3d output.

Adds coverage for the previously-untested text preview path.
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: fa931f8f-bd95-4fee-883d-971608734949

📥 Commits

Reviewing files that changed from the base of the PR and between a58473f and 9a5d582.

📒 Files selected for processing (2)
  • comfy_execution/jobs.py
  • tests/execution/test_jobs.py

📝 Walkthrough

Walkthrough

In comfy_execution/jobs.py, the get_outputs_summary function is updated to separate text-only preview selection from other media fallbacks. A new text_fallback variable is introduced; text outputs are now assigned to it instead of the shared fallback_preview. The return expression is extended to fall back to text_fallback only when neither preview_output nor fallback_preview is set. Two new unit tests are added to verify that media outputs take priority over text outputs for preview selection, and that text is used only when no media output exists.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the change to prefer media previews over text in job preview selection.
Description check ✅ Passed The description is related because it references the issue this preview-selection fix addresses.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant