Skip to content

refactor bria pipeline tests to the new mixin structure - #14547

Merged
sayakpaul merged 6 commits into
huggingface:mainfrom
akshan-main:refactor-bria-pipeline-tests
Aug 22, 2026
Merged

refactor bria pipeline tests to the new mixin structure#14547
sayakpaul merged 6 commits into
huggingface:mainfrom
akshan-main:refactor-bria-pipeline-tests

Conversation

@akshan-main

Copy link
Copy Markdown
Contributor

What does this PR do?

Refactors the Bria pipeline tests to the new mixin structure from #14113: a BriaPipelineTesterConfig plus TestBriaPipeline(PipelineTesterMixin) and TestBriaPipelineMemory(MemoryTesterMixin), with the slow class ported to pytest as TestBriaPipelineSlow.

Existing coverage is kept: test_bria_different_prompts and both output-shape tests, with dummy inputs switched to output_type="pt" and a fresh CPU slice in test_inference. The old silent test_encode_prompt_works_in_isolation override is now an explicit skip with the diagnosed reason (BriaPipeline.__init__ dereferences the vae config, so it cannot be built with text-only components). The float16/dtype overrides are dropped in favor of the framework versions, which pass unmodified.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline?
  • Did you read our philosophy doc (important for complex PRs)?
  • Was this discussed/approved via a GitHub issue or the forum? Discussed on Slack with @sayakpaul
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Who can review?

@sayakpaul

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

Copy link
Copy Markdown
Member

/diffusers-bot pytest tests/pipelines/bria/test_pipeline_bria.py

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

⚠️ pytest tests/pipelines/bria/test_pipeline_bria.py was cancelled on GPU — view logs.

@sayakpaul

Copy link
Copy Markdown
Member

@akshan-main additionally, let's also add the LoraTesterMixin similar to:

class TestFluxPipelineLoRA(FluxPipelineTesterConfig, LoraTesterMixin):

@sayakpaul

Copy link
Copy Markdown
Member

/diffusers-bot pytest tests/pipelines/bria/test_pipeline_bria.py

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

pytest tests/pipelines/bria/test_pipeline_bria.py passed on GPU — view logs.

@akshan-main

Copy link
Copy Markdown
Contributor Author

Added. Note BriaPipeline doesn't subclass LoraBaseMixin, so the class skips through the mixin's setup gate for now.

@sayakpaul

Copy link
Copy Markdown
Member

Sorry. I should have been clear here. If the corresponding pipeline doesn't already have a separate LoRA tester under tests/lora, then no need to add. This means we can remove the LoRA bits you just added. I am sorry for the confusion.

@github-actions

Copy link
Copy Markdown
Contributor

Hi @akshan-main, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. Fixes #1234) to the PR description so the issue is linked. See the contribution guide for more details. If this PR intentionally does not fix a tracked issue, a maintainer can add the no-issue-needed label to silence this reminder.

@akshan-main

Copy link
Copy Markdown
Contributor Author

No worries, removed.

@sayakpaul
sayakpaul merged commit 398106a into huggingface:main Aug 22, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L PR with diff > 200 LOC tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants