typetext
{
"guidance_scale": 7.5,
"height": 512,
"num_inference_steps": "150",
"num_outputs": 1,
"prompt": "ghibli style elf",
"prompt_strength": 0.8,
"scheduler": "K-LMS",
"width": 512
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_YLh**********************************
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 tstramer/ghibli-diffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"tstramer/ghibli-diffusion:b190224e487827d5fdeb8bf8bcdaa71c41b09a152f175de9f170aa0e088f66e9",
{
input: {
guidance_scale: 7.5,
height: 512,
num_inference_steps: "150",
num_outputs: 1,
prompt: "ghibli style elf",
prompt_strength: 0.8,
scheduler: "K-LMS",
width: 512
}
}
);
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
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_YLh**********************************
This is your API token. Keep it to yourself.
import replicate
Run tstramer/ghibli-diffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"tstramer/ghibli-diffusion:b190224e487827d5fdeb8bf8bcdaa71c41b09a152f175de9f170aa0e088f66e9",
input={
"guidance_scale": 7.5,
"height": 512,
"num_inference_steps": "150",
"num_outputs": 1,
"prompt": "ghibli style elf",
"prompt_strength": 0.8,
"scheduler": "K-LMS",
"width": 512
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].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_YLh**********************************
This is your API token. Keep it to yourself.
Run tstramer/ghibli-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": "tstramer/ghibli-diffusion:b190224e487827d5fdeb8bf8bcdaa71c41b09a152f175de9f170aa0e088f66e9",
"input": {
"guidance_scale": 7.5,
"height": 512,
"num_inference_steps": "150",
"num_outputs": 1,
"prompt": "ghibli style elf",
"prompt_strength": 0.8,
"scheduler": "K-LMS",
"width": 512
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "vuj42xsehbgcbld4gdy7o5754m",
"model": "tstramer/ghibli-diffusion",
"version": "b190224e487827d5fdeb8bf8bcdaa71c41b09a152f175de9f170aa0e088f66e9",
"input": {
"guidance_scale": 7.5,
"height": 512,
"num_inference_steps": "150",
"num_outputs": 1,
"prompt": "ghibli style elf",
"prompt_strength": 0.8,
"scheduler": "K-LMS",
"width": 512
},
"logs": "Using seed: 14453\n 0%| | 0/150 [00:00<?, ?it/s]\n 1%|▏ | 2/150 [00:00<00:11, 13.36it/s]\n 3%|▎ | 4/150 [00:00<00:10, 13.77it/s]\n 4%|▍ | 6/150 [00:00<00:10, 13.96it/s]\n 5%|▌ | 8/150 [00:00<00:10, 13.47it/s]\n 7%|▋ | 10/150 [00:00<00:10, 13.69it/s]\n 8%|▊ | 12/150 [00:00<00:09, 13.91it/s]\n 9%|▉ | 14/150 [00:01<00:09, 13.96it/s]\n 11%|█ | 16/150 [00:01<00:09, 13.98it/s]\n 12%|█▏ | 18/150 [00:01<00:09, 14.10it/s]\n 13%|█▎ | 20/150 [00:01<00:09, 14.09it/s]\n 15%|█▍ | 22/150 [00:01<00:09, 14.07it/s]\n 16%|█▌ | 24/150 [00:01<00:09, 13.97it/s]\n 17%|█▋ | 26/150 [00:01<00:08, 14.00it/s]\n 19%|█▊ | 28/150 [00:02<00:08, 14.02it/s]\n 20%|██ | 30/150 [00:02<00:08, 13.99it/s]\n 21%|██▏ | 32/150 [00:02<00:08, 14.00it/s]\n 23%|██▎ | 34/150 [00:02<00:08, 14.05it/s]\n 24%|██▍ | 36/150 [00:02<00:08, 14.07it/s]\n 25%|██▌ | 38/150 [00:02<00:08, 13.94it/s]\n 27%|██▋ | 40/150 [00:02<00:07, 14.00it/s]\n 28%|██▊ | 42/150 [00:03<00:07, 14.06it/s]\n 29%|██▉ | 44/150 [00:03<00:07, 14.12it/s]\n 31%|███ | 46/150 [00:03<00:07, 14.21it/s]\n 32%|███▏ | 48/150 [00:03<00:07, 14.30it/s]\n 33%|███▎ | 50/150 [00:03<00:06, 14.35it/s]\n 35%|███▍ | 52/150 [00:03<00:06, 14.24it/s]\n 36%|███▌ | 54/150 [00:03<00:06, 14.22it/s]\n 37%|███▋ | 56/150 [00:03<00:06, 14.20it/s]\n 39%|███▊ | 58/150 [00:04<00:06, 14.22it/s]\n 40%|████ | 60/150 [00:04<00:06, 14.25it/s]\n 41%|████▏ | 62/150 [00:04<00:06, 14.29it/s]\n 43%|████▎ | 64/150 [00:04<00:06, 14.26it/s]\n 44%|████▍ | 66/150 [00:04<00:06, 13.95it/s]\n 45%|████▌ | 68/150 [00:04<00:05, 13.86it/s]\n 47%|████▋ | 70/150 [00:04<00:05, 13.90it/s]\n 48%|████▊ | 72/150 [00:05<00:05, 14.06it/s]\n 49%|████▉ | 74/150 [00:05<00:05, 14.16it/s]\n 51%|█████ | 76/150 [00:05<00:05, 14.25it/s]\n 52%|█████▏ | 78/150 [00:05<00:05, 14.29it/s]\n 53%|█████▎ | 80/150 [00:05<00:04, 14.05it/s]\n 55%|█████▍ | 82/150 [00:05<00:04, 14.08it/s]\n 56%|█████▌ | 84/150 [00:05<00:04, 14.07it/s]\n 57%|█████▋ | 86/150 [00:06<00:04, 14.10it/s]\n 59%|█████▊ | 88/150 [00:06<00:04, 14.13it/s]\n 60%|██████ | 90/150 [00:06<00:04, 14.14it/s]\n 61%|██████▏ | 92/150 [00:06<00:04, 14.11it/s]\n 63%|██████▎ | 94/150 [00:06<00:04, 13.90it/s]\n 64%|██████▍ | 96/150 [00:06<00:03, 13.96it/s]\n 65%|██████▌ | 98/150 [00:06<00:03, 13.99it/s]\n 67%|██████▋ | 100/150 [00:07<00:03, 13.99it/s]\n 68%|██████▊ | 102/150 [00:07<00:03, 14.00it/s]\n 69%|██████▉ | 104/150 [00:07<00:03, 14.01it/s]\n 71%|███████ | 106/150 [00:07<00:03, 13.96it/s]\n 72%|███████▏ | 108/150 [00:07<00:03, 13.82it/s]\n 73%|███████▎ | 110/150 [00:07<00:02, 13.90it/s]\n 75%|███████▍ | 112/150 [00:07<00:02, 13.99it/s]\n 76%|███████▌ | 114/150 [00:08<00:02, 14.04it/s]\n 77%|███████▋ | 116/150 [00:08<00:02, 14.01it/s]\n 79%|███████▊ | 118/150 [00:08<00:02, 14.05it/s]\n 80%|████████ | 120/150 [00:08<00:02, 13.95it/s]\n 81%|████████▏ | 122/150 [00:08<00:02, 13.89it/s]\n 83%|████████▎ | 124/150 [00:08<00:01, 13.93it/s]\n 84%|████████▍ | 126/150 [00:08<00:01, 13.96it/s]\n 85%|████████▌ | 128/150 [00:09<00:01, 13.95it/s]\n 87%|████████▋ | 130/150 [00:09<00:01, 14.02it/s]\n 88%|████████▊ | 132/150 [00:09<00:01, 14.00it/s]\n 89%|████████▉ | 134/150 [00:09<00:01, 14.01it/s]\n 91%|█████████ | 136/150 [00:09<00:01, 13.88it/s]\n 92%|█████████▏| 138/150 [00:09<00:00, 13.77it/s]\n 93%|█████████▎| 140/150 [00:09<00:00, 13.72it/s]\n 95%|█████████▍| 142/150 [00:10<00:00, 13.74it/s]\n 96%|█████████▌| 144/150 [00:10<00:00, 13.76it/s]\n 97%|█████████▋| 146/150 [00:10<00:00, 13.79it/s]\n 99%|█████████▊| 148/150 [00:10<00:00, 13.81it/s]\n100%|██████████| 150/150 [00:10<00:00, 13.62it/s]\n100%|██████████| 150/150 [00:10<00:00, 13.99it/s]",
"output": [
"https://replicate.delivery/pbxt/EBBNVwxeuQwQZKbuecO6mMgSQ11l1D715fvMrEra3A50E9EgA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2022-11-22T02:40:15.884998Z",
"started_at": "2022-11-22T02:40:15.92038Z",
"completed_at": "2022-11-22T02:40:27.132264Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/vuj42xsehbgcbld4gdy7o5754m/cancel",
"get": "https://api.replicate.com/v1/predictions/vuj42xsehbgcbld4gdy7o5754m"
},
"metrics": {
"predict_time": 11.211884,
"total_time": 11.247266
}
}