Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

Commit

Permalink
fix: accept paths as AsRef<Path>
Browse files Browse the repository at this point in the history
  • Loading branch information
decahedron1 committed May 8, 2023
1 parent 34c6d84 commit 0c94307
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pipelines/stable_diffusion/text_embeddings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl TextEmbeddings {
Ok(Self { tokenizer, text_hidden_size, tokens })
}

pub fn add_token_from_file<P: AsRef<PathBuf>>(&mut self, path: P) -> io::Result<AddedToken> {
pub fn add_token_from_file<P: AsRef<Path>>(&mut self, path: P) -> io::Result<AddedToken> {
let path = path.as_ref();
self.add_token_from_reader(BufReader::new(File::open(path)?))
}
Expand Down

0 comments on commit 0c94307

Please sign in to comment.