Skip to content

TST Skip failing Diffusers tests until v0.40.0#3394

Merged
BenjaminBossan merged 1 commit into
huggingface:mainfrom
BenjaminBossan:tst-skip-failing-diffsers-tests-until-v0.40
Jul 6, 2026
Merged

TST Skip failing Diffusers tests until v0.40.0#3394
BenjaminBossan merged 1 commit into
huggingface:mainfrom
BenjaminBossan:tst-skip-failing-diffsers-tests-until-v0.40

Conversation

@BenjaminBossan

Copy link
Copy Markdown
Member

Due to a recent change in huggingface-hub, loading Diffusers pipelines in offline mode can fail. Since the PEFT caching mechanism works by setting offline mode, several PEFT tests are affected by this.

There is a fix on the way in Diffusers, but there won't be a patch release:

huggingface/diffusers#14118

Therefore, we skip these tests for now. Once Diffusers 0.40.0 releases, the tests will run again, but we can also remove the skipping logic completely.

Due to a recent change in huggingface-hub, loading Diffusers pipelines
in offline mode can fail. Since the PEFT caching mechanism works by
setting offline mode, several PEFT tests are affected by this.

There is a fix on the way in Diffusers, but there won't be a patch
release:

huggingface/diffusers#14118

Therefore, we skip these tests for now. Once Diffusers 0.40.0
releases, the tests will run again, but we can also remove the
skipping logic completely.
@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.

@BenjaminBossan BenjaminBossan requested a review from githubnemo July 6, 2026 12:03
@BenjaminBossan BenjaminBossan merged commit 08c72e3 into huggingface:main Jul 6, 2026
15 of 19 checks passed
@BenjaminBossan BenjaminBossan deleted the tst-skip-failing-diffsers-tests-until-v0.40 branch July 6, 2026 18:59
BenjaminBossan added a commit that referenced this pull request Jul 7, 2026
We have errors with the Windows CI when it tries to load the stable
diffusion model. This is coming from the huggingface_hub 1.22 release. I
could confirm that pinning to <1.22 resolved the issue. We already have
a fix in #3394 due to this release but it didn't address the error
above.

In this PR, the stable diffusion pipeline is loaded as part of a class
level fixture. There is a tricky issue that setting it on self doesn't
work for class fixtures, which is probably why it wasn't implemented
like this in the first place.

The reason why this (presumably) solves the issue: According to the GLM
analysis, this is a race condition that is aggravated on Windows due to
how it handles symlinking. The old code is defined on the class level,
which means that when the tests are set up, it runs immediately. Since
we run with 3 xdist processes, all 3 fire at approximately the same
time. This makes it more likely to trigger the race condition. Using a
fixture, the SD pipeline is only loaded once the first test on the class
is reached. Since many tests run before that, it is very unlikely that
all xdist processes start loading at the same time. Therefore, the race
condition is resolved for all practical purposes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants