Skip to content

Commit

Permalink
fix: Removed fp32 model from node version due to package size limitat…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
DanielHauschildt committed May 10, 2024
1 parent d290589 commit b06f6dd
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .husky/_/post-checkout
Original file line number Diff line number Diff line change
@@ -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 "$@"
3 changes: 3 additions & 0 deletions .husky/_/post-commit
Original file line number Diff line number Diff line change
@@ -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 "$@"
3 changes: 3 additions & 0 deletions .husky/_/post-merge
Original file line number Diff line number Diff line change
@@ -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 "$@"
3 changes: 3 additions & 0 deletions .husky/_/pre-push
Original file line number Diff line number Diff line change
@@ -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 "$@"
2 changes: 1 addition & 1 deletion packages/node-examples/src/example_001.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions packages/node/.resources.mjs
Original file line number Diff line number Diff line change
@@ -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'
},

];
4 changes: 1 addition & 3 deletions packages/node/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ const ConfigSchema = z
.preprocess(
(val) => {
switch (val) {
case 'large':
return 'isnet';
case 'small':
return 'isnet_quint8';
case 'medium':
Expand All @@ -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
Expand Down

0 comments on commit b06f6dd

Please sign in to comment.