diff --git a/examples/stable-diffusion/main.rs b/examples/stable-diffusion/main.rs index 109a0113..f0454139 100644 --- a/examples/stable-diffusion/main.rs +++ b/examples/stable-diffusion/main.rs @@ -36,7 +36,6 @@ // // cargo run --release --example tensor-tools cp ./data/vae.npz ./data/vae.ot // cargo run --release --example tensor-tools cp ./data/unet.npz ./data/unet.ot -/// // TODO: fix tensor_tools so that it works properly there. // TODO: Split this file, probably in a way similar to huggingface/diffusers. use std::collections::{HashMap, HashSet}; diff --git a/examples/yolo/darknet.rs b/examples/yolo/darknet.rs index 0f744057..9ce3b046 100644 --- a/examples/yolo/darknet.rs +++ b/examples/yolo/darknet.rs @@ -17,7 +17,7 @@ struct Block { impl Block { fn get(&self, key: &str) -> Result<&str> { - match self.parameters.get(&key.to_string()) { + match self.parameters.get(key) { None => bail!("cannot find {} in {}", key, self.block_type), Some(value) => Ok(value), } @@ -32,7 +32,7 @@ pub struct Darknet { impl Darknet { fn get(&self, key: &str) -> Result<&str> { - match self.parameters.get(&key.to_string()) { + match self.parameters.get(key) { None => bail!("cannot find {} in net parameters", key), Some(value) => Ok(value), }