Readme
A music album cover generator
album cover generator
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run pengdaqian2020/albums-cover using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"pengdaqian2020/albums-cover:c0920776a6e3a839fb7848fe682ecd9540c3bf7657f1a46b2aa74060a7b7ce0b",
{
input: {
width: 512,
height: 768,
prompt: "a photo of an astronaut riding a horse on mars",
scheduler: "DPMSolverMultistep",
num_outputs: 1,
guidance_scale: 7.5,
num_inference_steps: 20
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run pengdaqian2020/albums-cover using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"pengdaqian2020/albums-cover:c0920776a6e3a839fb7848fe682ecd9540c3bf7657f1a46b2aa74060a7b7ce0b",
input={
"width": 512,
"height": 768,
"prompt": "a photo of an astronaut riding a horse on mars",
"scheduler": "DPMSolverMultistep",
"num_outputs": 1,
"guidance_scale": 7.5,
"num_inference_steps": 20
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run pengdaqian2020/albums-cover 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": "c0920776a6e3a839fb7848fe682ecd9540c3bf7657f1a46b2aa74060a7b7ce0b",
"input": {
"width": 512,
"height": 768,
"prompt": "a photo of an astronaut riding a horse on mars",
"scheduler": "DPMSolverMultistep",
"num_outputs": 1,
"guidance_scale": 7.5,
"num_inference_steps": 20
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
brew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run pengdaqian2020/albums-cover using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/pengdaqian2020/albums-cover@sha256:c0920776a6e3a839fb7848fe682ecd9540c3bf7657f1a46b2aa74060a7b7ce0b \
-i 'width=512' \
-i 'height=768' \
-i 'prompt="a photo of an astronaut riding a horse on mars"' \
-i 'scheduler="DPMSolverMultistep"' \
-i 'num_outputs=1' \
-i 'guidance_scale=7.5' \
-i 'num_inference_steps=20'
To learn more, take a look at the Cog documentation.
Pull and run pengdaqian2020/albums-cover 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/pengdaqian2020/albums-cover@sha256:c0920776a6e3a839fb7848fe682ecd9540c3bf7657f1a46b2aa74060a7b7ce0b
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "width": 512, "height": 768, "prompt": "a photo of an astronaut riding a horse on mars", "scheduler": "DPMSolverMultistep", "num_outputs": 1, "guidance_scale": 7.5, "num_inference_steps": 20 } }' \ http://localhost:5000/predictions
Add a payment method to run this model.
Each run costs approximately $0.032. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
{
"completed_at": "2023-05-14T16:44:43.021702Z",
"created_at": "2023-05-14T16:44:35.112333Z",
"data_removed": false,
"error": null,
"id": "3kljtjnjz5gynbcnwdm6a64nui",
"input": {
"width": "512",
"height": 768,
"prompt": "a photo of an astronaut riding a horse on mars",
"scheduler": "DPMSolverMultistep",
"num_outputs": 1,
"guidance_scale": 7.5,
"num_inference_steps": 20
},
"logs": "Using seed: 45078\nThe config attributes {'clip_sample_range': 1.0} were passed to PNDMScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.\nThe config attributes {'clip_sample_range': 1.0} were passed to LMSDiscreteScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.\nThe config attributes {'clip_sample_range': 1.0} were passed to DDIMScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.\nThe config attributes {'clip_sample_range': 1.0} were passed to EulerDiscreteScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.\nThe config attributes {'clip_sample_range': 1.0} were passed to EulerAncestralDiscreteScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.\nThe config attributes {'clip_sample_range': 1.0} were passed to DPMSolverMultistepScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.\n 0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:00<00:07, 2.48it/s]\n 10%|█ | 2/20 [00:00<00:06, 2.81it/s]\n 15%|█▌ | 3/20 [00:01<00:05, 2.92it/s]\n 20%|██ | 4/20 [00:01<00:05, 2.96it/s]\n 25%|██▌ | 5/20 [00:01<00:04, 3.00it/s]\n 30%|███ | 6/20 [00:02<00:04, 3.03it/s]\n 35%|███▌ | 7/20 [00:02<00:04, 3.03it/s]\n 40%|████ | 8/20 [00:02<00:03, 3.04it/s]\n 45%|████▌ | 9/20 [00:03<00:03, 3.05it/s]\n 50%|█████ | 10/20 [00:03<00:03, 3.04it/s]\n 55%|█████▌ | 11/20 [00:03<00:02, 3.05it/s]\n 60%|██████ | 12/20 [00:03<00:02, 3.06it/s]\n 65%|██████▌ | 13/20 [00:04<00:02, 3.06it/s]\n 70%|███████ | 14/20 [00:04<00:01, 3.06it/s]\n 75%|███████▌ | 15/20 [00:04<00:01, 3.06it/s]\n 80%|████████ | 16/20 [00:05<00:01, 3.05it/s]\n 85%|████████▌ | 17/20 [00:05<00:00, 3.05it/s]\n 90%|█████████ | 18/20 [00:05<00:00, 3.06it/s]\n 95%|█████████▌| 19/20 [00:06<00:00, 3.07it/s]\n100%|██████████| 20/20 [00:06<00:00, 3.05it/s]\n100%|██████████| 20/20 [00:06<00:00, 3.02it/s]",
"metrics": {
"predict_time": 7.866256,
"total_time": 7.909369
},
"output": [
"https://replicate.delivery/pbxt/0kp7qcXBwGY9AhTeJUSDgvfuDyBPeysAWef2DmcN48DVfB7OE/out-0.png"
],
"started_at": "2023-05-14T16:44:35.155446Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/3kljtjnjz5gynbcnwdm6a64nui",
"cancel": "https://api.replicate.com/v1/predictions/3kljtjnjz5gynbcnwdm6a64nui/cancel"
},
"version": "c0920776a6e3a839fb7848fe682ecd9540c3bf7657f1a46b2aa74060a7b7ce0b"
}
Using seed: 45078
The config attributes {'clip_sample_range': 1.0} were passed to PNDMScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.
The config attributes {'clip_sample_range': 1.0} were passed to LMSDiscreteScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.
The config attributes {'clip_sample_range': 1.0} were passed to DDIMScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.
The config attributes {'clip_sample_range': 1.0} were passed to EulerDiscreteScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.
The config attributes {'clip_sample_range': 1.0} were passed to EulerAncestralDiscreteScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.
The config attributes {'clip_sample_range': 1.0} were passed to DPMSolverMultistepScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.
0%| | 0/20 [00:00<?, ?it/s]
5%|▌ | 1/20 [00:00<00:07, 2.48it/s]
10%|█ | 2/20 [00:00<00:06, 2.81it/s]
15%|█▌ | 3/20 [00:01<00:05, 2.92it/s]
20%|██ | 4/20 [00:01<00:05, 2.96it/s]
25%|██▌ | 5/20 [00:01<00:04, 3.00it/s]
30%|███ | 6/20 [00:02<00:04, 3.03it/s]
35%|███▌ | 7/20 [00:02<00:04, 3.03it/s]
40%|████ | 8/20 [00:02<00:03, 3.04it/s]
45%|████▌ | 9/20 [00:03<00:03, 3.05it/s]
50%|█████ | 10/20 [00:03<00:03, 3.04it/s]
55%|█████▌ | 11/20 [00:03<00:02, 3.05it/s]
60%|██████ | 12/20 [00:03<00:02, 3.06it/s]
65%|██████▌ | 13/20 [00:04<00:02, 3.06it/s]
70%|███████ | 14/20 [00:04<00:01, 3.06it/s]
75%|███████▌ | 15/20 [00:04<00:01, 3.06it/s]
80%|████████ | 16/20 [00:05<00:01, 3.05it/s]
85%|████████▌ | 17/20 [00:05<00:00, 3.05it/s]
90%|█████████ | 18/20 [00:05<00:00, 3.06it/s]
95%|█████████▌| 19/20 [00:06<00:00, 3.07it/s]
100%|██████████| 20/20 [00:06<00:00, 3.05it/s]
100%|██████████| 20/20 [00:06<00:00, 3.02it/s]
This model costs approximately $0.032 to run on Replicate, or 31 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.
This model runs on Nvidia T4 GPU hardware. Predictions typically complete within 142 seconds. The predict time for this model varies significantly based on the inputs.
A music album cover generator
This model is cold. You'll get a fast response if the model is warm and already running, and a slower response if the model is cold and starting up.
Using seed: 45078
The config attributes {'clip_sample_range': 1.0} were passed to PNDMScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.
The config attributes {'clip_sample_range': 1.0} were passed to LMSDiscreteScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.
The config attributes {'clip_sample_range': 1.0} were passed to DDIMScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.
The config attributes {'clip_sample_range': 1.0} were passed to EulerDiscreteScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.
The config attributes {'clip_sample_range': 1.0} were passed to EulerAncestralDiscreteScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.
The config attributes {'clip_sample_range': 1.0} were passed to DPMSolverMultistepScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.
0%| | 0/20 [00:00<?, ?it/s]
5%|▌ | 1/20 [00:00<00:07, 2.48it/s]
10%|█ | 2/20 [00:00<00:06, 2.81it/s]
15%|█▌ | 3/20 [00:01<00:05, 2.92it/s]
20%|██ | 4/20 [00:01<00:05, 2.96it/s]
25%|██▌ | 5/20 [00:01<00:04, 3.00it/s]
30%|███ | 6/20 [00:02<00:04, 3.03it/s]
35%|███▌ | 7/20 [00:02<00:04, 3.03it/s]
40%|████ | 8/20 [00:02<00:03, 3.04it/s]
45%|████▌ | 9/20 [00:03<00:03, 3.05it/s]
50%|█████ | 10/20 [00:03<00:03, 3.04it/s]
55%|█████▌ | 11/20 [00:03<00:02, 3.05it/s]
60%|██████ | 12/20 [00:03<00:02, 3.06it/s]
65%|██████▌ | 13/20 [00:04<00:02, 3.06it/s]
70%|███████ | 14/20 [00:04<00:01, 3.06it/s]
75%|███████▌ | 15/20 [00:04<00:01, 3.06it/s]
80%|████████ | 16/20 [00:05<00:01, 3.05it/s]
85%|████████▌ | 17/20 [00:05<00:00, 3.05it/s]
90%|█████████ | 18/20 [00:05<00:00, 3.06it/s]
95%|█████████▌| 19/20 [00:06<00:00, 3.07it/s]
100%|██████████| 20/20 [00:06<00:00, 3.05it/s]
100%|██████████| 20/20 [00:06<00:00, 3.02it/s]