Repository navigation
Conversation
murthy-l
force-pushed
the
feat/diffusion-image-quality-metrics
branch
3 times, most recently
from
September 17, 2026 05:51
ebd4857 to
00fcb55
Compare
msinnha1
reviewed
Sep 21, 2026
| "cases": { | ||
| "flux2_dev_image_t2i": { | ||
| "_comment": "Carried over from the previous inline XPU guard, which asserted raw cosine >= 0.20; same gate on the 100*cosine scale, kept so this case is not silently weakened. Read it as a smoke floor on one fixed prompt, not a quality gate: a black frame scores 17.2-25.3, which is inside the range healthy images occupy. clip_iqa/image_reward are unmeasured for FLUX.2-dev, so they stay unenforced.", | ||
| "min_clip_score": 20.0 |
There was a problem hiding this comment.
this seems contradicting with the finding of black frame clip_score of 17.2-25.3
Contributor
Author
There was a problem hiding this comment.
Addressed it, made it 25 and test is passing for 100 images.
murthy-l
force-pushed
the
feat/diffusion-image-quality-metrics
branch
2 times, most recently
from
September 24, 2026 16:51
cedc538 to
3264202
Compare
murthy-l
force-pushed
the
feat/diffusion-image-quality-metrics
branch
3 times, most recently
from
September 25, 2026 09:09
8835a8e to
8b229dd
Compare
murthy-l
force-pushed
the
feat/diffusion-image-quality-metrics
branch
2 times, most recently
from
September 27, 2026 07:03
d011f0c to
872989c
Compare
murthy-l
marked this pull request as ready for review
September 27, 2026 16:46
Add test/registered/xpu/test_xpu_flux2_klein.py, a manual 1-GPU test
for FLUX.2-klein-4B and -9B on Intel XPU (bf16, 4 steps, 1024x1024).
- t2i: one fixed prompt, gated on CLIP score (clip-vit-base-patch32,
>= 0.25). Healthy 4B/9B output scores >= 0.4198; black, white and
noise frames score <= 0.1842. If the score cannot be computed, the
test fails instead of passing unchecked.
- ti2i: CUDA flux_2_ti2i's edit prompt and input image, at 1024x1024
with seed 0, compared against a stored reference image with
compare_with_gt (CLIP similarity, SSIM, PSNR, mean abs diff) at
flux_2_ti2i's H100 thresholds. There is no XPU reference set in
ci-data-diffusion, so references are read from
SGLANG_CONSISTENCY_GT_DIR. A run without a reference fails and saves
its output under $SGLANG_DIFFUSION_ARTIFACT_DIR/missing_consistency_gt/
to be inspected and promoted.
- Every output is saved to $SGLANG_DIFFUSION_ARTIFACT_DIR before it is
checked, so a failing image is kept.
- Residency is pinned per size: 4B dit=resident; 9B also
text_encoder=layerwise-offload, so 1024x1024 warmup fits in 24 GiB.
- Perf is neither checked nor collected (collect_perf=False). The
flux2_klein_* case ids added here have no perf_baselines/xpu_b60.json
entry; klein-4B t2i perf on XPU is already covered by the existing CI
case flux_2_klein_image_t2i.
- Registered to nightly-xpu-1-gpu with nightly=True, like its siblings,
and disabled, so the Intel nightly lists it as skipped and never runs
it.
Add test/registered/xpu/conftest.py, which re-exports the diffusion
perf_results fixture as test/registered/amd/conftest.py does (sgl-project#38686).
Without it, a plain pytest run of any DiffusionServerBase test in this
directory errors with "fixture 'perf_results' not found".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
murthy-l
force-pushed
the
feat/diffusion-image-quality-metrics
branch
from
October 19, 2026 06:45
4f89d9c to
085153f
Compare
This comment has been minimized.
This comment has been minimized.
airMeng
pushed a commit
to airMeng/sglang
that referenced
this pull request
Oct 28, 2026
Source-PR: sgl-project#39714 Source-head: 085153f
airMeng
pushed a commit
to airMeng/sglang
that referenced
this pull request
Oct 28, 2026
Source-PR: sgl-project#39714 Source-head: 085153f
Collaborator
|
@murthy-l-habana — CI failure from this source patch in #46623. The same failure is present in this CPU job: |
airMeng
pushed a commit
to airMeng/sglang
that referenced
this pull request
Oct 28, 2026
Source-PR: sgl-project#39714 Source-head: 085153f
nightly-xpu-1-gpu was split into kernel-main/kernel-wheel by sgl-project#41857; the old name fails run_suite.py's validate_all_suites() in every CI job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
This branch has not been deployed
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.
Motivation
FLUX.2-klein has no XPU test coverage. This adds a manual 1-GPU test for
klein-4B and klein-9B on Intel XPU. It covers text-to-image, and
image-to-image against a stored reference, so a quality regression in
either path is caught by hand before release.
Modifications
One new file:
test/registered/xpu/test_xpu_flux2_klein.py. No changes tothe shared test harness, CI workflows, or other test files.
Earlier revisions of this PR also added
test/registered/xpu/conftest.py.Upstream has since landed a byte-identical copy of that file, so the rebase
onto
dc81f17b90absorbed it and this PR is now a single file.(
clip-vit-base-patch32, threshold 0.25), the same approach astest_xpu_flux2_dev.py. The threshold was measured on this prompt:healthy 4B/9B output scores >= 0.4198, black/white/noise frames
<= 0.1842. A CLIP model load or scoring failure fails the test rather
than passing unchecked, as it would under
test_xpu_flux2_dev.py.flux_2_ti2i's edit prompt and input image, at1024x1024 with seed 0. The output is compared against a stored reference
image with the existing
compare_with_gt(CLIP similarity, SSIM, PSNR,mean abs diff), at
flux_2_ti2i's H100 thresholds.sgl-project/ci-data-diffusion, soreferences are read from
SGLANG_CONSISTENCY_GT_DIR.$SGLANG_DIFFUSION_ARTIFACT_DIR/missing_consistency_gt/to beinspected and promoted.
$SGLANG_DIFFUSION_ARTIFACT_DIRbefore it ischecked, so a failing image is kept.
step-distilled), 1024x1024. Residency is pinned per size: 4B uses
dit=resident, and 9B addstext_encoder=layerwise-offloadso1024x1024 warmup fits in 24 GiB.
collect_perf=False). Theflux2_klein_*case ids added here have noperf_baselines/xpu_b60.jsonentry. klein-4B t2i perf on XPU is
already guarded by the CI case
flux_2_klein_image_t2i.nightly=True, disabled=, like itsnightly-xpu-1-gpusiblings: the Intel nightly lists it as skipped and never runs it.
perf_resultsfixture: a plain pytest run of anyDiffusionServerBasetest in
test/registered/xpu/needstest/registered/xpu/conftest.pytore-export it, as
test/registered/amd/conftest.pydoes ([AMD] Fix the diffusion perf fixture lookup #38686); without itcollection errors with
fixture 'perf_results' not found. That file is nowon main, so this PR no longer carries it.
How to run
To create references: run the ti2i cases once without them, inspect the
images saved under
missing_consistency_gt/, then copy them into$SGLANG_CONSISTENCY_GT_DIR.Accuracy Tests
Run on Intel Arc Pro B60 (24 GiB), torch 2.13.0+xpu, 1 card, on the
pre-rebase commit (
872989c6d0, upstream basea749d84303), with the plaincommand from "How to run" (no
-p).These results carry over to the current head
085153f80c(rebased ontodc81f17b90):test_xpu_flux2_klein.pyis byte-identical across the rebase(blob
3551310a95), and the only other change was dropping theconftest.pythat upstream now ships.
flux2_klein_4b_image_t2iflux2_klein_9b_image_t2iflux2_klein_4b_image_ti2iflux2_klein_9b_image_ti2i4 passed in 3m 11s. The metrics and t2i images are identical to the earlier
revisions of this PR.
Checks that the gates fail when they should:
input image swapped): 4 failed, and all 4 failing images were still saved
to
$SGLANG_DIFFUSION_ARTIFACT_DIR.ssim <= 0.62, psnr <= 10.6, mad >= 56.5), well outside the thresholds.
On the previous revision, whose test logic for these paths is unchanged:
metrics, so the reference is not card-specific.
own exception, rather than passing unchecked.
commit's run).
Checklist
CI States
Latest PR Test (Base): ❌ Run #40823519082
Latest PR Test (Extra): ❌ Run #40823519169
Latest PR Test (AMD ROCm 10): ❌ Run #40823519080