mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 13:56:25 +02:00
Fix
This commit is contained in:
@@ -80,7 +80,7 @@ module.exports = class Tensorflow {
|
|||||||
styleTensor.dispose();
|
styleTensor.dispose();
|
||||||
const stylePrediction = await this.styleModel.predict(loadedStyle);
|
const stylePrediction = await this.styleModel.predict(loadedStyle);
|
||||||
loadedStyle.dispose();
|
loadedStyle.dispose();
|
||||||
const stylizedImage = await this.transformerModel.predict([loadedImage, stylePrediction.squeeze()]);
|
const stylizedImage = await this.transformerModel.predict([loadedImage, stylePrediction]);
|
||||||
loadedImage.dispose();
|
loadedImage.dispose();
|
||||||
stylePrediction.dispose();
|
stylePrediction.dispose();
|
||||||
const buffer = await tf.node.encodePng(stylizedImage.squeeze());
|
const buffer = await tf.node.encodePng(stylizedImage.squeeze());
|
||||||
|
|||||||
Reference in New Issue
Block a user