defaultAn astronaut riding a rainbow unicorn
typetext
{
"apply_watermark": true,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.8,
"lora_scale": 0.6,
"negative_prompt": "",
"num_inference_steps": 25,
"num_outputs": 1,
"prompt": "An astronaut riding a rainbow unicorn, cinematic, dramatic",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"seed": 16010,
"width": 768
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Ld5**********************************
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 asiryan/sdxl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"asiryan/sdxl:49d55f8ecdf23a74f0a2d2e70254b68948e20f08e33a0347b82dd106519731e6",
{
input: {
apply_watermark: true,
guidance_scale: 7.5,
height: 768,
high_noise_frac: 0.8,
lora_scale: 0.6,
negative_prompt: "",
num_inference_steps: 25,
num_outputs: 1,
prompt: "An astronaut riding a rainbow unicorn, cinematic, dramatic",
prompt_strength: 0.8,
refine: "no_refiner",
scheduler: "K_EULER",
seed: 16010,
width: 768
}
}
);
// 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_Ld5**********************************
This is your API token. Keep it to yourself.
import replicate
Run asiryan/sdxl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"asiryan/sdxl:49d55f8ecdf23a74f0a2d2e70254b68948e20f08e33a0347b82dd106519731e6",
input={
"apply_watermark": True,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.8,
"lora_scale": 0.6,
"negative_prompt": "",
"num_inference_steps": 25,
"num_outputs": 1,
"prompt": "An astronaut riding a rainbow unicorn, cinematic, dramatic",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"seed": 16010,
"width": 768
}
)
# 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_Ld5**********************************
This is your API token. Keep it to yourself.
Run asiryan/sdxl 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": "asiryan/sdxl:49d55f8ecdf23a74f0a2d2e70254b68948e20f08e33a0347b82dd106519731e6",
"input": {
"apply_watermark": true,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.8,
"lora_scale": 0.6,
"negative_prompt": "",
"num_inference_steps": 25,
"num_outputs": 1,
"prompt": "An astronaut riding a rainbow unicorn, cinematic, dramatic",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"seed": 16010,
"width": 768
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "gp4lpqtb54sunfasp6aczcqsoy",
"model": "asiryan/sdxl",
"version": "49d55f8ecdf23a74f0a2d2e70254b68948e20f08e33a0347b82dd106519731e6",
"input": {
"apply_watermark": true,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.8,
"lora_scale": 0.6,
"negative_prompt": "",
"num_inference_steps": 25,
"num_outputs": 1,
"prompt": "An astronaut riding a rainbow unicorn, cinematic, dramatic",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"seed": 16010,
"width": 768
},
"logs": "Using seed: 16010\nPrompt: An astronaut riding a rainbow unicorn, cinematic, dramatic\ntxt2img mode\n 0%| | 0/25 [00:00<?, ?it/s]\n 4%|▍ | 1/25 [00:00<00:02, 8.29it/s]\n 8%|▊ | 2/25 [00:00<00:02, 8.19it/s]\n 12%|█▏ | 3/25 [00:00<00:02, 8.15it/s]\n 16%|█▌ | 4/25 [00:00<00:02, 8.14it/s]\n 20%|██ | 5/25 [00:00<00:02, 8.13it/s]\n 24%|██▍ | 6/25 [00:00<00:02, 8.13it/s]\n 28%|██▊ | 7/25 [00:00<00:02, 8.14it/s]\n 32%|███▏ | 8/25 [00:00<00:02, 8.14it/s]\n 36%|███▌ | 9/25 [00:01<00:01, 8.14it/s]\n 40%|████ | 10/25 [00:01<00:01, 8.13it/s]\n 44%|████▍ | 11/25 [00:01<00:01, 8.12it/s]\n 48%|████▊ | 12/25 [00:01<00:01, 8.12it/s]\n 52%|█████▏ | 13/25 [00:01<00:01, 8.13it/s]\n 56%|█████▌ | 14/25 [00:01<00:01, 8.13it/s]\n 60%|██████ | 15/25 [00:01<00:01, 8.12it/s]\n 64%|██████▍ | 16/25 [00:01<00:01, 8.12it/s]\n 68%|██████▊ | 17/25 [00:02<00:00, 8.12it/s]\n 72%|███████▏ | 18/25 [00:02<00:00, 8.11it/s]\n 76%|███████▌ | 19/25 [00:02<00:00, 8.12it/s]\n 80%|████████ | 20/25 [00:02<00:00, 8.12it/s]\n 84%|████████▍ | 21/25 [00:02<00:00, 8.12it/s]\n 88%|████████▊ | 22/25 [00:02<00:00, 8.11it/s]\n 92%|█████████▏| 23/25 [00:02<00:00, 8.10it/s]\n 96%|█████████▌| 24/25 [00:02<00:00, 8.11it/s]\n100%|██████████| 25/25 [00:03<00:00, 8.13it/s]\n100%|██████████| 25/25 [00:03<00:00, 8.13it/s]",
"output": [
"https://replicate.delivery/pbxt/eEeoxW8fGRGxso3OJBcNH8I5LFCmZztqTMkT9kzwvFzFa1wjA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-11-14T22:48:30.786421Z",
"started_at": "2023-11-14T22:48:30.823704Z",
"completed_at": "2023-11-14T22:48:35.589518Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/gp4lpqtb54sunfasp6aczcqsoy/cancel",
"get": "https://api.replicate.com/v1/predictions/gp4lpqtb54sunfasp6aczcqsoy"
},
"metrics": {
"predict_time": 4.765814,
"total_time": 4.803097
}
}