byaldi icon indicating copy to clipboard operation
byaldi copied to clipboard

[bugfix] Fix logic bug to make `device` argument be respected when passed in

Open ms337 opened this issue 1 year ago • 0 comments

Why

Currently if you pass in the device arg to from_pretrained, there is a logic bug which makes it get resolved to something else unnecessarily based on the device available.

For example, to reproduce, pass in device="cpu" on an Mac and it can resolved to "mps".

Turns out its just a bug in terms of logic in how the device is being set .

What Changed

Fixed in this PR.

ms337 avatar Oct 13 '24 03:10 ms337