defaultAn astronaut riding a rainbow unicorn
typetext
{
"apply_watermark": true,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.89,
"lora_scale": 0.92,
"negative_prompt": "",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "a paper collage in the style of TOK, showing a girl swimming in a magic underwater world with weird fishes with human eyes",
"prompt_strength": 0.8,
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"width": 1024
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_cjw**********************************
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 dmitru/sdxl-tests using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"dmitru/sdxl-tests:b1c4743256c7db1538a013d04f7d87c788cecdb2e13a7fb2696d73a9547ad4ee",
{
input: {
apply_watermark: true,
guidance_scale: 7.5,
height: 1024,
high_noise_frac: 0.89,
lora_scale: 0.92,
negative_prompt: "",
num_inference_steps: 50,
num_outputs: 1,
prompt: "a paper collage in the style of TOK, showing a girl swimming in a magic underwater world with weird fishes with human eyes",
prompt_strength: 0.8,
refine: "expert_ensemble_refiner",
scheduler: "K_EULER",
width: 1024
}
}
);
// 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_cjw**********************************
This is your API token. Keep it to yourself.
import replicate
Run dmitru/sdxl-tests using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"dmitru/sdxl-tests:b1c4743256c7db1538a013d04f7d87c788cecdb2e13a7fb2696d73a9547ad4ee",
input={
"apply_watermark": True,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.89,
"lora_scale": 0.92,
"negative_prompt": "",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "a paper collage in the style of TOK, showing a girl swimming in a magic underwater world with weird fishes with human eyes",
"prompt_strength": 0.8,
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"width": 1024
}
)
# 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_cjw**********************************
This is your API token. Keep it to yourself.
Run dmitru/sdxl-tests 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": "dmitru/sdxl-tests:b1c4743256c7db1538a013d04f7d87c788cecdb2e13a7fb2696d73a9547ad4ee",
"input": {
"apply_watermark": true,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.89,
"lora_scale": 0.92,
"negative_prompt": "",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "a paper collage in the style of TOK, showing a girl swimming in a magic underwater world with weird fishes with human eyes",
"prompt_strength": 0.8,
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"width": 1024
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "fotdarlbw33lobn34atozy5t3a",
"model": "dmitru/sdxl-tests",
"version": "b1c4743256c7db1538a013d04f7d87c788cecdb2e13a7fb2696d73a9547ad4ee",
"input": {
"apply_watermark": true,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.89,
"lora_scale": 0.92,
"negative_prompt": "",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "a paper collage in the style of TOK, showing a girl swimming in a magic underwater world with weird fishes with human eyes",
"prompt_strength": 0.8,
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"width": 1024
},
"logs": "Using seed: 1405\nEnsuring enough disk space...\nFree disk space: 1846372753408\nDownloading weights: https://replicate.delivery/pbxt/QEbNqOOYZurOPVCYxB2pQ2jyTw3Uej4HakeVvD4QVydJONejA/trained_model.tar\nb'Downloaded 186 MB bytes in 0.408s (455 MB/s)\\nExtracted 186 MB in 0.100s (1.9 GB/s)\\n'\nDownloaded weights in 1.0749387741088867 seconds\nLoading fine-tuned model\nDoes not have Unet. assume we are using LoRA\nLoading Unet LoRA\nPrompt: a paper collage in the style of <s0><s1>, showing a girl swimming in a magic underwater world with weird fishes with human eyes\ntxt2img mode\n 0%| | 0/44 [00:00<?, ?it/s]\n 2%|▏ | 1/44 [00:00<00:11, 3.70it/s]\n 5%|▍ | 2/44 [00:00<00:11, 3.68it/s]\n 7%|▋ | 3/44 [00:00<00:11, 3.68it/s]\n 9%|▉ | 4/44 [00:01<00:10, 3.68it/s]\n 11%|█▏ | 5/44 [00:01<00:10, 3.68it/s]\n 14%|█▎ | 6/44 [00:01<00:10, 3.68it/s]\n 16%|█▌ | 7/44 [00:01<00:10, 3.67it/s]\n 18%|█▊ | 8/44 [00:02<00:09, 3.67it/s]\n 20%|██ | 9/44 [00:02<00:09, 3.67it/s]\n 23%|██▎ | 10/44 [00:02<00:09, 3.67it/s]\n 25%|██▌ | 11/44 [00:02<00:08, 3.67it/s]\n 27%|██▋ | 12/44 [00:03<00:08, 3.67it/s]\n 30%|██▉ | 13/44 [00:03<00:08, 3.67it/s]\n 32%|███▏ | 14/44 [00:03<00:08, 3.67it/s]\n 34%|███▍ | 15/44 [00:04<00:07, 3.67it/s]\n 36%|███▋ | 16/44 [00:04<00:07, 3.67it/s]\n 39%|███▊ | 17/44 [00:04<00:07, 3.67it/s]\n 41%|████ | 18/44 [00:04<00:07, 3.67it/s]\n 43%|████▎ | 19/44 [00:05<00:06, 3.67it/s]\n 45%|████▌ | 20/44 [00:05<00:06, 3.67it/s]\n 48%|████▊ | 21/44 [00:05<00:06, 3.67it/s]\n 50%|█████ | 22/44 [00:05<00:06, 3.67it/s]\n 52%|█████▏ | 23/44 [00:06<00:05, 3.66it/s]\n 55%|█████▍ | 24/44 [00:06<00:05, 3.66it/s]\n 57%|█████▋ | 25/44 [00:06<00:05, 3.66it/s]\n 59%|█████▉ | 26/44 [00:07<00:04, 3.66it/s]\n 61%|██████▏ | 27/44 [00:07<00:04, 3.66it/s]\n 64%|██████▎ | 28/44 [00:07<00:04, 3.66it/s]\n 66%|██████▌ | 29/44 [00:07<00:04, 3.66it/s]\n 68%|██████▊ | 30/44 [00:08<00:03, 3.66it/s]\n 70%|███████ | 31/44 [00:08<00:03, 3.66it/s]\n 73%|███████▎ | 32/44 [00:08<00:03, 3.67it/s]\n 75%|███████▌ | 33/44 [00:08<00:02, 3.67it/s]\n 77%|███████▋ | 34/44 [00:09<00:02, 3.68it/s]\n 80%|███████▉ | 35/44 [00:09<00:02, 3.68it/s]\n 82%|████████▏ | 36/44 [00:09<00:02, 3.68it/s]\n 84%|████████▍ | 37/44 [00:10<00:01, 3.68it/s]\n 86%|████████▋ | 38/44 [00:10<00:01, 3.68it/s]\n 89%|████████▊ | 39/44 [00:10<00:01, 3.68it/s]\n 91%|█████████ | 40/44 [00:10<00:01, 3.68it/s]\n 93%|█████████▎| 41/44 [00:11<00:00, 3.68it/s]\n 95%|█████████▌| 42/44 [00:11<00:00, 3.68it/s]\n 98%|█████████▊| 43/44 [00:11<00:00, 3.68it/s]\n100%|██████████| 44/44 [00:11<00:00, 3.68it/s]\n100%|██████████| 44/44 [00:11<00:00, 3.67it/s]\n 0%| | 0/6 [00:00<?, ?it/s]\n 17%|█▋ | 1/6 [00:00<00:01, 4.33it/s]\n 33%|███▎ | 2/6 [00:00<00:00, 4.31it/s]\n 50%|█████ | 3/6 [00:00<00:00, 4.31it/s]\n 67%|██████▋ | 4/6 [00:00<00:00, 4.30it/s]\n 83%|████████▎ | 5/6 [00:01<00:00, 4.30it/s]\n100%|██████████| 6/6 [00:01<00:00, 4.29it/s]\n100%|██████████| 6/6 [00:01<00:00, 4.30it/s]",
"output": [
"https://replicate.delivery/pbxt/PisdflzzIb3FRKXB4mW9vRLttDuzD30jLvyMYSN552SPqGfRA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-12-02T12:29:00.404928Z",
"started_at": "2023-12-02T12:29:01.946462Z",
"completed_at": "2023-12-02T12:29:18.718366Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/fotdarlbw33lobn34atozy5t3a/cancel",
"get": "https://api.replicate.com/v1/predictions/fotdarlbw33lobn34atozy5t3a"
},
"metrics": {
"predict_time": 16.771904,
"total_time": 18.313438
}
}