defaultAn astronaut riding a rainbow unicorn
typetext
{
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.8,
"lora_scale": 0.8,
"negative_prompt": "",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "a round TOK mandal design with triangles, coloring pages for kids, illustration, white background",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"width": 1024
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_DZD**********************************
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 codingdudecom/sdxl-mandala using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"codingdudecom/sdxl-mandala:914b95a0a2b4ba91dcbff37d28d2c12081bd183c37c50bff865eff96b9252e8b",
{
input: {
apply_watermark: false,
guidance_scale: 7.5,
height: 1024,
high_noise_frac: 0.8,
lora_scale: 0.8,
negative_prompt: "",
num_inference_steps: 30,
num_outputs: 1,
prompt: "a round TOK mandal design with triangles, coloring pages for kids, illustration, white background",
prompt_strength: 0.8,
refine: "no_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_DZD**********************************
This is your API token. Keep it to yourself.
import replicate
Run codingdudecom/sdxl-mandala using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"codingdudecom/sdxl-mandala:914b95a0a2b4ba91dcbff37d28d2c12081bd183c37c50bff865eff96b9252e8b",
input={
"apply_watermark": False,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.8,
"lora_scale": 0.8,
"negative_prompt": "",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "a round TOK mandal design with triangles, coloring pages for kids, illustration, white background",
"prompt_strength": 0.8,
"refine": "no_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_DZD**********************************
This is your API token. Keep it to yourself.
Run codingdudecom/sdxl-mandala 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": "codingdudecom/sdxl-mandala:914b95a0a2b4ba91dcbff37d28d2c12081bd183c37c50bff865eff96b9252e8b",
"input": {
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.8,
"lora_scale": 0.8,
"negative_prompt": "",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "a round TOK mandal design with triangles, coloring pages for kids, illustration, white background",
"prompt_strength": 0.8,
"refine": "no_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": "tvxmnctbav4fghfafwm36ecc7q",
"model": "codingdudecom/sdxl-mandala",
"version": "914b95a0a2b4ba91dcbff37d28d2c12081bd183c37c50bff865eff96b9252e8b",
"input": {
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.8,
"lora_scale": 0.8,
"negative_prompt": "",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "a round TOK mandal design with triangles, coloring pages for kids, illustration, white background",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"width": 1024
},
"logs": "Using seed: 21018\nEnsuring enough disk space...\nFree disk space: 2023003336704\nDownloading weights: https://replicate.delivery/pbxt/hRVGxmMRULIfCaVfeyCOaIy3zDcK0iyiW8uN0k06gafukWHKB/trained_model.tar\n2024-03-19T15:11:09Z | INFO | [ Initiating ] dest=/src/weights-cache/3708132d63d38faa minimum_chunk_size=150M url=https://replicate.delivery/pbxt/hRVGxmMRULIfCaVfeyCOaIy3zDcK0iyiW8uN0k06gafukWHKB/trained_model.tar\n2024-03-19T15:11:15Z | INFO | [ Complete ] dest=/src/weights-cache/3708132d63d38faa size=\"186 MB\" total_elapsed=5.877s url=https://replicate.delivery/pbxt/hRVGxmMRULIfCaVfeyCOaIy3zDcK0iyiW8uN0k06gafukWHKB/trained_model.tar\nb''\nDownloaded weights in 6.066521167755127 seconds\nLoading fine-tuned model\nDoes not have Unet. assume we are using LoRA\nLoading Unet LoRA\nPrompt: a round <s0><s1> mandal design with triangles, coloring pages for kids, illustration, white background\ntxt2img mode\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:07, 3.66it/s]\n 7%|▋ | 2/30 [00:00<00:07, 3.65it/s]\n 10%|█ | 3/30 [00:00<00:07, 3.65it/s]\n 13%|█▎ | 4/30 [00:01<00:07, 3.64it/s]\n 17%|█▋ | 5/30 [00:01<00:06, 3.64it/s]\n 20%|██ | 6/30 [00:01<00:06, 3.64it/s]\n 23%|██▎ | 7/30 [00:01<00:06, 3.64it/s]\n 27%|██▋ | 8/30 [00:02<00:06, 3.63it/s]\n 30%|███ | 9/30 [00:02<00:05, 3.64it/s]\n 33%|███▎ | 10/30 [00:02<00:05, 3.64it/s]\n 37%|███▋ | 11/30 [00:03<00:05, 3.63it/s]\n 40%|████ | 12/30 [00:03<00:04, 3.64it/s]\n 43%|████▎ | 13/30 [00:03<00:04, 3.63it/s]\n 47%|████▋ | 14/30 [00:03<00:04, 3.63it/s]\n 50%|█████ | 15/30 [00:04<00:04, 3.63it/s]\n 53%|█████▎ | 16/30 [00:04<00:03, 3.63it/s]\n 57%|█████▋ | 17/30 [00:04<00:03, 3.64it/s]\n 60%|██████ | 18/30 [00:04<00:03, 3.65it/s]\n 63%|██████▎ | 19/30 [00:05<00:03, 3.65it/s]\n 67%|██████▋ | 20/30 [00:05<00:02, 3.65it/s]\n 70%|███████ | 21/30 [00:05<00:02, 3.65it/s]\n 73%|███████▎ | 22/30 [00:06<00:02, 3.66it/s]\n 77%|███████▋ | 23/30 [00:06<00:01, 3.65it/s]\n 80%|████████ | 24/30 [00:06<00:01, 3.65it/s]\n 83%|████████▎ | 25/30 [00:06<00:01, 3.65it/s]\n 87%|████████▋ | 26/30 [00:07<00:01, 3.65it/s]\n 90%|█████████ | 27/30 [00:07<00:00, 3.65it/s]\n 93%|█████████▎| 28/30 [00:07<00:00, 3.65it/s]\n 97%|█████████▋| 29/30 [00:07<00:00, 3.65it/s]\n100%|██████████| 30/30 [00:08<00:00, 3.65it/s]\n100%|██████████| 30/30 [00:08<00:00, 3.64it/s]",
"output": [
"https://replicate.delivery/pbxt/ubYGbYhQ5VLGHdieYOAb2Uob1FXaAblzb2AM9ERsGJ7O66QJA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-03-19T15:11:07.071096Z",
"started_at": "2024-03-19T15:11:09.848962Z",
"completed_at": "2024-03-19T15:11:27.113465Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/tvxmnctbav4fghfafwm36ecc7q/cancel",
"get": "https://api.replicate.com/v1/predictions/tvxmnctbav4fghfafwm36ecc7q"
},
"metrics": {
"predict_time": 17.264503,
"total_time": 20.042369
}
}