mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Fix
This commit is contained in:
@@ -76,8 +76,8 @@ module.exports = class Tensorflow {
|
||||
const loadedImage = imageTensor.toFloat().div(tf.scalar(255)).expandDims();
|
||||
imageTensor.dispose();
|
||||
const styleTensor = tf.node.decodeImage(styleImg, 3);
|
||||
styleTensor.dispose();
|
||||
const loadedStyle = styleTensor.toFloat().div(tf.scalar(255)).expandDims();
|
||||
styleTensor.dispose();
|
||||
const stylePrediction = await this.styleModel.predict(loadedStyle);
|
||||
loadedStyle.dispose();
|
||||
const stylizedImage = await this.transformerModel.predict([loadedImage, stylePrediction.squeeze()]);
|
||||
|
||||
Reference in New Issue
Block a user