[NPU] [Bugfix] [Diffusion] Fixed gray images at the generation output (#23266)

Co-authored-by: ronnie_zheng <zl19940307@163.com>
This commit is contained in:
Артем Савкин
2026-04-25 10:20:38 +03:00
committed by GitHub
co-authored by ronnie_zheng
parent 6175946db7
commit bd523dd60d
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -64,6 +64,7 @@ jobs:
- ".github/workflows/pr-test-npu.yml"
multimodal_gen:
- "python/sglang/multimodal_gen/**/!(*.md|*.ipynb)"
- "python/sglang/jit_kernel/diffusion/triton/npu_fallback.py"
- "python/sglang/srt/**"
- "python/pyproject_npu.toml"
- "scripts/ci/npu/npu_ci_install_dependency.sh"
@@ -28,6 +28,7 @@ def apply_rotary_embedding_native(
and x.dim() == 3
and x.shape[1] < NPU_ROTARY_MUL_MAX_NUM_HEADS
and x.shape[2] < NPU_ROTARY_MUL_MAX_HEAD_SIZE
and not interleaved
):
if cos.size(-1) * 2 == x.size(-1):
cos = torch.cat([cos, cos], dim=-1)