Skip to content

fix(models): Fix suno/bark-small CPU offload device mismatch causing CI failures#43607

Merged
Rocketknight1 merged 1 commit intohuggingface:mainfrom
harshaljanjani:fix/bark-cpu-offload-device-mismatch
Jan 30, 2026
Merged

fix(models): Fix suno/bark-small CPU offload device mismatch causing CI failures#43607
Rocketknight1 merged 1 commit intohuggingface:mainfrom
harshaljanjani:fix/bark-cpu-offload-device-mismatch

Conversation

@harshaljanjani
Copy link
Contributor

What does this PR do?

BarkCausalModel and BarkFineModel incorrectly inferred the device, causing device mismatches when enable_cpu_offload() is used. For more details on reproducing the bug, please visit the linked issue!

Fixes #43606.

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,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you fix any necessary existing tests?

CI Failure:

Image

Current Output:

Image

Output After the Fix:

Image

@github-actions
Copy link
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: bark

@harshaljanjani harshaljanjani marked this pull request as ready for review January 29, 2026 18:39
@github-actions github-actions bot requested a review from eustlb January 29, 2026 18:39
Copy link
Member

@Rocketknight1 Rocketknight1 left a comment

Choose a reason for hiding this comment

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

Confirmed the failure, and pushing inputs to the model device makes sense to me. Thanks for the fix!

@Rocketknight1 Rocketknight1 enabled auto-merge (squash) January 30, 2026 13:02
@Rocketknight1 Rocketknight1 merged commit 1087301 into huggingface:main Jan 30, 2026
20 checks passed
@harshaljanjani
Copy link
Contributor Author

harshaljanjani commented Jan 30, 2026

Thanks a ton @Rocketknight1!
I noticed the Operation Green CI PRs; I’ve been and will continue to raise fixes wherever it makes sense from my end, apart from any other bugs I notice / features I can add :)
https://github.com/huggingface/transformers/pulls?q=is%3Apr+author%3Aharshaljanjani

@HuggingFaceDocBuilderDev

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.

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.

[BUG][CI] suno/bark-small model fails with a device mismatch when using CPU offload

3 participants