andreasjansson
/
music-inpainting-bert
Music inpainting of melody and chords
Prediction
andreasjansson/music-inpainting-bert:58bdc207IDoz3dif2lijfa3ac2bkzidysbxaStatusSucceededSourceWebHardware–Total durationCreatedInput
- seed
- -1
- notes
- c8 g4 f g.4 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ?
- tempo
- "120"
- chords
- Cmaj7 | Cmaj7 | E-maj7 | E-maj7 | Cmaj7 | Cmaj7 | E-maj7 | E-maj7 | Gmaj7 | Gmaj7 | Fm7 | Fm7 | D-maj7 | E-maj7 | Cmaj7 | Cmaj7
- sample_width
- "10"
- time_signature
- "4"
{ "seed": -1, "notes": "c8 g4 f g.4 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ?", "tempo": "120", "chords": "Cmaj7 | Cmaj7 | E-maj7 | E-maj7 | Cmaj7 | Cmaj7 | E-maj7 | E-maj7 | Gmaj7 | Gmaj7 | Fm7 | Fm7 | D-maj7 | E-maj7 | Cmaj7 | Cmaj7", "sample_width": "10", "time_signature": "4" }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", { input: { seed: -1, notes: "c8 g4 f g.4 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ?", tempo: "120", chords: "Cmaj7 | Cmaj7 | E-maj7 | E-maj7 | Cmaj7 | Cmaj7 | E-maj7 | E-maj7 | Gmaj7 | Gmaj7 | Fm7 | Fm7 | D-maj7 | E-maj7 | Cmaj7 | Cmaj7", sample_width: "10", time_signature: "4" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", input={ "seed": -1, "notes": "c8 g4 f g.4 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ?", "tempo": "120", "chords": "Cmaj7 | Cmaj7 | E-maj7 | E-maj7 | Cmaj7 | Cmaj7 | E-maj7 | E-maj7 | Gmaj7 | Gmaj7 | Fm7 | Fm7 | D-maj7 | E-maj7 | Cmaj7 | Cmaj7", "sample_width": "10", "time_signature": "4" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", "input": { "seed": -1, "notes": "c8 g4 f g.4 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ?", "tempo": "120", "chords": "Cmaj7 | Cmaj7 | E-maj7 | E-maj7 | Cmaj7 | Cmaj7 | E-maj7 | E-maj7 | Gmaj7 | Gmaj7 | Fm7 | Fm7 | D-maj7 | E-maj7 | Cmaj7 | Cmaj7", "sample_width": "10", "time_signature": "4" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run andreasjansson/music-inpainting-bert using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1 \ -i 'seed=-1' \ -i 'notes="c8 g4 f g.4 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ?"' \ -i 'tempo="120"' \ -i 'chords="Cmaj7 | Cmaj7 | E-maj7 | E-maj7 | Cmaj7 | Cmaj7 | E-maj7 | E-maj7 | Gmaj7 | Gmaj7 | Fm7 | Fm7 | D-maj7 | E-maj7 | Cmaj7 | Cmaj7"' \ -i 'sample_width="10"' \ -i 'time_signature="4"'
To learn more, take a look at the Cog documentation.
Pull and run andreasjansson/music-inpainting-bert using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "seed": -1, "notes": "c8 g4 f g.4 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ?", "tempo": "120", "chords": "Cmaj7 | Cmaj7 | E-maj7 | E-maj7 | Cmaj7 | Cmaj7 | E-maj7 | E-maj7 | Gmaj7 | Gmaj7 | Fm7 | Fm7 | D-maj7 | E-maj7 | Cmaj7 | Cmaj7", "sample_width": "10", "time_signature": "4" } }' \ http://localhost:5000/predictions
Output
mp3
Video Player is loading.Current Time 00:00:000/Duration 00:00:000Loaded: 0%00:00:000Stream Type LIVERemaining Time -00:00:0001x- Chapters
- descriptions off, selected
- captions settings, opens captions settings dialog
- captions off, selected
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
midi
out.midi{ "completed_at": "2022-05-03T19:32:26.717006Z", "created_at": "2022-05-03T19:32:17.700984Z", "data_removed": false, "error": null, "id": "oz3dif2lijfa3ac2bkzidysbxa", "input": { "seed": -1, "notes": "c8 g4 f g.4 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ?", "tempo": "120", "chords": "Cmaj7 | Cmaj7 | E-maj7 | E-maj7 | Cmaj7 | Cmaj7 | E-maj7 | E-maj7 | Gmaj7 | Gmaj7 | Fm7 | Fm7 | D-maj7 | E-maj7 | Cmaj7 | Cmaj7", "sample_width": "10", "time_signature": "4" }, "logs": "Using seed: 41511\n0.0 10\n0.1 8\n0.2 6\n0.3 6\n0.4 5\n0.5 4\n0.6 4\n0.7 3\n0.8 2\n0.9 2\n0:0 (0/1 C4), (1/2 G4) Cmaj7 0\n0:1 (1/2 F4) Cmaj7 0\n0:2 (1/2 G4) Cmaj7 0\n3: Invalid pattern: 0\n1:0 (0/1 G4) Cmaj7 1\n1:1 (1/2 G4) Cmaj7 5\n1:2 Cmaj7 9\n2:3 Cmaj7 8\n2:0 (0/1 G4), (1/2 G4) Ebmaj7 10\n2:1 (1/2 B-4) Ebmaj7 9\n2:2 (1/2 G4) Ebmaj7 5\n3:3 Ebmaj7 5\n3:0 Ebmaj7 8\n3:1 Ebmaj7 1\n3:2 Ebmaj7 9\n4:3 Ebmaj7 10\n4:0 (0/1 C4), (1/2 G4) Cmaj7 3\n4:1 (1/2 F4) Cmaj7 6\n4:2 (1/2 G4) Cmaj7 1\n5:3 (0/1 F4) Cmaj7 2\n5:0 (0/1 G4) Cmaj7 5\n5:1 (1/2 G4) Cmaj7 8\n5:2 Cmaj7 1\n6:3 (0/1 G4) Cmaj7 6\n6:0 (0/1 G4), (1/2 G4) Ebmaj7 2\n6:1 (1/2 B-4) Ebmaj7 6\n6:2 (1/2 G4) Ebmaj7 8\n7:3 Ebmaj7 2\n7:0 (1/2 G4) Ebmaj7 4\n7:1 (1/2 B-4) Ebmaj7 4\n7:2 (1/2 G4) Ebmaj7 3\n8:3 Ebmaj7 8\n8:0 (0/1 G4) Gmaj7 9\n8:1 (1/2 G4) Gmaj7 6\n8:2 (1/2 G4) Gmaj7 2\n9:3 (0/1 G4) Gmaj7 9\n9:0 (0/1 G4) Gmaj7 4\n9:1 (1/2 G4) Gmaj7 4\n9:2 (1/2 G4) Gmaj7 10\n10:3 (0/1 G4) Gmaj7 10\n10:0 (0/1 G#4) Fm7 5\n10:1 Fm7 3\n10:2 Fm7 8\n11:3 Fm7 9\n11:0 Fm7 5\n11:1 Fm7 4\n11:2 Fm7 2\n12:3 Fm7 7\n12:0 (0/1 C4), (1/2 G4) Dbmaj7 3\n12:1 (1/2 F4) Dbmaj7 7\n12:2 (1/2 G4) Dbmaj7 6\n13:3 (0/1 G#4) Dbmaj7 10\n13:0 (0/1 B-4) Ebmaj7 7\n13:1 (1/2 G#4) Ebmaj7 3\n13:2 (1/2 G4) Ebmaj7 1\n14:3 Ebmaj7 10\n14:0 (0/1 A4) Cmaj7 4\n14:1 Cmaj7 7\n14:2 Cmaj7 6\n15:3 Cmaj7 7\n15:0 (0/1 C4) Cmaj7 1\n15:1 Cmaj7 7\n15:2 (1/2 G4) Cmaj7 2\n0 pattern\nffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers\n built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)\n configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared\n libavutil 55. 78.100 / 55. 78.100\n libavcodec 57.107.100 / 57.107.100\n libavformat 57. 83.100 / 57. 83.100\n libavdevice 57. 10.100 / 57. 10.100\n libavfilter 6.107.100 / 6.107.100\n libavresample 3. 7. 0 / 3. 7. 0\n libswscale 4. 8.100 / 4. 8.100\n libswresample 2. 9.100 / 2. 9.100\n libpostproc 54. 7.100 / 54. 7.100\nGuessed Channel Layout for Input Stream #0.0 : mono\nInput #0, wav, from '/tmp/tmpnuth5955/out.wav':\n Duration: 00:00:32.50, bitrate: 2822 kb/s\n Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s\nStream mapping:\n Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame))\nPress [q] to stop, [?] for help\nOutput #0, mp3, to '/tmp/tmpnuth5955/out.mp3':\n Metadata:\n TSSE : Lavf57.83.100\n Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp\n Metadata:\n encoder : Lavc57.107.100 libmp3lame\nsize= 252kB time=00:00:32.15 bitrate= 64.1kbits/s speed=72.2x\nvideo:0kB audio:251kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.088168%\nLY output to `/tmp/tmpnuth5955/score.ly'...\nChanging working directory to: `/tmp/tmpnuth5955'\nProcessing `/tmp/tmpnuth5955/score.ly'\nParsing...\nInterpreting music...[8][16][16]\nPreprocessing graphical objects...\nInterpreting music...\nMIDI output to `score.midi'...\nFinding the ideal number of pages...\nFitting music on 1 page...\nDrawing systems...\nLayout output to `score.ps'...\nConverting to PNG...\nSuccess: compilation successfully completed", "metrics": { "predict_time": 8.793683, "total_time": 9.016022 }, "output": { "mp3": "https://replicate.delivery/mgxm/f1a45940-4144-47ce-9695-e994c47ad143/out.mp3", "midi": "https://replicate.delivery/mgxm/f9130a4a-ed2a-4a6a-91d0-bc9cba1df39f/out.midi", "score": "https://replicate.delivery/mgxm/08c47365-c531-403b-8a27-633229bd5932/score.png" }, "started_at": "2022-05-03T19:32:17.923323Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/oz3dif2lijfa3ac2bkzidysbxa", "cancel": "https://api.replicate.com/v1/predictions/oz3dif2lijfa3ac2bkzidysbxa/cancel" }, "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1" }
Generated inUsing seed: 41511 0.0 10 0.1 8 0.2 6 0.3 6 0.4 5 0.5 4 0.6 4 0.7 3 0.8 2 0.9 2 0:0 (0/1 C4), (1/2 G4) Cmaj7 0 0:1 (1/2 F4) Cmaj7 0 0:2 (1/2 G4) Cmaj7 0 3: Invalid pattern: 0 1:0 (0/1 G4) Cmaj7 1 1:1 (1/2 G4) Cmaj7 5 1:2 Cmaj7 9 2:3 Cmaj7 8 2:0 (0/1 G4), (1/2 G4) Ebmaj7 10 2:1 (1/2 B-4) Ebmaj7 9 2:2 (1/2 G4) Ebmaj7 5 3:3 Ebmaj7 5 3:0 Ebmaj7 8 3:1 Ebmaj7 1 3:2 Ebmaj7 9 4:3 Ebmaj7 10 4:0 (0/1 C4), (1/2 G4) Cmaj7 3 4:1 (1/2 F4) Cmaj7 6 4:2 (1/2 G4) Cmaj7 1 5:3 (0/1 F4) Cmaj7 2 5:0 (0/1 G4) Cmaj7 5 5:1 (1/2 G4) Cmaj7 8 5:2 Cmaj7 1 6:3 (0/1 G4) Cmaj7 6 6:0 (0/1 G4), (1/2 G4) Ebmaj7 2 6:1 (1/2 B-4) Ebmaj7 6 6:2 (1/2 G4) Ebmaj7 8 7:3 Ebmaj7 2 7:0 (1/2 G4) Ebmaj7 4 7:1 (1/2 B-4) Ebmaj7 4 7:2 (1/2 G4) Ebmaj7 3 8:3 Ebmaj7 8 8:0 (0/1 G4) Gmaj7 9 8:1 (1/2 G4) Gmaj7 6 8:2 (1/2 G4) Gmaj7 2 9:3 (0/1 G4) Gmaj7 9 9:0 (0/1 G4) Gmaj7 4 9:1 (1/2 G4) Gmaj7 4 9:2 (1/2 G4) Gmaj7 10 10:3 (0/1 G4) Gmaj7 10 10:0 (0/1 G#4) Fm7 5 10:1 Fm7 3 10:2 Fm7 8 11:3 Fm7 9 11:0 Fm7 5 11:1 Fm7 4 11:2 Fm7 2 12:3 Fm7 7 12:0 (0/1 C4), (1/2 G4) Dbmaj7 3 12:1 (1/2 F4) Dbmaj7 7 12:2 (1/2 G4) Dbmaj7 6 13:3 (0/1 G#4) Dbmaj7 10 13:0 (0/1 B-4) Ebmaj7 7 13:1 (1/2 G#4) Ebmaj7 3 13:2 (1/2 G4) Ebmaj7 1 14:3 Ebmaj7 10 14:0 (0/1 A4) Cmaj7 4 14:1 Cmaj7 7 14:2 Cmaj7 6 15:3 Cmaj7 7 15:0 (0/1 C4) Cmaj7 1 15:1 Cmaj7 7 15:2 (1/2 G4) Cmaj7 2 0 pattern ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04) configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Guessed Channel Layout for Input Stream #0.0 : mono Input #0, wav, from '/tmp/tmpnuth5955/out.wav': Duration: 00:00:32.50, bitrate: 2822 kb/s Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s Stream mapping: Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame)) Press [q] to stop, [?] for help Output #0, mp3, to '/tmp/tmpnuth5955/out.mp3': Metadata: TSSE : Lavf57.83.100 Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp Metadata: encoder : Lavc57.107.100 libmp3lame size= 252kB time=00:00:32.15 bitrate= 64.1kbits/s speed=72.2x video:0kB audio:251kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.088168% LY output to `/tmp/tmpnuth5955/score.ly'... Changing working directory to: `/tmp/tmpnuth5955' Processing `/tmp/tmpnuth5955/score.ly' Parsing... Interpreting music...[8][16][16] Preprocessing graphical objects... Interpreting music... MIDI output to `score.midi'... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `score.ps'... Converting to PNG... Success: compilation successfully completed
Prediction
andreasjansson/music-inpainting-bert:58bdc207ID24zmd4jb5rbv7c3y4vckxrkmv4StatusSucceededSourceWebHardware–Total durationCreatedInput
- seed
- -1
- notes
- c.8 c16 c4 G | e.8 e16 e4 c | c.8 e16 g.4 g8 | f.8 e16 d2 | d.8 e16 f4 f | e.8 d16 e4 c | c.8 e16 d4 G | B.8 d16 c2 |
- tempo
- "90"
- chords
- C | ? | ? | ? | ? | ? | ? | C
- sample_width
- "100"
- time_signature
- "3"
{ "seed": -1, "notes": "c.8 c16 c4 G | e.8 e16 e4 c | c.8 e16 g.4 g8 | f.8 e16 d2 | d.8 e16 f4 f | e.8 d16 e4 c | c.8 e16 d4 G | B.8 d16 c2 |", "tempo": "90", "chords": "C | ? | ? | ? | ? | ? | ? | C", "sample_width": "100", "time_signature": "3" }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", { input: { seed: -1, notes: "c.8 c16 c4 G | e.8 e16 e4 c | c.8 e16 g.4 g8 | f.8 e16 d2 | d.8 e16 f4 f | e.8 d16 e4 c | c.8 e16 d4 G | B.8 d16 c2 |", tempo: "90", chords: "C | ? | ? | ? | ? | ? | ? | C", sample_width: "100", time_signature: "3" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", input={ "seed": -1, "notes": "c.8 c16 c4 G | e.8 e16 e4 c | c.8 e16 g.4 g8 | f.8 e16 d2 | d.8 e16 f4 f | e.8 d16 e4 c | c.8 e16 d4 G | B.8 d16 c2 |", "tempo": "90", "chords": "C | ? | ? | ? | ? | ? | ? | C", "sample_width": "100", "time_signature": "3" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", "input": { "seed": -1, "notes": "c.8 c16 c4 G | e.8 e16 e4 c | c.8 e16 g.4 g8 | f.8 e16 d2 | d.8 e16 f4 f | e.8 d16 e4 c | c.8 e16 d4 G | B.8 d16 c2 |", "tempo": "90", "chords": "C | ? | ? | ? | ? | ? | ? | C", "sample_width": "100", "time_signature": "3" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run andreasjansson/music-inpainting-bert using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1 \ -i 'seed=-1' \ -i 'notes="c.8 c16 c4 G | e.8 e16 e4 c | c.8 e16 g.4 g8 | f.8 e16 d2 | d.8 e16 f4 f | e.8 d16 e4 c | c.8 e16 d4 G | B.8 d16 c2 |"' \ -i 'tempo="90"' \ -i 'chords="C | ? | ? | ? | ? | ? | ? | C"' \ -i 'sample_width="100"' \ -i 'time_signature="3"'
To learn more, take a look at the Cog documentation.
Pull and run andreasjansson/music-inpainting-bert using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "seed": -1, "notes": "c.8 c16 c4 G | e.8 e16 e4 c | c.8 e16 g.4 g8 | f.8 e16 d2 | d.8 e16 f4 f | e.8 d16 e4 c | c.8 e16 d4 G | B.8 d16 c2 |", "tempo": "90", "chords": "C | ? | ? | ? | ? | ? | ? | C", "sample_width": "100", "time_signature": "3" } }' \ http://localhost:5000/predictions
Output
mp3
Video Player is loading.Current Time 00:00:000/Duration 00:00:000Loaded: 0%00:00:000Stream Type LIVERemaining Time -00:00:0001x- Chapters
- descriptions off, selected
- captions settings, opens captions settings dialog
- captions off, selected
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
midi
out.midi{ "completed_at": "2022-05-03T19:34:10.862035Z", "created_at": "2022-05-03T19:34:05.259038Z", "data_removed": false, "error": null, "id": "24zmd4jb5rbv7c3y4vckxrkmv4", "input": { "seed": -1, "notes": "c.8 c16 c4 G | e.8 e16 e4 c | c.8 e16 g.4 g8 | f.8 e16 d2 | d.8 e16 f4 f | e.8 d16 e4 c | c.8 e16 d4 G | B.8 d16 c2 |", "tempo": "90", "chords": "C | ? | ? | ? | ? | ? | ? | C", "sample_width": "100", "time_signature": "3" }, "logs": "Using seed: 9849\n0.0 10\n0.1 8\n0.2 6\n0.3 6\n0.4 5\n0.5 4\n0.6 4\n0.7 3\n0.8 2\n0.9 2\n0:0 (0/1 C4), (3/4 C4) C/C 0\n0:1 (0/1 C4) C/C 0\n1:2 (0/1 G3) C/C 0\n1:0 (0/1 E4), (3/4 E4) F/F 0\n1:1 (0/1 E4) C/C 0\n2:2 (0/1 C4) F/F 0\n2:0 (0/1 C4), (3/4 E4) F/F 0\n2:1 (0/1 G4) Bb/Bb 0\n3:2 (1/2 G4) Bb/Bb 0\n3:0 (0/1 F4), (3/4 E4) Bb/Bb 0\n3:1 (0/1 D4) Bb/Bb 0\n4:2 Bb/Bb 0\n4:0 (0/1 D4), (3/4 E4) Bb/Bb 0\n4:1 (0/1 F4) Bb/Bb 0\n5:2 (0/1 F4) Bb/Bb 0\n5:0 (0/1 E4), (3/4 D4) F/F 0\n5:1 (0/1 E4) F/F 0\n6:2 (0/1 C4) F/F 0\n6:0 (0/1 C4), (3/4 E4) F/F 0\n6:1 (0/1 D4) Bb/Bb 0\n7:2 (0/1 G3) Bb/Bb 0\n7:0 (0/1 B3), (3/4 D4) C/C 0\n7:1 (0/1 C4) C/C 0\nffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers\n built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)\n configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared\n libavutil 55. 78.100 / 55. 78.100\n libavcodec 57.107.100 / 57.107.100\n libavformat 57. 83.100 / 57. 83.100\n libavdevice 57. 10.100 / 57. 10.100\n libavfilter 6.107.100 / 6.107.100\n libavresample 3. 7. 0 / 3. 7. 0\n libswscale 4. 8.100 / 4. 8.100\n libswresample 2. 9.100 / 2. 9.100\n libpostproc 54. 7.100 / 54. 7.100\nGuessed Channel Layout for Input Stream #0.0 : mono\nInput #0, wav, from '/tmp/tmpm02acne5/out.wav':\n Duration: 00:00:16.33, bitrate: 2822 kb/s\n Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s\nStream mapping:\n Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame))\nPress [q] to stop, [?] for help\nOutput #0, mp3, to '/tmp/tmpm02acne5/out.mp3':\n Metadata:\n TSSE : Lavf57.83.100\n Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp\n Metadata:\n encoder : Lavc57.107.100 libmp3lame\nsize= 126kB time=00:00:16.00 bitrate= 64.3kbits/s speed=75.6x\nvideo:0kB audio:125kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.176911%\nLY output to `/tmp/tmpm02acne5/score.ly'...\nChanging working directory to: `/tmp/tmpm02acne5'\nProcessing `/tmp/tmpm02acne5/score.ly'\nParsing...\nInterpreting music...[8][8]\nPreprocessing graphical objects...\nInterpreting music...\nMIDI output to `score.midi'...\nFinding the ideal number of pages...\nFitting music on 1 page...\nDrawing systems...\nLayout output to `score.ps'...\nConverting to PNG...\nSuccess: compilation successfully completed", "metrics": { "predict_time": 5.421096, "total_time": 5.602997 }, "output": { "mp3": "https://replicate.delivery/mgxm/3b97edde-20c5-4133-bcc0-2bf1f32fe4bc/out.mp3", "midi": "https://replicate.delivery/mgxm/617b85ed-8055-4c6d-a051-798234d42dc7/out.midi", "score": "https://replicate.delivery/mgxm/be244d4a-31f0-4eea-b028-3a23158b4c11/score.png" }, "started_at": "2022-05-03T19:34:05.440939Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/24zmd4jb5rbv7c3y4vckxrkmv4", "cancel": "https://api.replicate.com/v1/predictions/24zmd4jb5rbv7c3y4vckxrkmv4/cancel" }, "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1" }
Generated inUsing seed: 9849 0.0 10 0.1 8 0.2 6 0.3 6 0.4 5 0.5 4 0.6 4 0.7 3 0.8 2 0.9 2 0:0 (0/1 C4), (3/4 C4) C/C 0 0:1 (0/1 C4) C/C 0 1:2 (0/1 G3) C/C 0 1:0 (0/1 E4), (3/4 E4) F/F 0 1:1 (0/1 E4) C/C 0 2:2 (0/1 C4) F/F 0 2:0 (0/1 C4), (3/4 E4) F/F 0 2:1 (0/1 G4) Bb/Bb 0 3:2 (1/2 G4) Bb/Bb 0 3:0 (0/1 F4), (3/4 E4) Bb/Bb 0 3:1 (0/1 D4) Bb/Bb 0 4:2 Bb/Bb 0 4:0 (0/1 D4), (3/4 E4) Bb/Bb 0 4:1 (0/1 F4) Bb/Bb 0 5:2 (0/1 F4) Bb/Bb 0 5:0 (0/1 E4), (3/4 D4) F/F 0 5:1 (0/1 E4) F/F 0 6:2 (0/1 C4) F/F 0 6:0 (0/1 C4), (3/4 E4) F/F 0 6:1 (0/1 D4) Bb/Bb 0 7:2 (0/1 G3) Bb/Bb 0 7:0 (0/1 B3), (3/4 D4) C/C 0 7:1 (0/1 C4) C/C 0 ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04) configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Guessed Channel Layout for Input Stream #0.0 : mono Input #0, wav, from '/tmp/tmpm02acne5/out.wav': Duration: 00:00:16.33, bitrate: 2822 kb/s Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s Stream mapping: Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame)) Press [q] to stop, [?] for help Output #0, mp3, to '/tmp/tmpm02acne5/out.mp3': Metadata: TSSE : Lavf57.83.100 Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp Metadata: encoder : Lavc57.107.100 libmp3lame size= 126kB time=00:00:16.00 bitrate= 64.3kbits/s speed=75.6x video:0kB audio:125kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.176911% LY output to `/tmp/tmpm02acne5/score.ly'... Changing working directory to: `/tmp/tmpm02acne5' Processing `/tmp/tmpm02acne5/score.ly' Parsing... Interpreting music...[8][8] Preprocessing graphical objects... Interpreting music... MIDI output to `score.midi'... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `score.ps'... Converting to PNG... Success: compilation successfully completed
Prediction
andreasjansson/music-inpainting-bert:58bdc207IDzujeyvjiqzgwldwk4nkflb2jzqStatusSucceededSourceWebHardware–Total durationCreatedInput
- seed
- -1
- notes
- c.4 c8 c4 G | A A G2 | e.4 e8 d4 d | ? | ? | ? | ? | ?
- tempo
- "120"
- chords
- C | ? | ? | ? | ? | ? | ? | ?
- sample_width
- "10"
- time_signature
- "4"
{ "seed": -1, "notes": "c.4 c8 c4 G | A A G2 | e.4 e8 d4 d | ? | ? | ? | ? | ?", "tempo": "120", "chords": "C | ? | ? | ? | ? | ? | ? | ?", "sample_width": "10", "time_signature": "4" }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", { input: { seed: -1, notes: "c.4 c8 c4 G | A A G2 | e.4 e8 d4 d | ? | ? | ? | ? | ?", tempo: "120", chords: "C | ? | ? | ? | ? | ? | ? | ?", sample_width: "10", time_signature: "4" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", input={ "seed": -1, "notes": "c.4 c8 c4 G | A A G2 | e.4 e8 d4 d | ? | ? | ? | ? | ?", "tempo": "120", "chords": "C | ? | ? | ? | ? | ? | ? | ?", "sample_width": "10", "time_signature": "4" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", "input": { "seed": -1, "notes": "c.4 c8 c4 G | A A G2 | e.4 e8 d4 d | ? | ? | ? | ? | ?", "tempo": "120", "chords": "C | ? | ? | ? | ? | ? | ? | ?", "sample_width": "10", "time_signature": "4" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run andreasjansson/music-inpainting-bert using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1 \ -i 'seed=-1' \ -i 'notes="c.4 c8 c4 G | A A G2 | e.4 e8 d4 d | ? | ? | ? | ? | ?"' \ -i 'tempo="120"' \ -i 'chords="C | ? | ? | ? | ? | ? | ? | ?"' \ -i 'sample_width="10"' \ -i 'time_signature="4"'
To learn more, take a look at the Cog documentation.
Pull and run andreasjansson/music-inpainting-bert using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "seed": -1, "notes": "c.4 c8 c4 G | A A G2 | e.4 e8 d4 d | ? | ? | ? | ? | ?", "tempo": "120", "chords": "C | ? | ? | ? | ? | ? | ? | ?", "sample_width": "10", "time_signature": "4" } }' \ http://localhost:5000/predictions
Output
mp3
Video Player is loading.Current Time 00:00:000/Duration 00:00:000Loaded: 0%00:00:000Stream Type LIVERemaining Time -00:00:0001x- Chapters
- descriptions off, selected
- captions settings, opens captions settings dialog
- captions off, selected
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
midi
out.midi{ "completed_at": "2022-05-03T19:35:31.260007Z", "created_at": "2022-05-03T19:35:24.996347Z", "data_removed": false, "error": null, "id": "zujeyvjiqzgwldwk4nkflb2jzq", "input": { "seed": -1, "notes": "c.4 c8 c4 G | A A G2 | e.4 e8 d4 d | ? | ? | ? | ? | ?", "tempo": "120", "chords": "C | ? | ? | ? | ? | ? | ? | ?", "sample_width": "10", "time_signature": "4" }, "logs": "Using seed: 9630\n0.0 10\n0.0 10\n0.1 8\n0.1 8\n0.2 6\n0.2 6\n0.3 6\n0.3 6\n0.4 5\n0.4 5\n0.5 4\n0.5 4\n0.6 4\n0.6 4\n0.7 3\n0.7 3\n0.8 2\n0.8 2\n0.9 2\n0.9 2\n0:0 (0/1 C4) C/C 0\n0:1 (1/2 C4) C/C 0\n0:2 (0/1 C4) C/C 0\n1:3 (0/1 G3) C/C 0\n1:0 (0/1 A3) G7 0\n1:1 (0/1 A3) G7 0\n1:2 (0/1 G3) G7 0\n2:3 G7 0\n2:0 (0/1 E4) C/C 0\n2:1 (1/2 E4) C/C 0\n2:2 (0/1 D4) G7 0\n3:3 (0/1 D4) G7 0\n3:0 (0/1 G3) G7 2\n3:1 (0/1 G3) Dm7 6\n3:2 (0/1 G3) G7 7\n4:3 G7 4\n4:0 (0/1 G4) Dm7 1\n4:1 (1/2 A4) Dm7 10\n4:2 (0/1 G4) Dm7 5\n5:3 (0/1 F4) Dm7 8\n5:0 (0/1 A3) G7 8\n5:1 (0/1 A3) G7 2\n5:2 (0/1 G3) G7 1\n6:3 G7 3\n6:0 (0/1 E4) Dm7 9\n6:1 (1/2 E4) Dm7 6\n6:2 (0/1 D4) Dm7 4\n7:3 (0/1 D4) G7 5\n7:0 (0/1 A3) Dm7 7\n7:1 (0/1 C4) F/F 10\n7:2 (0/1 G3) G7 9\nffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers\n built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)\n configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared\n libavutil 55. 78.100 / 55. 78.100\n libavcodec 57.107.100 / 57.107.100\n libavformat 57. 83.100 / 57. 83.100\n libavdevice 57. 10.100 / 57. 10.100\n libavfilter 6.107.100 / 6.107.100\n libavresample 3. 7. 0 / 3. 7. 0\n libswscale 4. 8.100 / 4. 8.100\n libswresample 2. 9.100 / 2. 9.100\n libpostproc 54. 7.100 / 54. 7.100\nGuessed Channel Layout for Input Stream #0.0 : mono\nInput #0, wav, from '/tmp/tmpk1yxuube/out.wav':\n Duration: 00:00:16.50, bitrate: 2822 kb/s\n Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s\nStream mapping:\n Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame))\nPress [q] to stop, [?] for help\nOutput #0, mp3, to '/tmp/tmpk1yxuube/out.mp3':\n Metadata:\n TSSE : Lavf57.83.100\n Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp\n Metadata:\n encoder : Lavc57.107.100 libmp3lame\nsize= 127kB time=00:00:16.13 bitrate= 64.2kbits/s speed=66.9x\nvideo:0kB audio:126kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.175482%\nLY output to `/tmp/tmpk1yxuube/score.ly'...\nChanging working directory to: `/tmp/tmpk1yxuube'\nProcessing `/tmp/tmpk1yxuube/score.ly'\nParsing...\nInterpreting music...[8][8]\nPreprocessing graphical objects...\nInterpreting music...\nMIDI output to `score.midi'...\nFinding the ideal number of pages...\nFitting music on 1 page...\nDrawing systems...\nLayout output to `score.ps'...\nConverting to PNG...\nSuccess: compilation successfully completed", "metrics": { "predict_time": 6.05063, "total_time": 6.26366 }, "output": { "mp3": "https://replicate.delivery/mgxm/b21c3fb5-0a4e-4187-99a7-7b1432de40f5/out.mp3", "midi": "https://replicate.delivery/mgxm/895421f0-8471-4560-8dd1-a8a05f868948/out.midi", "score": "https://replicate.delivery/mgxm/f8c4fd60-d95b-4ad1-b432-09e0b53494ca/score.png" }, "started_at": "2022-05-03T19:35:25.209377Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/zujeyvjiqzgwldwk4nkflb2jzq", "cancel": "https://api.replicate.com/v1/predictions/zujeyvjiqzgwldwk4nkflb2jzq/cancel" }, "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1" }
Generated inUsing seed: 9630 0.0 10 0.0 10 0.1 8 0.1 8 0.2 6 0.2 6 0.3 6 0.3 6 0.4 5 0.4 5 0.5 4 0.5 4 0.6 4 0.6 4 0.7 3 0.7 3 0.8 2 0.8 2 0.9 2 0.9 2 0:0 (0/1 C4) C/C 0 0:1 (1/2 C4) C/C 0 0:2 (0/1 C4) C/C 0 1:3 (0/1 G3) C/C 0 1:0 (0/1 A3) G7 0 1:1 (0/1 A3) G7 0 1:2 (0/1 G3) G7 0 2:3 G7 0 2:0 (0/1 E4) C/C 0 2:1 (1/2 E4) C/C 0 2:2 (0/1 D4) G7 0 3:3 (0/1 D4) G7 0 3:0 (0/1 G3) G7 2 3:1 (0/1 G3) Dm7 6 3:2 (0/1 G3) G7 7 4:3 G7 4 4:0 (0/1 G4) Dm7 1 4:1 (1/2 A4) Dm7 10 4:2 (0/1 G4) Dm7 5 5:3 (0/1 F4) Dm7 8 5:0 (0/1 A3) G7 8 5:1 (0/1 A3) G7 2 5:2 (0/1 G3) G7 1 6:3 G7 3 6:0 (0/1 E4) Dm7 9 6:1 (1/2 E4) Dm7 6 6:2 (0/1 D4) Dm7 4 7:3 (0/1 D4) G7 5 7:0 (0/1 A3) Dm7 7 7:1 (0/1 C4) F/F 10 7:2 (0/1 G3) G7 9 ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04) configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Guessed Channel Layout for Input Stream #0.0 : mono Input #0, wav, from '/tmp/tmpk1yxuube/out.wav': Duration: 00:00:16.50, bitrate: 2822 kb/s Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s Stream mapping: Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame)) Press [q] to stop, [?] for help Output #0, mp3, to '/tmp/tmpk1yxuube/out.mp3': Metadata: TSSE : Lavf57.83.100 Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp Metadata: encoder : Lavc57.107.100 libmp3lame size= 127kB time=00:00:16.13 bitrate= 64.2kbits/s speed=66.9x video:0kB audio:126kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.175482% LY output to `/tmp/tmpk1yxuube/score.ly'... Changing working directory to: `/tmp/tmpk1yxuube' Processing `/tmp/tmpk1yxuube/score.ly' Parsing... Interpreting music...[8][8] Preprocessing graphical objects... Interpreting music... MIDI output to `score.midi'... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `score.ps'... Converting to PNG... Success: compilation successfully completed
Prediction
andreasjansson/music-inpainting-bert:58bdc207IDzm25glfcfbgfndfbwlulmzsh6mStatusSucceededSourceWebHardware–Total durationCreatedInput
- seed
- -1
- notes
- e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2
- tempo
- "100"
- chords
- Em | Em | Em | Em | Fm | Fm | Em | Em | Fm | Fm | Em | Em | B7 | B7 | Em | Em
- sample_width
- "80"
- time_signature
- "3"
{ "seed": -1, "notes": "e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2", "tempo": "100", "chords": "Em | Em | Em | Em | Fm | Fm | Em | Em | Fm | Fm | Em | Em | B7 | B7 | Em | Em", "sample_width": "80", "time_signature": "3" }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", { input: { seed: -1, notes: "e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2", tempo: "100", chords: "Em | Em | Em | Em | Fm | Fm | Em | Em | Fm | Fm | Em | Em | B7 | B7 | Em | Em", sample_width: "80", time_signature: "3" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", input={ "seed": -1, "notes": "e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2", "tempo": "100", "chords": "Em | Em | Em | Em | Fm | Fm | Em | Em | Fm | Fm | Em | Em | B7 | B7 | Em | Em", "sample_width": "80", "time_signature": "3" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", "input": { "seed": -1, "notes": "e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2", "tempo": "100", "chords": "Em | Em | Em | Em | Fm | Fm | Em | Em | Fm | Fm | Em | Em | B7 | B7 | Em | Em", "sample_width": "80", "time_signature": "3" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run andreasjansson/music-inpainting-bert using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1 \ -i 'seed=-1' \ -i 'notes="e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2"' \ -i 'tempo="100"' \ -i 'chords="Em | Em | Em | Em | Fm | Fm | Em | Em | Fm | Fm | Em | Em | B7 | B7 | Em | Em"' \ -i 'sample_width="80"' \ -i 'time_signature="3"'
To learn more, take a look at the Cog documentation.
Pull and run andreasjansson/music-inpainting-bert using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "seed": -1, "notes": "e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2", "tempo": "100", "chords": "Em | Em | Em | Em | Fm | Fm | Em | Em | Fm | Fm | Em | Em | B7 | B7 | Em | Em", "sample_width": "80", "time_signature": "3" } }' \ http://localhost:5000/predictions
Output
mp3
Video Player is loading.Current Time 00:00:000/Duration 00:00:000Loaded: 0%00:00:000Stream Type LIVERemaining Time -00:00:0001x- Chapters
- descriptions off, selected
- captions settings, opens captions settings dialog
- captions off, selected
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
midi
out.midi{ "completed_at": "2022-05-03T19:30:00.838490Z", "created_at": "2022-05-03T19:29:19.882955Z", "data_removed": false, "error": null, "id": "zm25glfcfbgfndfbwlulmzsh6m", "input": { "seed": -1, "notes": "e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2", "tempo": "100", "chords": "Em | Em | Em | Em | Fm | Fm | Em | Em | Fm | Fm | Em | Em | B7 | B7 | Em | Em", "sample_width": "80", "time_signature": "3" }, "logs": "Using seed: 15241\n0.0 80\n0.1 12\n0.2 9\n0.3 7\n0.4 6\n0.5 5\n0.6 4\n0.7 3\n0.8 3\n0.9 2\n0:0 (0/1 E4) Em/E 0\n0:1 Em/E 0\n1:2 (0/1 F#4) Em/E 0\n1:0 (0/1 G4) Em/E 0\n1:1 (1/2 F#4) Em/E 0\n2:2 (0/1 E4) Em/E 0\n2:0 (0/1 B4) Em/E 0\n2:1 Em/E 0\n3:2 (0/1 B4) Em/E 0\n3:0 (0/1 B4) Em/E 0\n3:1 Em/E 0\n4:2 Em/E 0\n4:0 Fm/F 5\n4:1 (0/1 F4) Fm/F 1\n5:2 (0/1 G#4) Fm/F 8\n5:0 (0/1 G#4) Fm/F 6\n5:1 Fm/F 4\n6:2 Fm/F 4\n6:0 (0/1 E5) Em/E 5\n6:1 Em/E 3\n7:2 (0/1 B4) Em/E 5\n7:0 (0/1 E4) Em/E 6\n7:1 Em/E 7\n8:2 (0/1 B4) Em/E 1\n8:0 (0/1 C5) Fm/F 3\n8:1 Fm/F 8\n9:2 (0/1 E-5) Fm/F 2\n9:0 (0/1 F5) Fm/F 3\n9:1 Fm/F 6\n10:2 (0/1 E-5) Fm/F 1\n10:0 (0/1 E5) Em/E 7\n10:1 Em/E 5\n11:2 (0/1 B4) Em/E 3\n11:0 (0/1 B4) Em/E 8\n11:1 Em/E 7\n12:2 Em/E 2\n12:0 (0/1 B4) B7 2\n12:1 B7 1\n13:2 (0/1 E-5) B7 4\n13:0 (0/1 F#5) B7 7\n13:1 B7 4\n14:2 B7 9\n14:0 (0/1 E5) Em/E 6\n14:1 Em/E 8\n15:2 (0/1 B4) Em/E 2\n15:0 (0/1 E4) Em/E 0\n46: Invalid pattern: 0\n0 pattern\nffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers\n built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)\n configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared\n libavutil 55. 78.100 / 55. 78.100\n libavcodec 57.107.100 / 57.107.100\n libavformat 57. 83.100 / 57. 83.100\n libavdevice 57. 10.100 / 57. 10.100\n libavfilter 6.107.100 / 6.107.100\n libavresample 3. 7. 0 / 3. 7. 0\n libswscale 4. 8.100 / 4. 8.100\n libswresample 2. 9.100 / 2. 9.100\n libpostproc 54. 7.100 / 54. 7.100\nGuessed Channel Layout for Input Stream #0.0 : mono\nInput #0, wav, from '/tmp/tmpollascuu/out.wav':\n Duration: 00:00:29.20, bitrate: 2822 kb/s\n Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s\nStream mapping:\n Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame))\nPress [q] to stop, [?] for help\nOutput #0, mp3, to '/tmp/tmpollascuu/out.mp3':\n Metadata:\n TSSE : Lavf57.83.100\n Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp\n Metadata:\n encoder : Lavc57.107.100 libmp3lame\nsize= 226kB time=00:00:28.83 bitrate= 64.1kbits/s speed=69.5x\nvideo:0kB audio:226kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.098302%\nLY output to `/tmp/tmpollascuu/score.ly'...\nChanging working directory to: `/tmp/tmpollascuu'\nProcessing `/tmp/tmpollascuu/score.ly'\nParsing...\nInterpreting music...[8][16][16]\nPreprocessing graphical objects...\nInterpreting music...\nMIDI output to `score.midi'...\nFinding the ideal number of pages...\nFitting music on 1 page...\nDrawing systems...\nLayout output to `score.ps'...\nConverting to PNG...\nSuccess: compilation successfully completed", "metrics": { "predict_time": 6.815062, "total_time": 40.955535 }, "output": { "mp3": "https://replicate.delivery/mgxm/331241fb-1824-4c82-8b81-4d8b3e803d62/out.mp3", "midi": "https://replicate.delivery/mgxm/9faf7f5c-494a-47eb-b094-8aa66042ece3/out.midi", "score": "https://replicate.delivery/mgxm/ae55a649-7479-4310-821e-bb74e12dd937/score.png" }, "started_at": "2022-05-03T19:29:54.023428Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/zm25glfcfbgfndfbwlulmzsh6m", "cancel": "https://api.replicate.com/v1/predictions/zm25glfcfbgfndfbwlulmzsh6m/cancel" }, "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1" }
Generated inUsing seed: 15241 0.0 80 0.1 12 0.2 9 0.3 7 0.4 6 0.5 5 0.6 4 0.7 3 0.8 3 0.9 2 0:0 (0/1 E4) Em/E 0 0:1 Em/E 0 1:2 (0/1 F#4) Em/E 0 1:0 (0/1 G4) Em/E 0 1:1 (1/2 F#4) Em/E 0 2:2 (0/1 E4) Em/E 0 2:0 (0/1 B4) Em/E 0 2:1 Em/E 0 3:2 (0/1 B4) Em/E 0 3:0 (0/1 B4) Em/E 0 3:1 Em/E 0 4:2 Em/E 0 4:0 Fm/F 5 4:1 (0/1 F4) Fm/F 1 5:2 (0/1 G#4) Fm/F 8 5:0 (0/1 G#4) Fm/F 6 5:1 Fm/F 4 6:2 Fm/F 4 6:0 (0/1 E5) Em/E 5 6:1 Em/E 3 7:2 (0/1 B4) Em/E 5 7:0 (0/1 E4) Em/E 6 7:1 Em/E 7 8:2 (0/1 B4) Em/E 1 8:0 (0/1 C5) Fm/F 3 8:1 Fm/F 8 9:2 (0/1 E-5) Fm/F 2 9:0 (0/1 F5) Fm/F 3 9:1 Fm/F 6 10:2 (0/1 E-5) Fm/F 1 10:0 (0/1 E5) Em/E 7 10:1 Em/E 5 11:2 (0/1 B4) Em/E 3 11:0 (0/1 B4) Em/E 8 11:1 Em/E 7 12:2 Em/E 2 12:0 (0/1 B4) B7 2 12:1 B7 1 13:2 (0/1 E-5) B7 4 13:0 (0/1 F#5) B7 7 13:1 B7 4 14:2 B7 9 14:0 (0/1 E5) Em/E 6 14:1 Em/E 8 15:2 (0/1 B4) Em/E 2 15:0 (0/1 E4) Em/E 0 46: Invalid pattern: 0 0 pattern ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04) configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Guessed Channel Layout for Input Stream #0.0 : mono Input #0, wav, from '/tmp/tmpollascuu/out.wav': Duration: 00:00:29.20, bitrate: 2822 kb/s Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s Stream mapping: Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame)) Press [q] to stop, [?] for help Output #0, mp3, to '/tmp/tmpollascuu/out.mp3': Metadata: TSSE : Lavf57.83.100 Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp Metadata: encoder : Lavc57.107.100 libmp3lame size= 226kB time=00:00:28.83 bitrate= 64.1kbits/s speed=69.5x video:0kB audio:226kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.098302% LY output to `/tmp/tmpollascuu/score.ly'... Changing working directory to: `/tmp/tmpollascuu' Processing `/tmp/tmpollascuu/score.ly' Parsing... Interpreting music...[8][16][16] Preprocessing graphical objects... Interpreting music... MIDI output to `score.midi'... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `score.ps'... Converting to PNG... Success: compilation successfully completed
Prediction
andreasjansson/music-inpainting-bert:58bdc207IDkxipvevgkzgmdeuwighovnegw4StatusSucceededSourceWebHardware–Total durationCreatedInput
- seed
- -1
- notes
- e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2
- tempo
- "80"
- chords
- Em | Em | Am | Am | G | F#7 | B7 | Em
- sample_width
- "40"
- time_signature
- "3"
{ "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "80", "chords": "Em | Em | Am | Am | G | F#7 | B7 | Em", "sample_width": "40", "time_signature": "3" }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", { input: { seed: -1, notes: "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", tempo: "80", chords: "Em | Em | Am | Am | G | F#7 | B7 | Em", sample_width: "40", time_signature: "3" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", input={ "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "80", "chords": "Em | Em | Am | Am | G | F#7 | B7 | Em", "sample_width": "40", "time_signature": "3" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", "input": { "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "80", "chords": "Em | Em | Am | Am | G | F#7 | B7 | Em", "sample_width": "40", "time_signature": "3" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run andreasjansson/music-inpainting-bert using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1 \ -i 'seed=-1' \ -i 'notes="e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2"' \ -i 'tempo="80"' \ -i 'chords="Em | Em | Am | Am | G | F#7 | B7 | Em"' \ -i 'sample_width="40"' \ -i 'time_signature="3"'
To learn more, take a look at the Cog documentation.
Pull and run andreasjansson/music-inpainting-bert using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "80", "chords": "Em | Em | Am | Am | G | F#7 | B7 | Em", "sample_width": "40", "time_signature": "3" } }' \ http://localhost:5000/predictions
Output
mp3
Video Player is loading.Current Time 00:00:000/Duration 00:00:000Loaded: 0%00:00:000Stream Type LIVERemaining Time -00:00:0001x- Chapters
- descriptions off, selected
- captions settings, opens captions settings dialog
- captions off, selected
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
midi
out.midi{ "completed_at": "2022-05-03T19:38:40.143558Z", "created_at": "2022-05-03T19:38:34.533299Z", "data_removed": false, "error": null, "id": "kxipvevgkzgmdeuwighovnegw4", "input": { "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "80", "chords": "Em | Em | Am | Am | G | F#7 | B7 | Em", "sample_width": "40", "time_signature": "3" }, "logs": "Using seed: 11712\n0.0 40\n0.1 11\n0.2 9\n0.3 7\n0.4 6\n0.5 5\n0.6 4\n0.7 3\n0.8 3\n0.9 2\n0:0 (0/1 E4) Em/E 0\n0:1 (1/2 F#4) Em/E 0\n1:2 (0/1 G4), (1/2 A4) Em/E 0\n1:0 (0/1 B4) Em/E 6\n1:1 Em/E 6\n2:2 (0/1 G4), (1/2 A4) Em/E 3\n2:0 (0/1 E4) Am/A 8\n2:1 Am/A 3\n3:2 (0/1 E4) Am/A 4\n3:0 (0/1 A4) Am/A 2\n3:1 Am/A 5\n4:2 (0/1 E4) Am/A 7\n4:0 (0/1 D4) G/G 4\n4:1 G/G 7\n5:2 (0/1 G4) G/G 5\n5:0 (0/1 F#4) Gb7 2\n5:1 Gb7 1\n6:2 (0/1 G4), (1/2 A4) Gb7 1\n6:0 (0/1 B4) B7 0\n6:1 (1/2 A4) B7 0\n7:2 (0/1 G4), (1/2 F#4) B7 0\n7:0 (0/1 E4) Em/E 0\n22: Invalid pattern: 0\n0 pattern\nffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers\n built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)\n configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared\n libavutil 55. 78.100 / 55. 78.100\n libavcodec 57.107.100 / 57.107.100\n libavformat 57. 83.100 / 57. 83.100\n libavdevice 57. 10.100 / 57. 10.100\n libavfilter 6.107.100 / 6.107.100\n libavresample 3. 7. 0 / 3. 7. 0\n libswscale 4. 8.100 / 4. 8.100\n libswresample 2. 9.100 / 2. 9.100\n libpostproc 54. 7.100 / 54. 7.100\nGuessed Channel Layout for Input Stream #0.0 : mono\nInput #0, wav, from '/tmp/tmpwjjxutc0/out.wav':\n Duration: 00:00:18.25, bitrate: 2822 kb/s\n Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s\nStream mapping:\n Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame))\nPress [q] to stop, [?] for help\nOutput #0, mp3, to '/tmp/tmpwjjxutc0/out.mp3':\n Metadata:\n TSSE : Lavf57.83.100\n Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp\n Metadata:\n encoder : Lavc57.107.100 libmp3lame\nsize= 140kB time=00:00:17.91 bitrate= 64.2kbits/s speed=71.9x\nvideo:0kB audio:140kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.158113%\nLY output to `/tmp/tmpwjjxutc0/score.ly'...\nChanging working directory to: `/tmp/tmpwjjxutc0'\nProcessing `/tmp/tmpwjjxutc0/score.ly'\nParsing...\nInterpreting music...[8][8]\nPreprocessing graphical objects...\nInterpreting music...\nMIDI output to `score.midi'...\nFinding the ideal number of pages...\nFitting music on 1 page...\nDrawing systems...\nLayout output to `score.ps'...\nConverting to PNG...\nSuccess: compilation successfully completed", "metrics": { "predict_time": 5.294946, "total_time": 5.610259 }, "output": { "mp3": "https://replicate.delivery/mgxm/7b6ca49d-2941-4077-a588-d188feab16ab/out.mp3", "midi": "https://replicate.delivery/mgxm/fc8c5ed7-0134-44f5-8e8e-8757b2dc8ebb/out.midi", "score": "https://replicate.delivery/mgxm/e5854084-04ef-4001-ba75-7d0cf9f14246/score.png" }, "started_at": "2022-05-03T19:38:34.848612Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/kxipvevgkzgmdeuwighovnegw4", "cancel": "https://api.replicate.com/v1/predictions/kxipvevgkzgmdeuwighovnegw4/cancel" }, "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1" }
Generated inUsing seed: 11712 0.0 40 0.1 11 0.2 9 0.3 7 0.4 6 0.5 5 0.6 4 0.7 3 0.8 3 0.9 2 0:0 (0/1 E4) Em/E 0 0:1 (1/2 F#4) Em/E 0 1:2 (0/1 G4), (1/2 A4) Em/E 0 1:0 (0/1 B4) Em/E 6 1:1 Em/E 6 2:2 (0/1 G4), (1/2 A4) Em/E 3 2:0 (0/1 E4) Am/A 8 2:1 Am/A 3 3:2 (0/1 E4) Am/A 4 3:0 (0/1 A4) Am/A 2 3:1 Am/A 5 4:2 (0/1 E4) Am/A 7 4:0 (0/1 D4) G/G 4 4:1 G/G 7 5:2 (0/1 G4) G/G 5 5:0 (0/1 F#4) Gb7 2 5:1 Gb7 1 6:2 (0/1 G4), (1/2 A4) Gb7 1 6:0 (0/1 B4) B7 0 6:1 (1/2 A4) B7 0 7:2 (0/1 G4), (1/2 F#4) B7 0 7:0 (0/1 E4) Em/E 0 22: Invalid pattern: 0 0 pattern ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04) configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Guessed Channel Layout for Input Stream #0.0 : mono Input #0, wav, from '/tmp/tmpwjjxutc0/out.wav': Duration: 00:00:18.25, bitrate: 2822 kb/s Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s Stream mapping: Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame)) Press [q] to stop, [?] for help Output #0, mp3, to '/tmp/tmpwjjxutc0/out.mp3': Metadata: TSSE : Lavf57.83.100 Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp Metadata: encoder : Lavc57.107.100 libmp3lame size= 140kB time=00:00:17.91 bitrate= 64.2kbits/s speed=71.9x video:0kB audio:140kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.158113% LY output to `/tmp/tmpwjjxutc0/score.ly'... Changing working directory to: `/tmp/tmpwjjxutc0' Processing `/tmp/tmpwjjxutc0/score.ly' Parsing... Interpreting music...[8][8] Preprocessing graphical objects... Interpreting music... MIDI output to `score.midi'... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `score.ps'... Converting to PNG... Success: compilation successfully completed
Prediction
andreasjansson/music-inpainting-bert:58bdc207IDiswjari2ujbqdosk65rrv7qogyStatusSucceededSourceWebHardware–Total durationCreatedInput
- seed
- -1
- notes
- e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2
- tempo
- "100"
- chords
- Em | Em | Am | Am | G | F#7 | B7 | Em
- sample_width
- "71"
- time_signature
- "3"
{ "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "100", "chords": "Em | Em | Am | Am | G | F#7 | B7 | Em", "sample_width": "71", "time_signature": "3" }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", { input: { seed: -1, notes: "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", tempo: "100", chords: "Em | Em | Am | Am | G | F#7 | B7 | Em", sample_width: "71", time_signature: "3" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", input={ "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "100", "chords": "Em | Em | Am | Am | G | F#7 | B7 | Em", "sample_width": "71", "time_signature": "3" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", "input": { "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "100", "chords": "Em | Em | Am | Am | G | F#7 | B7 | Em", "sample_width": "71", "time_signature": "3" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run andreasjansson/music-inpainting-bert using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1 \ -i 'seed=-1' \ -i 'notes="e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2"' \ -i 'tempo="100"' \ -i 'chords="Em | Em | Am | Am | G | F#7 | B7 | Em"' \ -i 'sample_width="71"' \ -i 'time_signature="3"'
To learn more, take a look at the Cog documentation.
Pull and run andreasjansson/music-inpainting-bert using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "100", "chords": "Em | Em | Am | Am | G | F#7 | B7 | Em", "sample_width": "71", "time_signature": "3" } }' \ http://localhost:5000/predictions
Output
mp3
Video Player is loading.Current Time 00:00:000/Duration 00:00:000Loaded: 0%00:00:000Stream Type LIVERemaining Time -00:00:0001x- Chapters
- descriptions off, selected
- captions settings, opens captions settings dialog
- captions off, selected
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
midi
out.midi{ "completed_at": "2022-05-03T19:38:55.711719Z", "created_at": "2022-05-03T19:38:50.253598Z", "data_removed": false, "error": null, "id": "iswjari2ujbqdosk65rrv7qogy", "input": { "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "100", "chords": "Em | Em | Am | Am | G | F#7 | B7 | Em", "sample_width": "71", "time_signature": "3" }, "logs": "Using seed: 38187\n0.0 71\n0.1 12\n0.2 9\n0.3 7\n0.4 6\n0.5 5\n0.6 4\n0.7 3\n0.8 3\n0.9 2\n0:0 (0/1 E4) Em/E 0\n0:1 (1/2 F#4) Em/E 0\n1:2 (0/1 G4), (1/2 A4) Em/E 0\n1:0 (0/1 E5) Em/E 8\n1:1 (1/2 B4) Em/E 3\n2:2 (0/1 A4), (1/2 G4) Em/E 5\n2:0 (0/1 E5) Am/A 3\n2:1 (1/2 A4) Am/A 1\n3:2 (0/1 G4), (1/2 F#4) Am/A 6\n3:0 (0/1 E4) Am/A 6\n3:1 Am/A 4\n4:2 (0/1 E4) Am/A 7\n4:0 (0/1 G4) G/G 5\n4:1 (1/2 F#4) G/G 1\n5:2 (0/1 G4), (1/2 A4) G/G 2\n5:0 (0/1 B-4) Gb7 4\n5:1 (1/2 E4) Gb7 2\n6:2 (0/1 E-4), (1/2 E4) Gb7 7\n6:0 (0/1 B4) B7 0\n6:1 (1/2 A4) B7 0\n7:2 (0/1 G4), (1/2 F#4) B7 0\n7:0 (0/1 E4) Em/E 0\n22: Invalid pattern: 0\n0 pattern\nffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers\n built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)\n configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared\n libavutil 55. 78.100 / 55. 78.100\n libavcodec 57.107.100 / 57.107.100\n libavformat 57. 83.100 / 57. 83.100\n libavdevice 57. 10.100 / 57. 10.100\n libavfilter 6.107.100 / 6.107.100\n libavresample 3. 7. 0 / 3. 7. 0\n libswscale 4. 8.100 / 4. 8.100\n libswresample 2. 9.100 / 2. 9.100\n libpostproc 54. 7.100 / 54. 7.100\nGuessed Channel Layout for Input Stream #0.0 : mono\nInput #0, wav, from '/tmp/tmpmfne4bxm/out.wav':\n Duration: 00:00:14.80, bitrate: 2822 kb/s\n Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s\nStream mapping:\n Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame))\nPress [q] to stop, [?] for help\nOutput #0, mp3, to '/tmp/tmpmfne4bxm/out.mp3':\n Metadata:\n TSSE : Lavf57.83.100\n Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp\n Metadata:\n encoder : Lavc57.107.100 libmp3lame\nsize= 114kB time=00:00:14.49 bitrate= 64.2kbits/s speed=69.1x\nvideo:0kB audio:113kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.195366%\nLY output to `/tmp/tmpmfne4bxm/score.ly'...\nChanging working directory to: `/tmp/tmpmfne4bxm'\nProcessing `/tmp/tmpmfne4bxm/score.ly'\nParsing...\nInterpreting music...[8][8]\nPreprocessing graphical objects...\nInterpreting music...\nMIDI output to `score.midi'...\nFinding the ideal number of pages...\nFitting music on 1 page...\nDrawing systems...\nLayout output to `score.ps'...\nConverting to PNG...\nSuccess: compilation successfully completed", "metrics": { "predict_time": 5.242744, "total_time": 5.458121 }, "output": { "mp3": "https://replicate.delivery/mgxm/43253dc0-8969-44ed-ac44-bf9d5d6c02d2/out.mp3", "midi": "https://replicate.delivery/mgxm/fd389619-4065-4c91-9080-d80fb0279c03/out.midi", "score": "https://replicate.delivery/mgxm/333d178b-6827-4fdc-a061-1e574fb6a84c/score.png" }, "started_at": "2022-05-03T19:38:50.468975Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/iswjari2ujbqdosk65rrv7qogy", "cancel": "https://api.replicate.com/v1/predictions/iswjari2ujbqdosk65rrv7qogy/cancel" }, "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1" }
Generated inUsing seed: 38187 0.0 71 0.1 12 0.2 9 0.3 7 0.4 6 0.5 5 0.6 4 0.7 3 0.8 3 0.9 2 0:0 (0/1 E4) Em/E 0 0:1 (1/2 F#4) Em/E 0 1:2 (0/1 G4), (1/2 A4) Em/E 0 1:0 (0/1 E5) Em/E 8 1:1 (1/2 B4) Em/E 3 2:2 (0/1 A4), (1/2 G4) Em/E 5 2:0 (0/1 E5) Am/A 3 2:1 (1/2 A4) Am/A 1 3:2 (0/1 G4), (1/2 F#4) Am/A 6 3:0 (0/1 E4) Am/A 6 3:1 Am/A 4 4:2 (0/1 E4) Am/A 7 4:0 (0/1 G4) G/G 5 4:1 (1/2 F#4) G/G 1 5:2 (0/1 G4), (1/2 A4) G/G 2 5:0 (0/1 B-4) Gb7 4 5:1 (1/2 E4) Gb7 2 6:2 (0/1 E-4), (1/2 E4) Gb7 7 6:0 (0/1 B4) B7 0 6:1 (1/2 A4) B7 0 7:2 (0/1 G4), (1/2 F#4) B7 0 7:0 (0/1 E4) Em/E 0 22: Invalid pattern: 0 0 pattern ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04) configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Guessed Channel Layout for Input Stream #0.0 : mono Input #0, wav, from '/tmp/tmpmfne4bxm/out.wav': Duration: 00:00:14.80, bitrate: 2822 kb/s Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s Stream mapping: Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame)) Press [q] to stop, [?] for help Output #0, mp3, to '/tmp/tmpmfne4bxm/out.mp3': Metadata: TSSE : Lavf57.83.100 Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp Metadata: encoder : Lavc57.107.100 libmp3lame size= 114kB time=00:00:14.49 bitrate= 64.2kbits/s speed=69.1x video:0kB audio:113kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.195366% LY output to `/tmp/tmpmfne4bxm/score.ly'... Changing working directory to: `/tmp/tmpmfne4bxm' Processing `/tmp/tmpmfne4bxm/score.ly' Parsing... Interpreting music...[8][8] Preprocessing graphical objects... Interpreting music... MIDI output to `score.midi'... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `score.ps'... Converting to PNG... Success: compilation successfully completed
Prediction
andreasjansson/music-inpainting-bert:58bdc207IDogj47dc2vfcjdhzpyelk5xhqbmStatusSucceededSourceWebHardware–Total durationCreatedInput
- seed
- -1
- notes
- e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2
- tempo
- "120"
- chords
- Em | Em | Am | Am | G | F#7 | B7 | Em
- sample_width
- "141"
- time_signature
- "3"
{ "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "120", "chords": "Em | Em | Am | Am | G | F#7 | B7 | Em", "sample_width": "141", "time_signature": "3" }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", { input: { seed: -1, notes: "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", tempo: "120", chords: "Em | Em | Am | Am | G | F#7 | B7 | Em", sample_width: "141", time_signature: "3" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", input={ "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "120", "chords": "Em | Em | Am | Am | G | F#7 | B7 | Em", "sample_width": "141", "time_signature": "3" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", "input": { "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "120", "chords": "Em | Em | Am | Am | G | F#7 | B7 | Em", "sample_width": "141", "time_signature": "3" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run andreasjansson/music-inpainting-bert using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1 \ -i 'seed=-1' \ -i 'notes="e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2"' \ -i 'tempo="120"' \ -i 'chords="Em | Em | Am | Am | G | F#7 | B7 | Em"' \ -i 'sample_width="141"' \ -i 'time_signature="3"'
To learn more, take a look at the Cog documentation.
Pull and run andreasjansson/music-inpainting-bert using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "120", "chords": "Em | Em | Am | Am | G | F#7 | B7 | Em", "sample_width": "141", "time_signature": "3" } }' \ http://localhost:5000/predictions
Output
mp3
Video Player is loading.Current Time 00:00:000/Duration 00:00:000Loaded: 0%00:00:000Stream Type LIVERemaining Time -00:00:0001x- Chapters
- descriptions off, selected
- captions settings, opens captions settings dialog
- captions off, selected
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
midi
out.midi{ "completed_at": "2022-05-03T19:30:12.879646Z", "created_at": "2022-05-03T19:29:35.406661Z", "data_removed": false, "error": null, "id": "ogj47dc2vfcjdhzpyelk5xhqbm", "input": { "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "120", "chords": "Em | Em | Am | Am | G | F#7 | B7 | Em", "sample_width": "141", "time_signature": "3" }, "logs": "Using seed: 15564\n0.0 141\n0.1 12\n0.2 9\n0.3 7\n0.4 6\n0.5 5\n0.6 4\n0.7 3\n0.8 3\n0.9 2\n0:0 (0/1 E4) Em/E 0\n0:1 (1/2 F#4) Em/E 0\n1:2 (0/1 G4), (1/2 A4) Em/E 0\n1:0 (0/1 G4) Em/E 2\n1:1 Em/E 6\n2:2 (0/1 E4) Em/E 3\n2:0 (0/1 A5) Am/A 1\n2:1 (1/2 B5) Am/A 8\n3:2 (0/1 A5), (1/2 G5) Am/A 6\n3:0 (0/1 A5) Am/A 4\n3:1 Am/A 2\n4:2 (0/1 E5) Am/A 5\n4:0 (0/1 D5) G/G 5\n4:1 (1/2 E5) G/G 3\n5:2 (0/1 D5), (1/2 B4) G/G 7\n5:0 (0/1 C#5) Gb7 4\n5:1 (1/2 C5) Gb7 7\n6:2 (0/1 C#5), (1/2 C5) Gb7 1\n6:0 (0/1 B4) B7 0\n6:1 (1/2 A4) B7 0\n7:2 (0/1 G4), (1/2 F#4) B7 0\n7:0 (0/1 E4) Em/E 0\n22: Invalid pattern: 0\n0 pattern\nffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers\n built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)\n configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared\n libavutil 55. 78.100 / 55. 78.100\n libavcodec 57.107.100 / 57.107.100\n libavformat 57. 83.100 / 57. 83.100\n libavdevice 57. 10.100 / 57. 10.100\n libavfilter 6.107.100 / 6.107.100\n libavresample 3. 7. 0 / 3. 7. 0\n libswscale 4. 8.100 / 4. 8.100\n libswresample 2. 9.100 / 2. 9.100\n libpostproc 54. 7.100 / 54. 7.100\nGuessed Channel Layout for Input Stream #0.0 : mono\nInput #0, wav, from '/tmp/tmprvn1r7he/out.wav':\n Duration: 00:00:12.50, bitrate: 2822 kb/s\n Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s\nStream mapping:\n Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame))\nPress [q] to stop, [?] for help\nOutput #0, mp3, to '/tmp/tmprvn1r7he/out.mp3':\n Metadata:\n TSSE : Lavf57.83.100\n Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp\n Metadata:\n encoder : Lavc57.107.100 libmp3lame\nsize= 96kB time=00:00:12.17 bitrate= 64.3kbits/s speed=67.9x\nvideo:0kB audio:95kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.232599%\nLY output to `/tmp/tmprvn1r7he/score.ly'...\nChanging working directory to: `/tmp/tmprvn1r7he'\nProcessing `/tmp/tmprvn1r7he/score.ly'\nParsing...\nInterpreting music...[8][8]\nPreprocessing graphical objects...\nInterpreting music...\nMIDI output to `score.midi'...\nFinding the ideal number of pages...\nFitting music on 1 page...\nDrawing systems...\nLayout output to `score.ps'...\nConverting to PNG...\nSuccess: compilation successfully completed", "metrics": { "predict_time": 5.021412, "total_time": 37.472985 }, "output": { "mp3": "https://replicate.delivery/mgxm/6bdd94b2-624d-4940-b5c4-f69aad428ff0/out.mp3", "midi": "https://replicate.delivery/mgxm/93fcf4bc-29be-4869-8430-2fe18146f2b4/out.midi", "score": "https://replicate.delivery/mgxm/a9c24d17-7d7e-48f2-9c71-a8830b355ded/score.png" }, "started_at": "2022-05-03T19:30:07.858234Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/ogj47dc2vfcjdhzpyelk5xhqbm", "cancel": "https://api.replicate.com/v1/predictions/ogj47dc2vfcjdhzpyelk5xhqbm/cancel" }, "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1" }
Generated inUsing seed: 15564 0.0 141 0.1 12 0.2 9 0.3 7 0.4 6 0.5 5 0.6 4 0.7 3 0.8 3 0.9 2 0:0 (0/1 E4) Em/E 0 0:1 (1/2 F#4) Em/E 0 1:2 (0/1 G4), (1/2 A4) Em/E 0 1:0 (0/1 G4) Em/E 2 1:1 Em/E 6 2:2 (0/1 E4) Em/E 3 2:0 (0/1 A5) Am/A 1 2:1 (1/2 B5) Am/A 8 3:2 (0/1 A5), (1/2 G5) Am/A 6 3:0 (0/1 A5) Am/A 4 3:1 Am/A 2 4:2 (0/1 E5) Am/A 5 4:0 (0/1 D5) G/G 5 4:1 (1/2 E5) G/G 3 5:2 (0/1 D5), (1/2 B4) G/G 7 5:0 (0/1 C#5) Gb7 4 5:1 (1/2 C5) Gb7 7 6:2 (0/1 C#5), (1/2 C5) Gb7 1 6:0 (0/1 B4) B7 0 6:1 (1/2 A4) B7 0 7:2 (0/1 G4), (1/2 F#4) B7 0 7:0 (0/1 E4) Em/E 0 22: Invalid pattern: 0 0 pattern ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04) configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Guessed Channel Layout for Input Stream #0.0 : mono Input #0, wav, from '/tmp/tmprvn1r7he/out.wav': Duration: 00:00:12.50, bitrate: 2822 kb/s Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s Stream mapping: Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame)) Press [q] to stop, [?] for help Output #0, mp3, to '/tmp/tmprvn1r7he/out.mp3': Metadata: TSSE : Lavf57.83.100 Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp Metadata: encoder : Lavc57.107.100 libmp3lame size= 96kB time=00:00:12.17 bitrate= 64.3kbits/s speed=67.9x video:0kB audio:95kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.232599% LY output to `/tmp/tmprvn1r7he/score.ly'... Changing working directory to: `/tmp/tmprvn1r7he' Processing `/tmp/tmprvn1r7he/score.ly' Parsing... Interpreting music...[8][8] Preprocessing graphical objects... Interpreting music... MIDI output to `score.midi'... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `score.ps'... Converting to PNG... Success: compilation successfully completed
Prediction
andreasjansson/music-inpainting-bert:58bdc207IDs75tnt2fzndm3f7j23k67iooseStatusSucceededSourceWebHardware–Total durationCreatedInput
- seed
- -1
- notes
- e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2
- tempo
- "120"
- chords
- Em | Gm | ? | ? | ? | ? | B7 | Em
- sample_width
- "20"
- time_signature
- "3"
{ "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "120", "chords": "Em | Gm | ? | ? | ? | ? | B7 | Em", "sample_width": "20", "time_signature": "3" }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", { input: { seed: -1, notes: "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", tempo: "120", chords: "Em | Gm | ? | ? | ? | ? | B7 | Em", sample_width: "20", time_signature: "3" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", input={ "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "120", "chords": "Em | Gm | ? | ? | ? | ? | B7 | Em", "sample_width": "20", "time_signature": "3" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", "input": { "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "120", "chords": "Em | Gm | ? | ? | ? | ? | B7 | Em", "sample_width": "20", "time_signature": "3" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run andreasjansson/music-inpainting-bert using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1 \ -i 'seed=-1' \ -i 'notes="e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2"' \ -i 'tempo="120"' \ -i 'chords="Em | Gm | ? | ? | ? | ? | B7 | Em"' \ -i 'sample_width="20"' \ -i 'time_signature="3"'
To learn more, take a look at the Cog documentation.
Pull and run andreasjansson/music-inpainting-bert using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "120", "chords": "Em | Gm | ? | ? | ? | ? | B7 | Em", "sample_width": "20", "time_signature": "3" } }' \ http://localhost:5000/predictions
Output
mp3
Video Player is loading.Current Time 00:00:000/Duration 00:00:000Loaded: 0%00:00:000Stream Type LIVERemaining Time -00:00:0001x- Chapters
- descriptions off, selected
- captions settings, opens captions settings dialog
- captions off, selected
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
midi
out.midi{ "completed_at": "2022-05-03T19:40:26.128693Z", "created_at": "2022-05-03T19:40:20.342151Z", "data_removed": false, "error": null, "id": "s75tnt2fzndm3f7j23k67ioose", "input": { "seed": -1, "notes": "e.4 f#8 g a | ? | ? | ? | ? | ? | b.4 a8 g f# | e.2", "tempo": "120", "chords": "Em | Gm | ? | ? | ? | ? | B7 | Em", "sample_width": "20", "time_signature": "3" }, "logs": "Using seed: 28689\n0.0 20\n0.0 10\n0.1 10\n0.1 8\n0.2 8\n0.2 6\n0.3 6\n0.3 6\n0.4 5\n0.4 5\n0.5 5\n0.5 4\n0.6 4\n0.6 4\n0.7 3\n0.7 3\n0.8 3\n0.8 2\n0.9 2\n0.9 2\n0:0 (0/1 E4) Em/E 0\n0:1 (1/2 F#4) Em/E 0\n1:2 (0/1 G4), (1/2 A4) Em/E 0\n1:0 (0/1 E4) Gm/G 6\n1:1 (1/2 F#4) Gm/G 3\n2:2 (0/1 G4), (1/2 A4) Gm/G 5\n2:0 (0/1 B4) B7 4\n2:1 (1/2 A4) Em/E 8\n3:2 (0/1 G4), (1/2 F#4) B7 6\n3:0 (0/1 E4) Em/E 2\n3:1 (0/1 F#4) B/B 7\n4:2 (0/1 E4) Em/E 1\n4:0 (0/1 E4) Em/E 2\n4:1 (1/2 F#4) Em/E 5\n5:2 (0/1 G4), (1/2 F#4) Em/E 4\n5:0 (0/1 A4) Em/E 1\n5:1 (1/2 G4) Em/E 7\n6:2 (0/1 B4) D/D 3\n6:0 (0/1 B4) B7 0\n6:1 (1/2 A4) B7 0\n7:2 (0/1 G4), (1/2 F#4) B7 0\n7:0 (0/1 E4) Em/E 0\n22: Invalid pattern: 0\n0 pattern\nffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers\n built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)\n configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared\n libavutil 55. 78.100 / 55. 78.100\n libavcodec 57.107.100 / 57.107.100\n libavformat 57. 83.100 / 57. 83.100\n libavdevice 57. 10.100 / 57. 10.100\n libavfilter 6.107.100 / 6.107.100\n libavresample 3. 7. 0 / 3. 7. 0\n libswscale 4. 8.100 / 4. 8.100\n libswresample 2. 9.100 / 2. 9.100\n libpostproc 54. 7.100 / 54. 7.100\nGuessed Channel Layout for Input Stream #0.0 : mono\nInput #0, wav, from '/tmp/tmp1dnjwv2e/out.wav':\n Duration: 00:00:12.50, bitrate: 2822 kb/s\n Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s\nStream mapping:\n Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame))\nPress [q] to stop, [?] for help\nOutput #0, mp3, to '/tmp/tmp1dnjwv2e/out.mp3':\n Metadata:\n TSSE : Lavf57.83.100\n Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp\n Metadata:\n encoder : Lavc57.107.100 libmp3lame\nsize= 96kB time=00:00:12.17 bitrate= 64.3kbits/s speed=68.7x\nvideo:0kB audio:95kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.232599%\nLY output to `/tmp/tmp1dnjwv2e/score.ly'...\nChanging working directory to: `/tmp/tmp1dnjwv2e'\nProcessing `/tmp/tmp1dnjwv2e/score.ly'\nParsing...\nInterpreting music...[8][8]\nPreprocessing graphical objects...\nInterpreting music...\nMIDI output to `score.midi'...\nFinding the ideal number of pages...\nFitting music on 1 page...\nDrawing systems...\nLayout output to `score.ps'...\nConverting to PNG...\nSuccess: compilation successfully completed", "metrics": { "predict_time": 5.467024, "total_time": 5.786542 }, "output": { "mp3": "https://replicate.delivery/mgxm/622fb988-66ef-4750-a4a7-17e272a2b563/out.mp3", "midi": "https://replicate.delivery/mgxm/26998427-15ca-4bd7-aa1b-488cf1f09037/out.midi", "score": "https://replicate.delivery/mgxm/b0e22731-7e46-4f81-a3e2-6f9efc975eae/score.png" }, "started_at": "2022-05-03T19:40:20.661669Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/s75tnt2fzndm3f7j23k67ioose", "cancel": "https://api.replicate.com/v1/predictions/s75tnt2fzndm3f7j23k67ioose/cancel" }, "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1" }
Generated inUsing seed: 28689 0.0 20 0.0 10 0.1 10 0.1 8 0.2 8 0.2 6 0.3 6 0.3 6 0.4 5 0.4 5 0.5 5 0.5 4 0.6 4 0.6 4 0.7 3 0.7 3 0.8 3 0.8 2 0.9 2 0.9 2 0:0 (0/1 E4) Em/E 0 0:1 (1/2 F#4) Em/E 0 1:2 (0/1 G4), (1/2 A4) Em/E 0 1:0 (0/1 E4) Gm/G 6 1:1 (1/2 F#4) Gm/G 3 2:2 (0/1 G4), (1/2 A4) Gm/G 5 2:0 (0/1 B4) B7 4 2:1 (1/2 A4) Em/E 8 3:2 (0/1 G4), (1/2 F#4) B7 6 3:0 (0/1 E4) Em/E 2 3:1 (0/1 F#4) B/B 7 4:2 (0/1 E4) Em/E 1 4:0 (0/1 E4) Em/E 2 4:1 (1/2 F#4) Em/E 5 5:2 (0/1 G4), (1/2 F#4) Em/E 4 5:0 (0/1 A4) Em/E 1 5:1 (1/2 G4) Em/E 7 6:2 (0/1 B4) D/D 3 6:0 (0/1 B4) B7 0 6:1 (1/2 A4) B7 0 7:2 (0/1 G4), (1/2 F#4) B7 0 7:0 (0/1 E4) Em/E 0 22: Invalid pattern: 0 0 pattern ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04) configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Guessed Channel Layout for Input Stream #0.0 : mono Input #0, wav, from '/tmp/tmp1dnjwv2e/out.wav': Duration: 00:00:12.50, bitrate: 2822 kb/s Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s Stream mapping: Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame)) Press [q] to stop, [?] for help Output #0, mp3, to '/tmp/tmp1dnjwv2e/out.mp3': Metadata: TSSE : Lavf57.83.100 Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp Metadata: encoder : Lavc57.107.100 libmp3lame size= 96kB time=00:00:12.17 bitrate= 64.3kbits/s speed=68.7x video:0kB audio:95kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.232599% LY output to `/tmp/tmp1dnjwv2e/score.ly'... Changing working directory to: `/tmp/tmp1dnjwv2e' Processing `/tmp/tmp1dnjwv2e/score.ly' Parsing... Interpreting music...[8][8] Preprocessing graphical objects... Interpreting music... MIDI output to `score.midi'... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `score.ps'... Converting to PNG... Success: compilation successfully completed
Prediction
andreasjansson/music-inpainting-bert:58bdc207IDqfzlgox7krattbnistlqzyq6qeStatusSucceededSourceWebHardware–Total durationCreatedInput
- seed
- -1
- notes
- e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2
- tempo
- "100"
- chords
- Em | Em | Em | Em | Fm | Fm | Em | Em | Fm | Fm | Em | Em | B7 | B7 | Em | Em
- sample_width
- "80"
- time_signature
- "3"
{ "seed": -1, "notes": "e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2", "tempo": "100", "chords": "Em | Em | Em | Em | Fm | Fm | Em | Em | Fm | Fm | Em | Em | B7 | B7 | Em | Em", "sample_width": "80", "time_signature": "3" }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", { input: { seed: -1, notes: "e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2", tempo: "100", chords: "Em | Em | Em | Em | Fm | Fm | Em | Em | Fm | Fm | Em | Em | B7 | B7 | Em | Em", sample_width: "80", time_signature: "3" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", input={ "seed": -1, "notes": "e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2", "tempo": "100", "chords": "Em | Em | Em | Em | Fm | Fm | Em | Em | Fm | Fm | Em | Em | B7 | B7 | Em | Em", "sample_width": "80", "time_signature": "3" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", "input": { "seed": -1, "notes": "e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2", "tempo": "100", "chords": "Em | Em | Em | Em | Fm | Fm | Em | Em | Fm | Fm | Em | Em | B7 | B7 | Em | Em", "sample_width": "80", "time_signature": "3" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run andreasjansson/music-inpainting-bert using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1 \ -i 'seed=-1' \ -i 'notes="e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2"' \ -i 'tempo="100"' \ -i 'chords="Em | Em | Em | Em | Fm | Fm | Em | Em | Fm | Fm | Em | Em | B7 | B7 | Em | Em"' \ -i 'sample_width="80"' \ -i 'time_signature="3"'
To learn more, take a look at the Cog documentation.
Pull and run andreasjansson/music-inpainting-bert using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "seed": -1, "notes": "e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2", "tempo": "100", "chords": "Em | Em | Em | Em | Fm | Fm | Em | Em | Fm | Fm | Em | Em | B7 | B7 | Em | Em", "sample_width": "80", "time_signature": "3" } }' \ http://localhost:5000/predictions
Output
mp3
Video Player is loading.Current Time 00:00:000/Duration 00:00:000Loaded: 0%00:00:000Stream Type LIVERemaining Time -00:00:0001x- Chapters
- descriptions off, selected
- captions settings, opens captions settings dialog
- captions off, selected
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
midi
out.midi{ "completed_at": "2022-05-03T19:30:32.763896Z", "created_at": "2022-05-03T19:29:39.113688Z", "data_removed": false, "error": null, "id": "qfzlgox7krattbnistlqzyq6qe", "input": { "seed": -1, "notes": "e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2", "tempo": "100", "chords": "Em | Em | Em | Em | Fm | Fm | Em | Em | Fm | Fm | Em | Em | B7 | B7 | Em | Em", "sample_width": "80", "time_signature": "3" }, "logs": "Using seed: 15436\n0.0 80\n0.1 12\n0.2 9\n0.3 7\n0.4 6\n0.5 5\n0.6 4\n0.7 3\n0.8 3\n0.9 2\n0:0 (0/1 E4) Em/E 0\n0:1 Em/E 0\n1:2 (0/1 F#4) Em/E 0\n1:0 (0/1 G4) Em/E 0\n1:1 (1/2 F#4) Em/E 0\n2:2 (0/1 E4) Em/E 0\n2:0 (0/1 B4) Em/E 0\n2:1 Em/E 0\n3:2 (0/1 B4) Em/E 0\n3:0 (0/1 B4) Em/E 0\n3:1 Em/E 0\n4:2 Em/E 0\n4:0 (0/1 G#4) Fm/F 6\n4:1 Fm/F 6\n5:2 (0/1 F4) Fm/F 5\n5:0 (0/1 G#4) Fm/F 4\n5:1 Fm/F 1\n6:2 Fm/F 2\n6:0 (0/1 G4) Em/E 3\n6:1 (0/1 E4) Em/E 8\n7:2 Em/E 8\n7:0 Em/E 5\n7:1 Em/E 5\n8:2 Em/E 6\n8:0 (0/1 F5) Fm/F 7\n8:1 Fm/F 4\n9:2 (0/1 F5) Fm/F 3\n9:0 (0/1 F5) Fm/F 2\n9:1 Fm/F 4\n10:2 Fm/F 9\n10:0 (0/1 E5) Em/E 3\n10:1 Em/E 5\n11:2 (0/1 B4) Em/E 7\n11:0 (0/1 B4) Em/E 2\n11:1 Em/E 4\n12:2 Em/E 2\n12:0 (0/1 F#4) B7 3\n12:1 (0/1 B4) B7 1\n13:2 (0/1 E-5) B7 8\n13:0 (0/1 F#5) B7 7\n13:1 (1/2 E5) B7 1\n14:2 (0/1 E-5) B7 6\n14:0 (0/1 B4) Em/E 7\n14:1 Em/E 8\n15:2 (0/1 E4), (1/2 G4) Em/E 1\n15:0 (0/1 E4) Em/E 0\n46: Invalid pattern: 0\n0 pattern\nffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers\n built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)\n configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared\n libavutil 55. 78.100 / 55. 78.100\n libavcodec 57.107.100 / 57.107.100\n libavformat 57. 83.100 / 57. 83.100\n libavdevice 57. 10.100 / 57. 10.100\n libavfilter 6.107.100 / 6.107.100\n libavresample 3. 7. 0 / 3. 7. 0\n libswscale 4. 8.100 / 4. 8.100\n libswresample 2. 9.100 / 2. 9.100\n libpostproc 54. 7.100 / 54. 7.100\nGuessed Channel Layout for Input Stream #0.0 : mono\nInput #0, wav, from '/tmp/tmp_345nbx1/out.wav':\n Duration: 00:00:29.20, bitrate: 2822 kb/s\n Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s\nStream mapping:\n Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame))\nPress [q] to stop, [?] for help\nOutput #0, mp3, to '/tmp/tmp_345nbx1/out.mp3':\n Metadata:\n TSSE : Lavf57.83.100\n Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp\n Metadata:\n encoder : Lavc57.107.100 libmp3lame\nsize= 226kB time=00:00:28.83 bitrate= 64.1kbits/s speed=71.9x\nvideo:0kB audio:226kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.098302%\nLY output to `/tmp/tmp_345nbx1/score.ly'...\nChanging working directory to: `/tmp/tmp_345nbx1'\nProcessing `/tmp/tmp_345nbx1/score.ly'\nParsing...\nInterpreting music...[8][16][16]\nPreprocessing graphical objects...\nInterpreting music...\nMIDI output to `score.midi'...\nFinding the ideal number of pages...\nFitting music on 1 page...\nDrawing systems...\nLayout output to `score.ps'...\nConverting to PNG...\nSuccess: compilation successfully completed", "metrics": { "predict_time": 20.019826, "total_time": 53.650208 }, "output": { "mp3": "https://replicate.delivery/mgxm/70f4aa51-bf99-471b-b9f0-a6ffc234926e/out.mp3", "midi": "https://replicate.delivery/mgxm/4a3375d4-e29e-4fbd-8351-0641e0466a21/out.midi", "score": "https://replicate.delivery/mgxm/4fd2a875-d3a5-47f9-bfcf-b7cd8a99ca1c/score.png" }, "started_at": "2022-05-03T19:30:12.744070Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/qfzlgox7krattbnistlqzyq6qe", "cancel": "https://api.replicate.com/v1/predictions/qfzlgox7krattbnistlqzyq6qe/cancel" }, "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1" }
Generated inUsing seed: 15436 0.0 80 0.1 12 0.2 9 0.3 7 0.4 6 0.5 5 0.6 4 0.7 3 0.8 3 0.9 2 0:0 (0/1 E4) Em/E 0 0:1 Em/E 0 1:2 (0/1 F#4) Em/E 0 1:0 (0/1 G4) Em/E 0 1:1 (1/2 F#4) Em/E 0 2:2 (0/1 E4) Em/E 0 2:0 (0/1 B4) Em/E 0 2:1 Em/E 0 3:2 (0/1 B4) Em/E 0 3:0 (0/1 B4) Em/E 0 3:1 Em/E 0 4:2 Em/E 0 4:0 (0/1 G#4) Fm/F 6 4:1 Fm/F 6 5:2 (0/1 F4) Fm/F 5 5:0 (0/1 G#4) Fm/F 4 5:1 Fm/F 1 6:2 Fm/F 2 6:0 (0/1 G4) Em/E 3 6:1 (0/1 E4) Em/E 8 7:2 Em/E 8 7:0 Em/E 5 7:1 Em/E 5 8:2 Em/E 6 8:0 (0/1 F5) Fm/F 7 8:1 Fm/F 4 9:2 (0/1 F5) Fm/F 3 9:0 (0/1 F5) Fm/F 2 9:1 Fm/F 4 10:2 Fm/F 9 10:0 (0/1 E5) Em/E 3 10:1 Em/E 5 11:2 (0/1 B4) Em/E 7 11:0 (0/1 B4) Em/E 2 11:1 Em/E 4 12:2 Em/E 2 12:0 (0/1 F#4) B7 3 12:1 (0/1 B4) B7 1 13:2 (0/1 E-5) B7 8 13:0 (0/1 F#5) B7 7 13:1 (1/2 E5) B7 1 14:2 (0/1 E-5) B7 6 14:0 (0/1 B4) Em/E 7 14:1 Em/E 8 15:2 (0/1 E4), (1/2 G4) Em/E 1 15:0 (0/1 E4) Em/E 0 46: Invalid pattern: 0 0 pattern ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04) configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Guessed Channel Layout for Input Stream #0.0 : mono Input #0, wav, from '/tmp/tmp_345nbx1/out.wav': Duration: 00:00:29.20, bitrate: 2822 kb/s Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s Stream mapping: Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame)) Press [q] to stop, [?] for help Output #0, mp3, to '/tmp/tmp_345nbx1/out.mp3': Metadata: TSSE : Lavf57.83.100 Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp Metadata: encoder : Lavc57.107.100 libmp3lame size= 226kB time=00:00:28.83 bitrate= 64.1kbits/s speed=71.9x video:0kB audio:226kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.098302% LY output to `/tmp/tmp_345nbx1/score.ly'... Changing working directory to: `/tmp/tmp_345nbx1' Processing `/tmp/tmp_345nbx1/score.ly' Parsing... Interpreting music...[8][16][16] Preprocessing graphical objects... Interpreting music... MIDI output to `score.midi'... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `score.ps'... Converting to PNG... Success: compilation successfully completed
Prediction
andreasjansson/music-inpainting-bert:58bdc207ID6d4inmhz6vadrpbq6g7zgmrbu4StatusSucceededSourceWebHardware–Total durationCreatedInput
- seed
- -1
- notes
- e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2
- tempo
- "100"
- chords
- Em | Em | Em | Em | Am | Am | ? | ? | ? | ? | ? | ? | B7 | B7 | Em | Em
- sample_width
- "80"
- time_signature
- "3"
{ "seed": -1, "notes": "e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2", "tempo": "100", "chords": "Em | Em | Em | Em | Am | Am | ? | ? | ? | ? | ? | ? | B7 | B7 | Em | Em", "sample_width": "80", "time_signature": "3" }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", { input: { seed: -1, notes: "e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2", tempo: "100", chords: "Em | Em | Em | Em | Am | Am | ? | ? | ? | ? | ? | ? | B7 | B7 | Em | Em", sample_width: "80", time_signature: "3" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/music-inpainting-bert:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", input={ "seed": -1, "notes": "e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2", "tempo": "100", "chords": "Em | Em | Em | Em | Am | Am | ? | ? | ? | ? | ? | ? | B7 | B7 | Em | Em", "sample_width": "80", "time_signature": "3" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run andreasjansson/music-inpainting-bert using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1", "input": { "seed": -1, "notes": "e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2", "tempo": "100", "chords": "Em | Em | Em | Em | Am | Am | ? | ? | ? | ? | ? | ? | B7 | B7 | Em | Em", "sample_width": "80", "time_signature": "3" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run andreasjansson/music-inpainting-bert using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1 \ -i 'seed=-1' \ -i 'notes="e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2"' \ -i 'tempo="100"' \ -i 'chords="Em | Em | Em | Em | Am | Am | ? | ? | ? | ? | ? | ? | B7 | B7 | Em | Em"' \ -i 'sample_width="80"' \ -i 'time_signature="3"'
To learn more, take a look at the Cog documentation.
Pull and run andreasjansson/music-inpainting-bert using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/andreasjansson/music-inpainting-bert@sha256:58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "seed": -1, "notes": "e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2", "tempo": "100", "chords": "Em | Em | Em | Em | Am | Am | ? | ? | ? | ? | ? | ? | B7 | B7 | Em | Em", "sample_width": "80", "time_signature": "3" } }' \ http://localhost:5000/predictions
Output
mp3
Video Player is loading.Current Time 00:00:000/Duration 00:00:000Loaded: 0%00:00:000Stream Type LIVERemaining Time -00:00:0001x- Chapters
- descriptions off, selected
- captions settings, opens captions settings dialog
- captions off, selected
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
midi
out.midi{ "completed_at": "2022-05-03T19:42:15.728031Z", "created_at": "2022-05-03T19:42:08.098990Z", "data_removed": false, "error": null, "id": "6d4inmhz6vadrpbq6g7zgmrbu4", "input": { "seed": -1, "notes": "e2 f#4 | g.4 f#8 e4 | b2 b4 | b.2 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | e.2", "tempo": "100", "chords": "Em | Em | Em | Em | Am | Am | ? | ? | ? | ? | ? | ? | B7 | B7 | Em | Em", "sample_width": "80", "time_signature": "3" }, "logs": "Using seed: 23529\n0.0 80\n0.0 10\n0.1 12\n0.1 8\n0.2 9\n0.2 6\n0.3 7\n0.3 6\n0.4 6\n0.4 5\n0.5 5\n0.5 4\n0.6 4\n0.6 4\n0.7 3\n0.7 3\n0.8 3\n0.8 2\n0.9 2\n0.9 2\n0:0 (0/1 E4) Em/E 0\n0:1 Em/E 0\n1:2 (0/1 F#4) Em/E 0\n1:0 (0/1 G4) Em/E 0\n1:1 (1/2 F#4) Em/E 0\n2:2 (0/1 E4) Em/E 0\n2:0 (0/1 B4) Em/E 0\n2:1 Em/E 0\n3:2 (0/1 B4) Em/E 0\n3:0 (0/1 B4) Em/E 0\n3:1 Em/E 0\n4:2 Em/E 0\n4:0 (0/1 G4) Am/A 7\n4:1 (0/1 F#4) Am/A 4\n5:2 (0/1 E4) Am/A 6\n5:0 (0/1 G4) Am/A 3\n5:1 (0/1 F#4) Am/A 5\n6:2 (0/1 E4) Am/A 1\n6:0 (0/1 F#4) Em/E 7\n6:1 (0/1 E4) Em/E 2\n7:2 (0/1 G4) Em/E 5\n7:0 (0/1 B4) Em/E 4\n7:1 Em/E 8\n8:2 Em/E 8\n8:0 (0/1 B4) Em/E 3\n8:1 Em/E 5\n9:2 (0/1 B4), (1/2 B4) Em/E 6\n9:0 (0/1 B4) Am/A 2\n9:1 (0/1 A4) Am/A 6\n10:2 (0/1 G4) Am/A 7\n10:0 (0/1 B4), (1/2 G4) Em/E 1\n10:1 (0/1 E4) Em/E 4\n11:2 Em/E 2\n11:0 (0/1 E4) Em/E 2\n11:1 (0/1 E-4) Em/E 9\n12:2 (0/1 D4) Em/E 1\n12:0 (0/1 E-4) B7 3\n12:1 B7 4\n13:2 (0/1 E-4), (1/2 E-4) B7 7\n13:0 (0/1 F#4) B7 5\n13:1 (0/1 E-4) B7 3\n14:2 (1/2 B3) B7 1\n14:0 (0/1 E4) Em/E 6\n14:1 Em/E 8\n15:2 Em/E 8\n15:0 (0/1 E4) Em/E 0\n46: Invalid pattern: 0\n0 pattern\nffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers\n built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)\n configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared\n libavutil 55. 78.100 / 55. 78.100\n libavcodec 57.107.100 / 57.107.100\n libavformat 57. 83.100 / 57. 83.100\n libavdevice 57. 10.100 / 57. 10.100\n libavfilter 6.107.100 / 6.107.100\n libavresample 3. 7. 0 / 3. 7. 0\n libswscale 4. 8.100 / 4. 8.100\n libswresample 2. 9.100 / 2. 9.100\n libpostproc 54. 7.100 / 54. 7.100\nGuessed Channel Layout for Input Stream #0.0 : mono\nInput #0, wav, from '/tmp/tmp_fuotcp4/out.wav':\n Duration: 00:00:29.20, bitrate: 2822 kb/s\n Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s\nStream mapping:\n Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame))\nPress [q] to stop, [?] for help\nOutput #0, mp3, to '/tmp/tmp_fuotcp4/out.mp3':\n Metadata:\n TSSE : Lavf57.83.100\n Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp\n Metadata:\n encoder : Lavc57.107.100 libmp3lame\nsize= 226kB time=00:00:28.83 bitrate= 64.1kbits/s speed=68.2x\nvideo:0kB audio:226kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.098302%\nLY output to `/tmp/tmp_fuotcp4/score.ly'...\nChanging working directory to: `/tmp/tmp_fuotcp4'\nProcessing `/tmp/tmp_fuotcp4/score.ly'\nParsing...\nInterpreting music...[8][16][16]\nPreprocessing graphical objects...\nInterpreting music...\nMIDI output to `score.midi'...\nFinding the ideal number of pages...\nFitting music on 1 page...\nDrawing systems...\nLayout output to `score.ps'...\nConverting to PNG...\nSuccess: compilation successfully completed", "metrics": { "predict_time": 7.443402, "total_time": 7.629041 }, "output": { "mp3": "https://replicate.delivery/mgxm/967ac956-4d23-4b2e-8d25-70165285ced9/out.mp3", "midi": "https://replicate.delivery/mgxm/380e6ecf-b993-4e2e-9743-6efd965fca28/out.midi", "score": "https://replicate.delivery/mgxm/fd0dd91d-939c-447d-b252-83d920918c22/score.png" }, "started_at": "2022-05-03T19:42:08.284629Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/6d4inmhz6vadrpbq6g7zgmrbu4", "cancel": "https://api.replicate.com/v1/predictions/6d4inmhz6vadrpbq6g7zgmrbu4/cancel" }, "version": "58bdc2073c9c07abcc4200fe808e15b1a555dbb1390e70f5daa6b3d81bd11fb1" }
Generated inUsing seed: 23529 0.0 80 0.0 10 0.1 12 0.1 8 0.2 9 0.2 6 0.3 7 0.3 6 0.4 6 0.4 5 0.5 5 0.5 4 0.6 4 0.6 4 0.7 3 0.7 3 0.8 3 0.8 2 0.9 2 0.9 2 0:0 (0/1 E4) Em/E 0 0:1 Em/E 0 1:2 (0/1 F#4) Em/E 0 1:0 (0/1 G4) Em/E 0 1:1 (1/2 F#4) Em/E 0 2:2 (0/1 E4) Em/E 0 2:0 (0/1 B4) Em/E 0 2:1 Em/E 0 3:2 (0/1 B4) Em/E 0 3:0 (0/1 B4) Em/E 0 3:1 Em/E 0 4:2 Em/E 0 4:0 (0/1 G4) Am/A 7 4:1 (0/1 F#4) Am/A 4 5:2 (0/1 E4) Am/A 6 5:0 (0/1 G4) Am/A 3 5:1 (0/1 F#4) Am/A 5 6:2 (0/1 E4) Am/A 1 6:0 (0/1 F#4) Em/E 7 6:1 (0/1 E4) Em/E 2 7:2 (0/1 G4) Em/E 5 7:0 (0/1 B4) Em/E 4 7:1 Em/E 8 8:2 Em/E 8 8:0 (0/1 B4) Em/E 3 8:1 Em/E 5 9:2 (0/1 B4), (1/2 B4) Em/E 6 9:0 (0/1 B4) Am/A 2 9:1 (0/1 A4) Am/A 6 10:2 (0/1 G4) Am/A 7 10:0 (0/1 B4), (1/2 G4) Em/E 1 10:1 (0/1 E4) Em/E 4 11:2 Em/E 2 11:0 (0/1 E4) Em/E 2 11:1 (0/1 E-4) Em/E 9 12:2 (0/1 D4) Em/E 1 12:0 (0/1 E-4) B7 3 12:1 B7 4 13:2 (0/1 E-4), (1/2 E-4) B7 7 13:0 (0/1 F#4) B7 5 13:1 (0/1 E-4) B7 3 14:2 (1/2 B3) B7 1 14:0 (0/1 E4) Em/E 6 14:1 Em/E 8 15:2 Em/E 8 15:0 (0/1 E4) Em/E 0 46: Invalid pattern: 0 0 pattern ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04) configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Guessed Channel Layout for Input Stream #0.0 : mono Input #0, wav, from '/tmp/tmp_fuotcp4/out.wav': Duration: 00:00:29.20, bitrate: 2822 kb/s Stream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s Stream mapping: Stream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame)) Press [q] to stop, [?] for help Output #0, mp3, to '/tmp/tmp_fuotcp4/out.mp3': Metadata: TSSE : Lavf57.83.100 Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp Metadata: encoder : Lavc57.107.100 libmp3lame size= 226kB time=00:00:28.83 bitrate= 64.1kbits/s speed=68.2x video:0kB audio:226kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.098302% LY output to `/tmp/tmp_fuotcp4/score.ly'... Changing working directory to: `/tmp/tmp_fuotcp4' Processing `/tmp/tmp_fuotcp4/score.ly' Parsing... Interpreting music...[8][16][16] Preprocessing graphical objects... Interpreting music... MIDI output to `score.midi'... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `score.ps'... Converting to PNG... Success: compilation successfully completed
Want to make some of these yourself?
Run this model