defaultmaestro-150k
typeenum
value typestring
optionsglitch-440k, jmann-large-580k, maestro-150k, unlocked-250k
{
"batch_size": 1,
"length": 16,
"model_name": "maestro-150k",
"steps": 100
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_ZLb**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run harmonai/dance-diffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"harmonai/dance-diffusion:7f27a989b169da7e984136b1185b294b744f4c38090f4a91c13de5b34a09ee7e",
{
input: {
batch_size: 1,
length: 16,
model_name: "maestro-150k",
steps: 100
}
}
);
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_ZLb**********************************
This is your API token. Keep it to yourself.
import replicate
Run harmonai/dance-diffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"harmonai/dance-diffusion:7f27a989b169da7e984136b1185b294b744f4c38090f4a91c13de5b34a09ee7e",
input={
"batch_size": 1,
"length": 16,
"model_name": "maestro-150k",
"steps": 100
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_ZLb**********************************
This is your API token. Keep it to yourself.
Run harmonai/dance-diffusion 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": "harmonai/dance-diffusion:7f27a989b169da7e984136b1185b294b744f4c38090f4a91c13de5b34a09ee7e",
"input": {
"batch_size": 1,
"length": 16,
"model_name": "maestro-150k",
"steps": 100
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "k4s5kds5freore4udcxupmnnfq",
"model": "harmonai/dance-diffusion",
"version": "7f27a989b169da7e984136b1185b294b744f4c38090f4a91c13de5b34a09ee7e",
"input": {
"batch_size": 1,
"length": 16,
"model_name": "maestro-150k",
"steps": 100
},
"logs": "sample_size 253952\r\nCreating the model...\r\nModel created\r\nAll samples\r\nsample #1\r\ntorch.Size([2, 253952])\r\nSkipping section, uncheck 'skip_for_run_all' to enable",
"output": "https://replicate.delivery/mgxm/de88e589-0ed7-44c8-9ff2-4fd5a943a49e/sample.wav",
"data_removed": false,
"error": "",
"source": "web",
"status": "succeeded",
"created_at": "2022-09-30T00:12:31.829214Z",
"started_at": "2022-09-30T00:18:10Z",
"completed_at": "2022-09-30T00:20:27Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/k4s5kds5freore4udcxupmnnfq/cancel",
"get": "https://api.replicate.com/v1/predictions/k4s5kds5freore4udcxupmnnfq"
},
"metrics": {
"predict_time": 137,
"total_time": 475.170786
}
}