magenta / magenta-js

Magenta.js: Music and Art Generation with Machine Learning in the browser
https://magenta.tensorflow.org
Apache License 2.0
1.96k stars 311 forks source link

Upgrade @magenta/image to tfjs 1.0.x #296

Open romaincazier opened 5 years ago

romaincazier commented 5 years ago

Hi,

I was trying to use the BodyPix model with Magenta but the tfjs version required is 1.0.0. Is it possible to update it ?

Thanks!

notwaldorf commented 5 years ago

Yeah, let me take a look at this today!

notwaldorf commented 5 years ago

Update: so unfortunately while updating to 1.0.x is fine, this breaks browserify with this error:

/Users/noms/Code/magenta-js/image/node_modules/@tensorflow/tfjs-converter/dist/src/data/compiled_api.ts:20
export declare interface IAny {
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'

I think we have to update to using webpack, like we did for @magenta/music

romaincazier commented 5 years ago

I hit the same wall at some point, I (blindly) tried things but my knowledge is pretty limited here...

Thank you for looking at it!

notwaldorf commented 3 years ago

A thousand years later, I think this will be an easy fix once https://github.com/magenta/magenta-js/issues/530 is done