magenta-js
magenta-js copied to clipboard
"TypeError: Only absolute URLs are supported" & "Only HTTP(S) protocols are supported"
Having downloaded models using checkpoint_downloader.py
, I am attempting to load them locally.
As suggested in #576 I prepended file://
and get the error Only HTTP(S) protocols are supported
As suggested in #470 I used /modelName
and continue to get the error Only absolute URLs are supported
Any other suggestions?
Could you post your code? It's hard to tell what's going on otherwise.
const musicvae = require('@magenta/music/node/music_vae');
const core = require('@magenta/music/node/core');
const Max = require('max-api');
var modelCheckPoint = 'https://storage.googleapis.com/magentadata/js/checkpoints/music_vae/mel_2bar_small'; //works
//////// fails with Only HTTP(S) protocols are supported ////////
//var modelCheckPoint = 'file://Users/johnjannone/Dropbox/_Projects__________________/_MAX/Magenta/drums_2bar_lokl_small';
//////// fails with Only absolute URLs are supported ////////
//var modelCheckPoint = '/drums_2bar_lokl_small';
//var modelCheckPoint = 'file:///Users/johnjannone/Dropbox/_Projects__________________/_MAX/Magenta/drums_2bar_lokl_small';
var MusicVAE = new musicvae.MusicVAE(modelCheckPoint);
MusicVAE.initialize()
.then(function(MusicVAE) {
Max.post('MusicVAE initialized with model '+modelCheckPoint);
});
I am having this exact same problem.