Add unit tests for diffusion model eval branch in eval_cli.py#1524
Closed
Copilot wants to merge 2 commits intoxinhe/3-10from
Closed
Add unit tests for diffusion model eval branch in eval_cli.py#1524Copilot wants to merge 2 commits intoxinhe/3-10from
Copilot wants to merge 2 commits intoxinhe/3-10from
Conversation
9 tasks
Co-authored-by: xin3he <83260933+xin3he@users.noreply.github.com>
Contributor
Author
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot
AI
changed the title
[WIP] Address feedback on enabling --eval for diffusion model
Add unit tests for diffusion model eval branch in eval_cli.py
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The diffusion-model eval branch (
is_diffusion_model→diffusion_load_model→evaluate_diffusion_model) ineval_cli.eval()had no test coverage. Adds lightweight unit tests that monkeypatch these functions to verify the branch is taken correctly without requiring diffusers or model downloads.New test class
TestEvalDiffusionModelBranchintest/test_cpu/advanced/test_evaluation_functions.py:test_diffusion_branch_taken— patchesis_diffusion_modelto returnTrue, assertsdiffusion_load_modelis called with the model path andevaluate_diffusion_modelis called with(args, pipe=pipe)test_non_diffusion_model_skips_branch— patchesis_diffusion_modelto returnFalse, assertsevaluate_diffusion_modelis never invokedType of Change
Related Issues
Relates to #1522
Checklist Before Submitting
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.