Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit e2dbc3b55af5d1dc7187f0c625a370c94c82f914
Author: Dr. Daniel Hauschildt <daniel.hauschildt@img.ly>
Date:   Wed May 22 13:03:12 2024 +0100

    chore: Updated to OnnxRuntime 1.18 and thus enabling fp16 support for the isnet
  • Loading branch information
DanielHauschildt committed May 22, 2024
1 parent 5bbd943 commit 9b77b77
Show file tree
Hide file tree
Showing 7 changed files with 146 additions and 108 deletions.
216 changes: 133 additions & 83 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@types/node": "~20.3.1",
"lodash": "~4.17.21",
"ndarray": "~1.0.19",
"onnxruntime-node": "~1.17.0",
"onnxruntime-node": "~1.18.0",
"sharp": "~0.32.4",
"zod": "^3.23.8"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/web-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
"package:pack": "npm pack . --pack-destination ../../releases"
},
"dependencies": {
"onnxruntime-web": "~1.17.0"
"onnxruntime-web": "~1.18.0"
}
}
18 changes: 9 additions & 9 deletions packages/web-examples/vite-project/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions packages/web-examples/vite-project/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export default {
publicPath.pathname = '/js/';
const config = {
debug: false,
// debug: true,
publicPath: publicPath.href,
progress: (key, current, total) => {
const [type, subtype] = key.split(':');
Expand All @@ -51,7 +50,7 @@ export default {
rescale: true,
device: 'gpu',
// device: 'cpu',
model: 'isnet',
// model: 'isnet',
// model: 'isnet_fp16',
// model: 'isnet_quint8',
output: {
Expand Down
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@types/node": "~20.3.0",
"lodash-es": "^4.17.21",
"ndarray": "~1.0.0",
"onnxruntime-web": "~1.17.0",
"onnxruntime-web": "~1.18.0",
"zod": "^3.23.8"
},
"devDependencies": {
Expand Down
11 changes: 0 additions & 11 deletions packages/web/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,8 @@ const ConfigSchema = z
if (config.debug)
console.debug('Switching to CPU for GPU not supported.');
config.device = 'cpu';
} else {
switch (config.model) {
case 'isnet':
break;
case 'isnet_fp16':
case 'isnet_quint8':
if (config.debug) console.debug('Switching to f32 model for GPU');
config.model = 'isnet';
break;
}
}
}

return config;
});

Expand Down

0 comments on commit 9b77b77

Please sign in to comment.