From d3bb97761411e670fd5292de1ac9c4469a13fd20 Mon Sep 17 00:00:00 2001 From: "Dr. Daniel Hauschildt" Date: Fri, 10 May 2024 13:49:41 +0200 Subject: [PATCH] chore: fix lint --- TODOS.md | 6 ++---- packages/node/tsconfig.json | 7 ++----- packages/web-examples/vite-project/src/App.vue | 4 ++-- packages/web/CHANGELOG.md | 4 ++-- packages/web/README.md | 1 + ...dded_option_to_execute_on_gpu_webgpu_and_cpu_Added.yaml | 2 +- .../20242503170808-Added_isnet_model_for_webgpu_Added.yaml | 2 +- 7 files changed, 11 insertions(+), 15 deletions(-) diff --git a/TODOS.md b/TODOS.md index d2a8dc7..d7a6e4a 100644 --- a/TODOS.md +++ b/TODOS.md @@ -1,6 +1,6 @@ # Todos -## Todo 2.0 +## Todo 2.0 - [ ] use logger/telemetry callback instead of custom debug output - [ ] use resolver callback instead of publicPath as such we can allow various @@ -8,7 +8,5 @@ resolve: (path: string) => Response ``` - [ ] default to `gpu` -- [ ] remove image encode and decode +- [ ] remove image encode and decode - [ ] removebg should get `ImageData` and return raw `ImageData` - - diff --git a/packages/node/tsconfig.json b/packages/node/tsconfig.json index f1bb800..d90edcf 100644 --- a/packages/node/tsconfig.json +++ b/packages/node/tsconfig.json @@ -1,9 +1,6 @@ { "compilerOptions": { - "lib": [ - "DOM", - "ES2015" - ], + "lib": ["DOM", "ES2015"], "resolveJsonModule": true, "esModuleInterop": true, "emitDeclarationOnly": true, @@ -11,4 +8,4 @@ "target": "ES6", "moduleResolution": "Node16" } -} \ No newline at end of file +} diff --git a/packages/web-examples/vite-project/src/App.vue b/packages/web-examples/vite-project/src/App.vue index 9afd38e..004a4e0 100644 --- a/packages/web-examples/vite-project/src/App.vue +++ b/packages/web-examples/vite-project/src/App.vue @@ -117,8 +117,8 @@ export default { const load = async () => { const randomImage = image - ? image - : images[Math.floor(Math.random() * images.length)]; + ? image + : images[Math.floor(Math.random() * images.length)]; isRunning.value = true; resetTimer(); diff --git a/packages/web/CHANGELOG.md b/packages/web/CHANGELOG.md index acfe3c5..eb11564 100644 --- a/packages/web/CHANGELOG.md +++ b/packages/web/CHANGELOG.md @@ -8,9 +8,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Added -- Added option to execute on gpu (webgpu) and cpu Added +- Added option to execute on gpu (webgpu) and cpu. Enable by setting `device: "gpu"` -- Added isnet model for webgpu Added +- Added isnet model for webgpu ## [1.4.5] diff --git a/packages/web/README.md b/packages/web/README.md index 02436ab..62db968 100644 --- a/packages/web/README.md +++ b/packages/web/README.md @@ -58,6 +58,7 @@ The library does not need any configuration to get started. However, there are o type Config = { publicPath: string; // The public path used for model and wasm files. Default: 'https://staticimgly.com/${PACKAGE_NAME}-data/${PACKAGE_VERSION}/dist/' debug: bool; // enable or disable useful console.log outputs + device: 'cpu' | 'gpu'; // choose the execution device. gpu will use webgpu if available proxyToWorker: bool; // Whether to proxy the calculations to a web worker. (Default true) model: 'small' | 'medium'; // The model to use. (Default "medium") output: { diff --git a/packages/web/changelog/Unreleased/20242403201534-Added_option_to_execute_on_gpu_webgpu_and_cpu_Added.yaml b/packages/web/changelog/Unreleased/20242403201534-Added_option_to_execute_on_gpu_webgpu_and_cpu_Added.yaml index 31a8117..34293bd 100644 --- a/packages/web/changelog/Unreleased/20242403201534-Added_option_to_execute_on_gpu_webgpu_and_cpu_Added.yaml +++ b/packages/web/changelog/Unreleased/20242403201534-Added_option_to_execute_on_gpu_webgpu_and_cpu_Added.yaml @@ -6,4 +6,4 @@ type: Added # type: Security # private: true description: | - Added option to execute on gpu (webgpu) and cpu Added + Added option to execute on gpu (webgpu) and cpu. Enable by setting `device: "gpu"` diff --git a/packages/web/changelog/Unreleased/20242503170808-Added_isnet_model_for_webgpu_Added.yaml b/packages/web/changelog/Unreleased/20242503170808-Added_isnet_model_for_webgpu_Added.yaml index 17017e1..99f6520 100644 --- a/packages/web/changelog/Unreleased/20242503170808-Added_isnet_model_for_webgpu_Added.yaml +++ b/packages/web/changelog/Unreleased/20242503170808-Added_isnet_model_for_webgpu_Added.yaml @@ -6,4 +6,4 @@ type: Added # type: Security # private: true description: | - Added isnet model for webgpu Added + Added isnet model for webgpu