defaulta photo of cjw
typetext
{
"disable_safety_check": false,
"guidance_scale": 7.5,
"height": 512,
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "a photo of a person sitting with a TOK can in his hands in a football stadium. there is a display of different flavors of can in the bottom right side of the picture.",
"prompt_strength": 0.8,
"scheduler": "DDIM",
"width": 512
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_bXn**********************************
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 suryakantk94/whiteclaw-db using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"suryakantk94/whiteclaw-db:d6659251793b795fca3f80006f36005859c73fdc9d1b112a432a120b1b0ad311",
{
input: {
disable_safety_check: false,
guidance_scale: 7.5,
height: 512,
num_inference_steps: 50,
num_outputs: 1,
prompt: "a photo of a person sitting with a TOK can in his hands in a football stadium. there is a display of different flavors of can in the bottom right side of the picture.",
prompt_strength: 0.8,
scheduler: "DDIM",
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_bXn**********************************
This is your API token. Keep it to yourself.
import replicate
Run suryakantk94/whiteclaw-db using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"suryakantk94/whiteclaw-db:d6659251793b795fca3f80006f36005859c73fdc9d1b112a432a120b1b0ad311",
input={
"disable_safety_check": False,
"guidance_scale": 7.5,
"height": 512,
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "a photo of a person sitting with a TOK can in his hands in a football stadium. there is a display of different flavors of can in the bottom right side of the picture.",
"prompt_strength": 0.8,
"scheduler": "DDIM",
"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_bXn**********************************
This is your API token. Keep it to yourself.
Run suryakantk94/whiteclaw-db 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": "suryakantk94/whiteclaw-db:d6659251793b795fca3f80006f36005859c73fdc9d1b112a432a120b1b0ad311",
"input": {
"disable_safety_check": false,
"guidance_scale": 7.5,
"height": 512,
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "a photo of a person sitting with a TOK can in his hands in a football stadium. there is a display of different flavors of can in the bottom right side of the picture.",
"prompt_strength": 0.8,
"scheduler": "DDIM",
"width": 512
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "p3343w6wr1rgm0cgc39sh11m7c",
"model": "suryakantk94/whiteclaw-db",
"version": "d6659251793b795fca3f80006f36005859c73fdc9d1b112a432a120b1b0ad311",
"input": {
"disable_safety_check": false,
"guidance_scale": 7.5,
"height": 512,
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "a photo of a person sitting with a TOK can in his hands in a football stadium. there is a display of different flavors of can in the bottom right side of the picture.",
"prompt_strength": 0.8,
"scheduler": "DDIM",
"width": 512
},
"logs": "Using seed: 6789\nusing txt2img\n 0%| | 0/50 [00:00<?, ?it/s]\n 2%|▏ | 1/50 [00:12<10:14, 12.55s/it]\n 6%|▌ | 3/50 [00:12<02:34, 3.30s/it]\n 10%|█ | 5/50 [00:12<01:13, 1.63s/it]\n 14%|█▍ | 7/50 [00:12<00:41, 1.04it/s]\n 18%|█▊ | 9/50 [00:13<00:25, 1.61it/s]\n 22%|██▏ | 11/50 [00:13<00:16, 2.36it/s]\n 26%|██▌ | 13/50 [00:13<00:11, 3.31it/s]\n 30%|███ | 15/50 [00:13<00:07, 4.48it/s]\n 34%|███▍ | 17/50 [00:13<00:05, 5.86it/s]\n 38%|███▊ | 19/50 [00:13<00:04, 7.38it/s]\n 42%|████▏ | 21/50 [00:13<00:03, 8.98it/s]\n 46%|████▌ | 23/50 [00:13<00:02, 10.54it/s]\n 50%|█████ | 25/50 [00:13<00:02, 11.99it/s]\n 54%|█████▍ | 27/50 [00:14<00:01, 13.24it/s]\n 58%|█████▊ | 29/50 [00:14<00:01, 14.30it/s]\n 62%|██████▏ | 31/50 [00:14<00:01, 15.15it/s]\n 66%|██████▌ | 33/50 [00:14<00:01, 15.80it/s]\n 70%|███████ | 35/50 [00:14<00:00, 16.28it/s]\n 74%|███████▍ | 37/50 [00:14<00:00, 16.64it/s]\n 78%|███████▊ | 39/50 [00:14<00:00, 16.90it/s]\n 82%|████████▏ | 41/50 [00:14<00:00, 17.09it/s]\n 86%|████████▌ | 43/50 [00:14<00:00, 17.22it/s]\n 90%|█████████ | 45/50 [00:15<00:00, 17.30it/s]\n 94%|█████████▍| 47/50 [00:15<00:00, 17.37it/s]\n 98%|█████████▊| 49/50 [00:15<00:00, 17.42it/s]\n100%|██████████| 50/50 [00:15<00:00, 3.26it/s]",
"output": [
"https://replicate.delivery/pbxt/LvJp7HFVhhIULlRDkZVc2NSA5MI9LDVQue7nNfJYMDkHKODTA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-06-28T21:50:15.744Z",
"started_at": "2024-06-28T21:51:51.662866Z",
"completed_at": "2024-06-28T21:52:08.901738Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/p3343w6wr1rgm0cgc39sh11m7c/cancel",
"get": "https://api.replicate.com/v1/predictions/p3343w6wr1rgm0cgc39sh11m7c",
"web": "https://replicate.com/p/p3343w6wr1rgm0cgc39sh11m7c"
},
"metrics": {
"predict_time": 17.238871525,
"total_time": 113.157738
}
}