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": "ugly, distorted, broken",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "A photo of a TOK gingerbread delorean",
"prompt_strength": 0.8,
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"width": 1152
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_DYG**********************************
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 fofr/sdxl-gingerbread using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"fofr/sdxl-gingerbread:1a433ddec5f3bd1f3706014420344a24c727b9b67fd8e1b53a3ae25bc348ae42",
{
input: {
apply_watermark: false,
guidance_scale: 7.5,
height: 768,
high_noise_frac: 0.8,
lora_scale: 0.6,
negative_prompt: "ugly, distorted, broken",
num_inference_steps: 30,
num_outputs: 1,
prompt: "A photo of a TOK gingerbread delorean",
prompt_strength: 0.8,
refine: "expert_ensemble_refiner",
scheduler: "K_EULER",
width: 1152
}
}
);
// 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_DYG**********************************
This is your API token. Keep it to yourself.
import replicate
Run fofr/sdxl-gingerbread using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"fofr/sdxl-gingerbread:1a433ddec5f3bd1f3706014420344a24c727b9b67fd8e1b53a3ae25bc348ae42",
input={
"apply_watermark": False,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.8,
"lora_scale": 0.6,
"negative_prompt": "ugly, distorted, broken",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "A photo of a TOK gingerbread delorean",
"prompt_strength": 0.8,
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"width": 1152
}
)
# 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_DYG**********************************
This is your API token. Keep it to yourself.
Run fofr/sdxl-gingerbread 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": "fofr/sdxl-gingerbread:1a433ddec5f3bd1f3706014420344a24c727b9b67fd8e1b53a3ae25bc348ae42",
"input": {
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.8,
"lora_scale": 0.6,
"negative_prompt": "ugly, distorted, broken",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "A photo of a TOK gingerbread delorean",
"prompt_strength": 0.8,
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"width": 1152
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "3imnidtbxy62wevlvdc76xf6bi",
"model": "fofr/sdxl-gingerbread",
"version": "1a433ddec5f3bd1f3706014420344a24c727b9b67fd8e1b53a3ae25bc348ae42",
"input": {
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.8,
"lora_scale": 0.6,
"negative_prompt": "ugly, distorted, broken",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "A photo of a TOK gingerbread delorean",
"prompt_strength": 0.8,
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"width": 1152
},
"logs": "Using seed: 28491\nskipping loading .. weights already loaded\nPrompt: A photo of a <s0><s1> gingerbread delorean\ntxt2img mode\n 0%| | 0/23 [00:00<?, ?it/s]\n 4%|▍ | 1/23 [00:00<00:05, 4.33it/s]\n 9%|▊ | 2/23 [00:00<00:04, 4.32it/s]\n 13%|█▎ | 3/23 [00:00<00:04, 4.31it/s]\n 17%|█▋ | 4/23 [00:00<00:04, 4.30it/s]\n 22%|██▏ | 5/23 [00:01<00:04, 4.30it/s]\n 26%|██▌ | 6/23 [00:01<00:03, 4.30it/s]\n 30%|███ | 7/23 [00:01<00:03, 4.29it/s]\n 35%|███▍ | 8/23 [00:01<00:03, 4.29it/s]\n 39%|███▉ | 9/23 [00:02<00:03, 4.29it/s]\n 43%|████▎ | 10/23 [00:02<00:03, 4.29it/s]\n 48%|████▊ | 11/23 [00:02<00:02, 4.29it/s]\n 52%|█████▏ | 12/23 [00:02<00:02, 4.28it/s]\n 57%|█████▋ | 13/23 [00:03<00:02, 4.29it/s]\n 61%|██████ | 14/23 [00:03<00:02, 4.29it/s]\n 65%|██████▌ | 15/23 [00:03<00:01, 4.29it/s]\n 70%|██████▉ | 16/23 [00:03<00:01, 4.28it/s]\n 74%|███████▍ | 17/23 [00:03<00:01, 4.28it/s]\n 78%|███████▊ | 18/23 [00:04<00:01, 4.28it/s]\n 83%|████████▎ | 19/23 [00:04<00:00, 4.28it/s]\n 87%|████████▋ | 20/23 [00:04<00:00, 4.28it/s]\n 91%|█████████▏| 21/23 [00:04<00:00, 4.28it/s]\n 96%|█████████▌| 22/23 [00:05<00:00, 4.28it/s]\n100%|██████████| 23/23 [00:05<00:00, 4.28it/s]\n100%|██████████| 23/23 [00:05<00:00, 4.29it/s]\n 0%| | 0/7 [00:00<?, ?it/s]\n 14%|█▍ | 1/7 [00:00<00:01, 5.50it/s]\n 29%|██▊ | 2/7 [00:00<00:00, 5.47it/s]\n 43%|████▎ | 3/7 [00:00<00:00, 5.46it/s]\n 57%|█████▋ | 4/7 [00:00<00:00, 5.45it/s]\n 71%|███████▏ | 5/7 [00:00<00:00, 5.46it/s]\n 86%|████████▌ | 6/7 [00:01<00:00, 5.46it/s]\n100%|██████████| 7/7 [00:01<00:00, 5.46it/s]\n100%|██████████| 7/7 [00:01<00:00, 5.46it/s]",
"output": [
"https://replicate.delivery/pbxt/ZTIU1w6N6EYtMJPxSN3pHNBrmLarOXc4zjdt1GIJ1fLBxB9IA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-11-19T22:04:43.132748Z",
"started_at": "2023-11-19T22:04:43.167437Z",
"completed_at": "2023-11-19T22:04:51.676824Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/3imnidtbxy62wevlvdc76xf6bi/cancel",
"get": "https://api.replicate.com/v1/predictions/3imnidtbxy62wevlvdc76xf6bi"
},
"metrics": {
"predict_time": 8.509387,
"total_time": 8.544076
}
}