Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"TypeError: Only absolute URLs are supported" & "Only HTTP(S) protocols are supported" #661

Open
jjannone opened this issue Apr 7, 2023 · 3 comments

Comments

@jjannone
Copy link

jjannone commented Apr 7, 2023

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?

@notwaldorf
Copy link
Collaborator

Could you post your code? It's hard to tell what's going on otherwise.

@jjannone
Copy link
Author

jjannone commented Apr 7, 2023

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);

    });

@jackm357
Copy link

I am having this exact same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants