Closed Pongking closed 2 months ago
Instead of wrapping the string path with a pathlib.Path
object, we can just use os.path.isdir()
to check the filesystem path.
This is also how huggingface handles it in hub_mixin.py
Would you mind updating the PR with this change?
Thank you very much, I will modify it immediately :)
Thank you so much,that's really a great learning opportunity for me.thank you!!
thanks!
snacmodel = SNAC.from_pretrained("hubertsiuzdak/snac_24khz", local_dir="/root/mini-omni/snac_24khz",).eval().to(device)
21
Fix the bug when loading model from local path.
from snac import SNAC snacmodel = SNAC.from_pretrained(Path("/root/XXX/model/snac_24khz")).eval().to(device)