We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RemoteResource resource provider doesn't preserve file name or extension
let cached_path = CACHE .cached_path_with_options(&self.url, &Options::default().subdir(&self.cache_subdir))?; Ok(cached_path)
but Tch-rs requires model path to have safetensor extension to load model file in Safetensors format
safetensor
fn named_tensors<T: AsRef<std::path::Path>>( &self, path: T, ) -> Result<HashMap<String, Tensor>, TchError> { let named_tensors = match path.as_ref().extension().and_then(|x| x.to_str()) { Some("bin") | Some("pt") => Tensor::loadz_multi_with_device(&path, self.device), Some("safetensors") => Tensor::read_safetensors(path), Some(_) | None => Tensor::load_multi_with_device(&path, self.device), }; Ok(named_tensors?.into_iter().collect()) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
RemoteResource resource provider doesn't preserve file name or extension
but Tch-rs requires model path to have
safetensor
extension to load model file in Safetensors formatThe text was updated successfully, but these errors were encountered: