update deps (MisskeyIO#844)

fixes nsfwjs error in b3f73d7312
This commit is contained in:
あわわわとーにゅ 2024-12-25 11:18:28 +09:00 committed by GitHub
parent 8abe8aecee
commit 531565aa66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 280 additions and 277 deletions

View file

@ -88,7 +88,7 @@
"@peertube/http-signature": "1.7.0",
"@simplewebauthn/server": "13.0.0",
"@sinonjs/fake-timers": "11.3.1",
"@smithy/node-http-handler": "3.3.2",
"@smithy/node-http-handler": "3.3.3",
"@swc/cli": "0.5.2",
"@swc/core": "1.10.1",
"@twemoji/parser": "15.1.1",
@ -102,7 +102,7 @@
"bullmq": "5.34.4",
"cacheable-lookup": "7.0.0",
"cbor": "10.0.3",
"chalk": "5.4.0",
"chalk": "5.4.1",
"chalk-template": "1.1.0",
"chokidar": "4.0.3",
"cli-highlight": "2.1.11",
@ -130,9 +130,9 @@
"js-yaml": "4.1.0",
"jsdom": "25.0.1",
"json5": "2.2.3",
"jsonld": "8.3.2",
"jsonld": "8.3.3",
"jsrsasign": "11.1.0",
"meilisearch": "0.46.0",
"meilisearch": "0.47.0",
"mfm-js": "0.24.0",
"microformats-parser": "2.0.2",
"mime-types": "2.1.35",
@ -152,7 +152,7 @@
"otpauth": "9.3.6",
"parse5": "7.2.1",
"pg": "8.13.1",
"pino": "9.5.0",
"pino": "9.6.0",
"pino-pretty": "13.0.0",
"pkce-challenge": "4.1.0",
"probe-image-size": "7.2.3",
@ -175,7 +175,7 @@
"slacc": "0.0.10",
"strict-event-emitter-types": "2.0.0",
"stringz": "2.1.0",
"systeminformation": "5.23.14",
"systeminformation": "5.23.21",
"tinycolor2": "1.6.0",
"tmp": "0.2.3",
"tsc-alias": "1.8.10",
@ -201,7 +201,7 @@
"@types/color-convert": "2.0.4",
"@types/content-disposition": "0.5.8",
"@types/fluent-ffmpeg": "2.1.27",
"@types/htmlescape": "^1.1.3",
"@types/htmlescape": "1.1.3",
"@types/http-link-header": "1.0.7",
"@types/jest": "29.5.14",
"@types/js-yaml": "4.0.9",
@ -239,7 +239,7 @@
"eslint": "8.57.1",
"eslint-plugin-import": "2.31.0",
"execa": "9.5.2",
"fkill": "^9.0.0",
"fkill": "9.0.0",
"jest": "29.7.0",
"jest-mock": "29.7.0",
"nodemon": "3.1.9",

View file

@ -58,11 +58,11 @@ export class AiService {
const sharp = await sharpBmp(path, mime);
const { data, info } = await sharp
.resize(299, 299, { fit: 'inside' })
.ensureAlpha()
.raw({ depth: 'int' })
.removeAlpha()
.raw({ depth: 'uchar' })
.toBuffer({ resolveWithObject: true });
const image = tf.tensor3d(data, [info.height, info.width, info.channels], 'int32');
const image = tf.tensor3d(data, [info.height, info.width, info.channels], 'bool');
try {
return await this.model.classify(image);
} finally {