Skip to content

Commit

Permalink
chore: Added prettier in pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHauschildt committed Mar 26, 2024
1 parent e307a3b commit a4b7b31
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 25 deletions.
33 changes: 21 additions & 12 deletions packages/node/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,27 @@ const ConfigSchema = z
.describe('Progress callback.')
.optional(),
model: z
.preprocess((val) => {
switch (val) {
case 'large':
return 'isnet';
case 'small':
return 'isnet_quint8';
case 'medium':
return 'isnet_fp16';
default:
return val;
}
}, z.enum(['isnet', 'isnet_fp16', 'isnet_quint8', 'modnet', 'modnet_fp16' /*, 'modnet_quint8'*/]))
.preprocess(
(val) => {
switch (val) {
case 'large':
return 'isnet';
case 'small':
return 'isnet_quint8';
case 'medium':
return 'isnet_fp16';
default:
return val;
}
},
z.enum([
'isnet',
'isnet_fp16',
'isnet_quint8',
'modnet',
'modnet_fp16' /*, 'modnet_quint8'*/
])
)
.default('medium'),
output: z
.object({
Expand Down
2 changes: 1 addition & 1 deletion packages/web-examples/vite-project/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
33 changes: 21 additions & 12 deletions packages/web/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,27 @@ const ConfigSchema = z
.describe('Progress callback.')
.optional(),
model: z
.preprocess((val) => {
switch (val) {
case 'large':
return 'isnet';
case 'small':
return 'isnet_quint8';
case 'medium':
return 'isnet_fp16';
default:
return val;
}
}, z.enum(['isnet', 'isnet_fp16', 'isnet_quint8', 'modnet', 'modnet_fp16' /*, 'modnet_quint8'*/]))
.preprocess(
(val) => {
switch (val) {
case 'large':
return 'isnet';
case 'small':
return 'isnet_quint8';
case 'medium':
return 'isnet_fp16';
default:
return val;
}
},
z.enum([
'isnet',
'isnet_fp16',
'isnet_quint8',
'modnet',
'modnet_fp16' /*, 'modnet_quint8'*/
])
)
.default('medium'),
output: z
.object({
Expand Down

0 comments on commit a4b7b31

Please sign in to comment.