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,6 +83,7 @@ module.exports = class Tensorflow {
|
||||
const stylizedImage = await this.transformerModel.predict([loadedImage, stylePrediction]);
|
||||
loadedImage.dispose();
|
||||
stylePrediction.dispose();
|
||||
stylizedImage.mul(255).toInt();
|
||||
const buffer = await tf.node.encodeJpeg(stylizedImage.squeeze());
|
||||
stylizedImage.dispose();
|
||||
return Buffer.from(buffer);
|
||||
|
||||
Reference in New Issue
Block a user