We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff31bda commit 8ebdff4Copy full SHA for 8ebdff4
crates/am/src/model.rs
@@ -58,12 +58,15 @@ impl AmModel {
58
&self,
59
base_dir: impl AsRef<std::path::Path>,
60
) -> Result<bool, crate::Error> {
61
+ let tar_path = base_dir.as_ref().join(format!("{}.tar", self.model_dir()));
62
let model_path = base_dir.as_ref().join(self.model_dir());
- if !model_path.exists() {
63
- return Ok(false);
+
64
+ // Due to CoreML compilation issue, we can only embed tar file for now
65
+ if !model_path.exists() && tar_path.exists() {
66
+ let _ = self.tar_verify_and_unpack(&tar_path, &model_path);
67
}
68
- if !model_path.is_dir() {
69
+ if !model_path.exists() || !model_path.is_dir() {
70
return Ok(false);
71
72
0 commit comments