diff --git a/.husky/_/post-checkout b/.husky/_/post-checkout new file mode 100755 index 0000000..ca7fcb4 --- /dev/null +++ b/.husky/_/post-checkout @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-checkout' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; } +git lfs post-checkout "$@" diff --git a/.husky/_/post-commit b/.husky/_/post-commit new file mode 100755 index 0000000..52b339c --- /dev/null +++ b/.husky/_/post-commit @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-commit' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; } +git lfs post-commit "$@" diff --git a/.husky/_/post-merge b/.husky/_/post-merge new file mode 100755 index 0000000..a912e66 --- /dev/null +++ b/.husky/_/post-merge @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-merge' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; } +git lfs post-merge "$@" diff --git a/.husky/_/pre-push b/.husky/_/pre-push new file mode 100755 index 0000000..0f0089b --- /dev/null +++ b/.husky/_/pre-push @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'pre-push' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; } +git lfs pre-push "$@" diff --git a/packages/node-examples/src/example_001.cjs b/packages/node-examples/src/example_001.cjs index a2eaef2..e87081d 100644 --- a/packages/node-examples/src/example_001.cjs +++ b/packages/node-examples/src/example_001.cjs @@ -27,7 +27,7 @@ async function run() { ); }, // model: 'small', - model: 'isnet', + // model: 'isnet_fp16', output: { quality: 0.8, format: 'image/webp' //image/jpeg, image/webp diff --git a/packages/node/.resources.mjs b/packages/node/.resources.mjs index 5553b8c..aa2810b 100644 --- a/packages/node/.resources.mjs +++ b/packages/node/.resources.mjs @@ -1,7 +1,13 @@ export default [ { path: '/models/', - source: '../../bundle/models/*', + source: '../../bundle/models/isnet_fp16', mime: 'application/octet-steam' - } + }, + { + path: '/models/', + source: '../../bundle/models/isnet_quint8', + mime: 'application/octet-steam' + }, + ]; diff --git a/packages/node/src/schema.ts b/packages/node/src/schema.ts index 39cd89d..1d07f05 100644 --- a/packages/node/src/schema.ts +++ b/packages/node/src/schema.ts @@ -49,8 +49,6 @@ const ConfigSchema = z .preprocess( (val) => { switch (val) { - case 'large': - return 'isnet'; case 'small': return 'isnet_quint8'; case 'medium': @@ -59,7 +57,7 @@ const ConfigSchema = z return val; } }, - z.enum(['isnet', 'isnet_fp16', 'isnet_quint8']) + z.enum(['isnet_fp16', 'isnet_quint8']) ) .default('medium'), output: z