Skip to content

[tests] refactor o and p series pipeline tests - #14646

Open
sayakpaul wants to merge 1 commit into
mainfrom
o-p-series-pipeline-tests
Open

[tests] refactor o and p series pipeline tests#14646
sayakpaul wants to merge 1 commit into
mainfrom
o-p-series-pipeline-tests

Conversation

@sayakpaul

Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions Bot added tests pipelines size/L PR with diff > 200 LOC labels Aug 29, 2026
@sayakpaul

Copy link
Copy Markdown
Member Author

/diffusers-bot pytest tests/pipelines/pag

@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

⚠️ pytest tests/pipelines/pag was cancelled on GPU — view logs.

Comment thread .ai/references/testing.md
- `torch.nn.MultiheadAttention` is the common instance: it passes `self.out_proj.weight` straight to `torch.nn.functional.multi_head_attention_forward` instead of calling `self.out_proj`, so the hook on `out_proj` never fires. `SiglipVisionModel`'s attention pooling head wraps one — see `tests/pipelines/hunyuan_video/test_hunyuan_video_framepack.py`, whose `image_encoder` is excluded for this reason.
- `HunyuanDiTAttentionPool` (`src/diffusers/models/embeddings.py`) shows the same failure without an MHA module: a plain `nn.Module` that hands its `q_proj` / `k_proj` / `v_proj` / `c_proj` weights to `torch.nn.functional.multi_head_attention_forward`, so all four projections stay offloaded rather than just one. `HunyuanDiT2DModel` opts out of group offloading entirely with `_supports_group_offloading = False`.
- Before adding a skip or an exclusion, confirm the failure still reproduces — several existing skips are stale, having outlived the upstream cause.
- **A migration that surfaces a `src/` gap marks the test `xfail`, it does not patch the pipeline.** Give the marker a module-level name and a `reason` naming the exact gap (`PNDM_*` in `tests/pipelines/pndm/test_pndm.py` is the worked example), and prefer `strict=True` so the marker reports XPASS — and gets deleted — the day the pipeline is fixed. Use `strict=False` only when one mark covers a group whose members do not all fail. Marking a whole test class keeps the mixin's own marks (`@is_memory`, `@require_accelerator`) intact; overriding individual inherited tests drops the decorators they were declared with, so re-declare those too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to xfail things where we need core changes while doing test PRs. xfail is better than skipping the tests.

AutoencoderKL,
DDIMScheduler,
MotionAdapter,
StableDiffusionPipeline,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just import level changes in the animdatediff series because we moved the from_pipe tests in a dedicated mixin.

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@sayakpaul

Copy link
Copy Markdown
Member Author

/diffusers-bot pytest tests/pipelines/pag

@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

pytest tests/pipelines/pag failed on GPU — view logs.

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

Labels

pipelines size/L PR with diff > 200 LOC tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants