This commit is contained in:
Dragon Fire
2024-05-08 18:22:33 -04:00
parent 8a8c795e5f
commit f40ded5a85
+1 -1
View File
@@ -80,7 +80,7 @@ module.exports = class Tensorflow {
styleTensor.dispose();
const stylePrediction = await this.styleModel.predict(loadedStyle);
loadedStyle.dispose();
const stylizedImage = await this.transformerModel.predict([loadedImage, stylePrediction.squeeze()]);
const stylizedImage = await this.transformerModel.predict([loadedImage, stylePrediction]);
loadedImage.dispose();
stylePrediction.dispose();
const buffer = await tf.node.encodePng(stylizedImage.squeeze());