mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 16:19:12 +02:00
Fix
This commit is contained in:
@@ -83,6 +83,7 @@ module.exports = class Tensorflow {
|
|||||||
const stylizedImage = await this.transformerModel.predict([loadedImage, stylePrediction]);
|
const stylizedImage = await this.transformerModel.predict([loadedImage, stylePrediction]);
|
||||||
loadedImage.dispose();
|
loadedImage.dispose();
|
||||||
stylePrediction.dispose();
|
stylePrediction.dispose();
|
||||||
|
stylizedImage.mul(255).toInt();
|
||||||
const buffer = await tf.node.encodeJpeg(stylizedImage.squeeze());
|
const buffer = await tf.node.encodeJpeg(stylizedImage.squeeze());
|
||||||
stylizedImage.dispose();
|
stylizedImage.dispose();
|
||||||
return Buffer.from(buffer);
|
return Buffer.from(buffer);
|
||||||
|
|||||||
Reference in New Issue
Block a user