defaultAn astronaut riding a rainbow unicorn
typetext
{
"apply_watermark": false,
"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 image of Curious, Astronaut, exploring alien flora, moody lighting style, detailed, realistic, trending on artstation, in style of concept artist Scott R. Kessler, digital painter Benoit Courty and 3D artist Kieran \"KieranParsons\" Parsons.",
"prompt_strength": 0.8,
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"width": 768
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_DAv**********************************
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 stability-ai/sdxl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"stability-ai/sdxl:c221b2b8ef527988fb59bf24a8b97c4561f1c671f73bd389f866bfb27c061316",
{
input: {
apply_watermark: false,
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 image of Curious, Astronaut, exploring alien flora, moody lighting style, detailed, realistic, trending on artstation, in style of concept artist Scott R. Kessler, digital painter Benoit Courty and 3D artist Kieran \"KieranParsons\" Parsons.",
prompt_strength: 0.8,
refine: "expert_ensemble_refiner",
scheduler: "K_EULER",
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_DAv**********************************
This is your API token. Keep it to yourself.
import replicate
Run stability-ai/sdxl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"stability-ai/sdxl:c221b2b8ef527988fb59bf24a8b97c4561f1c671f73bd389f866bfb27c061316",
input={
"apply_watermark": False,
"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 image of Curious, Astronaut, exploring alien flora, moody lighting style, detailed, realistic, trending on artstation, in style of concept artist Scott R. Kessler, digital painter Benoit Courty and 3D artist Kieran \"KieranParsons\" Parsons.",
"prompt_strength": 0.8,
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"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_DAv**********************************
This is your API token. Keep it to yourself.
Run stability-ai/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": "stability-ai/sdxl:c221b2b8ef527988fb59bf24a8b97c4561f1c671f73bd389f866bfb27c061316",
"input": {
"apply_watermark": false,
"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 image of Curious, Astronaut, exploring alien flora, moody lighting style, detailed, realistic, trending on artstation, in style of concept artist Scott R. Kessler, digital painter Benoit Courty and 3D artist Kieran \\"KieranParsons\\" Parsons.",
"prompt_strength": 0.8,
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"width": 768
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "jkgpfc3bhjapvmlfqkvdhpdeta",
"model": "stability-ai/sdxl",
"version": "c221b2b8ef527988fb59bf24a8b97c4561f1c671f73bd389f866bfb27c061316",
"input": {
"apply_watermark": false,
"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 image of Curious, Astronaut, exploring alien flora, moody lighting style, detailed, realistic, trending on artstation, in style of concept artist Scott R. Kessler, digital painter Benoit Courty and 3D artist Kieran \"KieranParsons\" Parsons.",
"prompt_strength": 0.8,
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"width": 768
},
"logs": "Using seed: 20320\nPrompt: An image of Curious, Astronaut, exploring alien flora, moody lighting style, detailed, realistic, trending on artstation, in style of concept artist Scott R. Kessler, digital painter Benoit Courty and 3D artist Kieran \"KieranParsons\" Parsons.\ntxt2img mode\n 0%| | 0/16 [00:00<?, ?it/s]\n 6%|▋ | 1/16 [00:00<00:01, 8.19it/s]\n 12%|█▎ | 2/16 [00:00<00:01, 8.10it/s]\n 19%|█▉ | 3/16 [00:00<00:01, 8.08it/s]\n 25%|██▌ | 4/16 [00:00<00:01, 8.06it/s]\n 31%|███▏ | 5/16 [00:00<00:01, 8.03it/s]\n 38%|███▊ | 6/16 [00:00<00:01, 8.03it/s]\n 44%|████▍ | 7/16 [00:00<00:01, 8.03it/s]\n 50%|█████ | 8/16 [00:00<00:00, 8.03it/s]\n 56%|█████▋ | 9/16 [00:01<00:00, 8.02it/s]\n 62%|██████▎ | 10/16 [00:01<00:00, 8.00it/s]\n 69%|██████▉ | 11/16 [00:01<00:00, 8.00it/s]\n 75%|███████▌ | 12/16 [00:01<00:00, 8.01it/s]\n 81%|████████▏ | 13/16 [00:01<00:00, 8.01it/s]\n 88%|████████▊ | 14/16 [00:01<00:00, 8.00it/s]\n 94%|█████████▍| 15/16 [00:01<00:00, 8.00it/s]\n100%|██████████| 16/16 [00:01<00:00, 8.01it/s]\n100%|██████████| 16/16 [00:01<00:00, 8.03it/s]\n 0%| | 0/5 [00:00<?, ?it/s]\n 20%|██ | 1/5 [00:00<00:00, 7.67it/s]\n 40%|████ | 2/5 [00:00<00:00, 7.62it/s]\n 60%|██████ | 3/5 [00:00<00:00, 7.61it/s]\n 80%|████████ | 4/5 [00:00<00:00, 7.60it/s]\n100%|██████████| 5/5 [00:00<00:00, 7.61it/s]\n100%|██████████| 5/5 [00:00<00:00, 7.61it/s]",
"output": [
"https://pbxt.replicate.delivery/oA5w9CwBtobHB5Ma36iCl1PqoSHeff2vOnCYJOeqvlniPRDHB/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-10-22T21:24:04.91488Z",
"started_at": "2023-10-22T21:24:04.853566Z",
"completed_at": "2023-10-22T21:24:09.522728Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/jkgpfc3bhjapvmlfqkvdhpdeta/cancel",
"get": "https://api.replicate.com/v1/predictions/jkgpfc3bhjapvmlfqkvdhpdeta"
},
"metrics": {
"predict_time": 4.669162,
"total_time": 4.607848
}
}