defaultAn astronaut riding a rainbow unicorn
typetext
{
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.9,
"lora_scale": 0.6,
"negative_prompt": "",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "A photo of santa wearing a TOK sweater",
"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_64U**********************************
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-xmas-sweater using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"fofr/sdxl-xmas-sweater:0690f6c650d0899dcdeaf789d33cf86bad646a00d5efe7b7600998f2950705db",
{
input: {
apply_watermark: false,
guidance_scale: 7.5,
height: 768,
high_noise_frac: 0.9,
lora_scale: 0.6,
negative_prompt: "",
num_inference_steps: 30,
num_outputs: 1,
prompt: "A photo of santa wearing a TOK sweater",
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_64U**********************************
This is your API token. Keep it to yourself.
import replicate
Run fofr/sdxl-xmas-sweater using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"fofr/sdxl-xmas-sweater:0690f6c650d0899dcdeaf789d33cf86bad646a00d5efe7b7600998f2950705db",
input={
"apply_watermark": False,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.9,
"lora_scale": 0.6,
"negative_prompt": "",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "A photo of santa wearing a TOK sweater",
"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_64U**********************************
This is your API token. Keep it to yourself.
Run fofr/sdxl-xmas-sweater 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-xmas-sweater:0690f6c650d0899dcdeaf789d33cf86bad646a00d5efe7b7600998f2950705db",
"input": {
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.9,
"lora_scale": 0.6,
"negative_prompt": "",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "A photo of santa wearing a TOK sweater",
"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": "jyk3zk3bnovkio7kfalkm6xlxi",
"model": "fofr/sdxl-xmas-sweater",
"version": "0690f6c650d0899dcdeaf789d33cf86bad646a00d5efe7b7600998f2950705db",
"input": {
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.9,
"lora_scale": 0.6,
"negative_prompt": "",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "A photo of santa wearing a TOK sweater",
"prompt_strength": 0.8,
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"width": 768
},
"logs": "Using seed: 19576\nEnsuring enough disk space...\nFree disk space: 2440310452224\nDownloading weights: https://replicate.delivery/pbxt/uSerlhyRLxz5fUKP2sXU3RhukmHeeFiUVM0WTB5mvNNlbF4HB/trained_model.tar\nb'Downloaded 186 MB bytes in 0.239s (779 MB/s)\\nExtracted 186 MB in 0.062s (3.0 GB/s)\\n'\nDownloaded weights in 0.45714402198791504 seconds\nLoading fine-tuned model\nDoes not have Unet. assume we are using LoRA\nLoading Unet LoRA\nPrompt: A photo of santa wearing a <s0><s1> sweater\ntxt2img mode\n 0%| | 0/27 [00:00<?, ?it/s]\n 4%|▎ | 1/27 [00:00<00:04, 6.16it/s]\n 7%|▋ | 2/27 [00:00<00:04, 6.13it/s]\n 11%|█ | 3/27 [00:00<00:03, 6.11it/s]\n 15%|█▍ | 4/27 [00:00<00:03, 6.10it/s]\n 19%|█▊ | 5/27 [00:00<00:03, 6.10it/s]\n 22%|██▏ | 6/27 [00:00<00:03, 6.09it/s]\n 26%|██▌ | 7/27 [00:01<00:03, 6.09it/s]\n 30%|██▉ | 8/27 [00:01<00:03, 6.09it/s]\n 33%|███▎ | 9/27 [00:01<00:02, 6.09it/s]\n 37%|███▋ | 10/27 [00:01<00:02, 6.08it/s]\n 41%|████ | 11/27 [00:01<00:02, 6.08it/s]\n 44%|████▍ | 12/27 [00:01<00:02, 6.09it/s]\n 48%|████▊ | 13/27 [00:02<00:02, 6.09it/s]\n 52%|█████▏ | 14/27 [00:02<00:02, 6.08it/s]\n 56%|█████▌ | 15/27 [00:02<00:01, 6.08it/s]\n 59%|█████▉ | 16/27 [00:02<00:01, 6.08it/s]\n 63%|██████▎ | 17/27 [00:02<00:01, 6.09it/s]\n 67%|██████▋ | 18/27 [00:02<00:01, 6.10it/s]\n 70%|███████ | 19/27 [00:03<00:01, 6.10it/s]\n 74%|███████▍ | 20/27 [00:03<00:01, 6.10it/s]\n 78%|███████▊ | 21/27 [00:03<00:00, 6.11it/s]\n 81%|████████▏ | 22/27 [00:03<00:00, 6.11it/s]\n 85%|████████▌ | 23/27 [00:03<00:00, 6.11it/s]\n 89%|████████▉ | 24/27 [00:03<00:00, 6.11it/s]\n 93%|█████████▎| 25/27 [00:04<00:00, 6.11it/s]\n 96%|█████████▋| 26/27 [00:04<00:00, 6.11it/s]\n100%|██████████| 27/27 [00:04<00:00, 6.11it/s]\n100%|██████████| 27/27 [00:04<00:00, 6.10it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 33%|███▎ | 1/3 [00:00<00:00, 6.80it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 7.25it/s]\n100%|██████████| 3/3 [00:00<00:00, 7.40it/s]\n100%|██████████| 3/3 [00:00<00:00, 7.30it/s]",
"output": [
"https://replicate.delivery/pbxt/Dd9IAXSX2cJCANdbvYFBa7YI6518qoSXSz9UF6lDb8Q1lqfIA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-12-03T21:31:54.922767Z",
"started_at": "2023-12-03T21:31:59.426338Z",
"completed_at": "2023-12-03T21:32:06.23207Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/jyk3zk3bnovkio7kfalkm6xlxi/cancel",
"get": "https://api.replicate.com/v1/predictions/jyk3zk3bnovkio7kfalkm6xlxi"
},
"metrics": {
"predict_time": 6.805732,
"total_time": 11.309303
}
}