mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
@@ -83,8 +83,8 @@ module.exports = class Tensorflow {
|
||||
const stylizedImage = await this.transformerModel.predict([loadedImage, stylePrediction]);
|
||||
loadedImage.dispose();
|
||||
stylePrediction.dispose();
|
||||
const buffer = await tf.node.encodePng(stylizedImage.squeeze());
|
||||
const buffer = await tf.node.encodeJpeg(stylizedImage.squeeze());
|
||||
stylizedImage.dispose();
|
||||
return buffer;
|
||||
return Buffer.from(buffer);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user