Skip to content

Commit a1a0ad1

Browse files
committed
migrate to ort RC10
1 parent b83428e commit a1a0ad1

9 files changed

Lines changed: 296 additions & 184 deletions

File tree

Cargo.lock

Lines changed: 60 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ strum = "0.26.1"
6565
futures = "0.3.30"
6666

6767
ndarray = "0.16.1"
68-
ort = "2.0.0-rc.8"
68+
ort = "2.0.0-rc.10"
69+
ort-sys = "=2.0.0-rc.10"
6970
nalgebra = "0.34" # For matrix math (SVD/Least Squares)
7071
sha256 = "1.5.0"
7172
axum-extra = { version = "0.9.2", features = ["query"] }

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ volumes:
8383
# Setup dev env
8484
8585
## Windows
86-
86+
you need a recent version of visual studio installed for C++ builds
8787
one-time
8888
```bash
8989
cargo install cargo-vcpkg

src/model/medias.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,10 +1133,10 @@ impl ModelController {
11331133
for plugin in plugins.clone() {
11341134
let mut path = get_plugin_fodler().await?;
11351135
path.push(&plugin.path);
1136-
let model: ort::Session = preload_model(&path).await?;
1136+
let mut model: ort::session::Session = preload_model(&path).await?;
11371137
for buffer in &images {
11381138

1139-
let mut prediction = predict_net(path.clone(), plugin.settings.bgr.unwrap_or(false), plugin.settings.normalize.unwrap_or(false), buffer.clone(), Some(&model)).await?;
1139+
let mut prediction = predict_net(path.clone(), plugin.settings.bgr.unwrap_or(false), plugin.settings.normalize.unwrap_or(false), buffer.clone(), Some(&mut model)).await?;
11401140
prediction.sort_by(|a, b| b.probability.partial_cmp(&a.probability).unwrap());
11411141
if insert_tags {
11421142
for tag in &prediction {

src/model/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ impl ModelController {
332332
self.for_connected_users(&message, |user, socket, message| {
333333
// Check if user has Read access to the library
334334
if user.check_library_role(&message.library, LibraryRole::Admin).is_ok() {
335+
println!("Sending library status to user: {:?} message: {:?}", user.user_id(), message);
335336
let _ = socket.emit("library-status", message);
336337
}
337338
});

src/tools/convert/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::error::{RsError, RsResult};
2-
use ort::Utf8Data;
2+
use ort::tensor::Utf8Data;
33
use rs_torrent_magnet::magnet_from_torrent;
44
use tokio::io::{AsyncRead, AsyncReadExt};
55
pub mod magnet;

0 commit comments

Comments
 (0)