defaultAn astronaut riding a rainbow unicorn
typetext
{
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.95,
"lora_scale": 0.72,
"negative_prompt": "yellow, cluttered, ugly, photo",
"num_inference_steps": 50,
"num_outputs": 4,
"prompt": "An impasto painting in the style of TOK, neon, orange and cyan",
"prompt_strength": 0.8,
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"width": 1360
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_acs**********************************
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-tron using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"fofr/sdxl-tron:fd920825e12db2a942f8a9cac40ad4f624a34a06faba3ac1b44a5305df8c6e2d",
{
input: {
apply_watermark: false,
guidance_scale: 7.5,
height: 768,
high_noise_frac: 0.95,
lora_scale: 0.72,
negative_prompt: "yellow, cluttered, ugly, photo",
num_inference_steps: 50,
num_outputs: 4,
prompt: "An impasto painting in the style of TOK, neon, orange and cyan",
prompt_strength: 0.8,
refine: "expert_ensemble_refiner",
scheduler: "K_EULER",
width: 1360
}
}
);
// 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_acs**********************************
This is your API token. Keep it to yourself.
import replicate
Run fofr/sdxl-tron using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"fofr/sdxl-tron:fd920825e12db2a942f8a9cac40ad4f624a34a06faba3ac1b44a5305df8c6e2d",
input={
"apply_watermark": False,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.95,
"lora_scale": 0.72,
"negative_prompt": "yellow, cluttered, ugly, photo",
"num_inference_steps": 50,
"num_outputs": 4,
"prompt": "An impasto painting in the style of TOK, neon, orange and cyan",
"prompt_strength": 0.8,
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"width": 1360
}
)
# 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_acs**********************************
This is your API token. Keep it to yourself.
Run fofr/sdxl-tron 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-tron:fd920825e12db2a942f8a9cac40ad4f624a34a06faba3ac1b44a5305df8c6e2d",
"input": {
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.95,
"lora_scale": 0.72,
"negative_prompt": "yellow, cluttered, ugly, photo",
"num_inference_steps": 50,
"num_outputs": 4,
"prompt": "An impasto painting in the style of TOK, neon, orange and cyan",
"prompt_strength": 0.8,
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"width": 1360
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "btkuistbhi2sxctpvzq4nzr6ym",
"model": "fofr/sdxl-tron",
"version": "fd920825e12db2a942f8a9cac40ad4f624a34a06faba3ac1b44a5305df8c6e2d",
"input": {
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.95,
"lora_scale": 0.72,
"negative_prompt": "yellow, cluttered, ugly, photo",
"num_inference_steps": 50,
"num_outputs": 4,
"prompt": "An impasto painting in the style of TOK, neon, orange and cyan",
"prompt_strength": 0.8,
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"width": 1360
},
"logs": "Using seed: 9684\nPrompt: An impasto painting in the style of <s0><s1>, neon, orange and cyan\ntxt2img mode\n 0%| | 0/47 [00:00<?, ?it/s]\n 2%|▏ | 1/47 [00:01<00:46, 1.01s/it]\n 4%|▍ | 2/47 [00:02<00:45, 1.02s/it]\n 6%|▋ | 3/47 [00:03<00:44, 1.02s/it]\n 9%|▊ | 4/47 [00:04<00:43, 1.02s/it]\n 11%|█ | 5/47 [00:05<00:42, 1.02s/it]\n 13%|█▎ | 6/47 [00:06<00:41, 1.02s/it]\n 15%|█▍ | 7/47 [00:07<00:40, 1.02s/it]\n 17%|█▋ | 8/47 [00:08<00:39, 1.02s/it]\n 19%|█▉ | 9/47 [00:09<00:38, 1.02s/it]\n 21%|██▏ | 10/47 [00:10<00:37, 1.02s/it]\n 23%|██▎ | 11/47 [00:11<00:36, 1.02s/it]\n 26%|██▌ | 12/47 [00:12<00:35, 1.02s/it]\n 28%|██▊ | 13/47 [00:13<00:34, 1.02s/it]\n 30%|██▉ | 14/47 [00:14<00:33, 1.02s/it]\n 32%|███▏ | 15/47 [00:15<00:32, 1.02s/it]\n 34%|███▍ | 16/47 [00:16<00:31, 1.02s/it]\n 36%|███▌ | 17/47 [00:17<00:30, 1.02s/it]\n 38%|███▊ | 18/47 [00:18<00:29, 1.02s/it]\n 40%|████ | 19/47 [00:19<00:28, 1.02s/it]\n 43%|████▎ | 20/47 [00:20<00:27, 1.02s/it]\n 45%|████▍ | 21/47 [00:21<00:26, 1.02s/it]\n 47%|████▋ | 22/47 [00:22<00:25, 1.02s/it]\n 49%|████▉ | 23/47 [00:23<00:24, 1.02s/it]\n 51%|█████ | 24/47 [00:24<00:23, 1.02s/it]\n 53%|█████▎ | 25/47 [00:25<00:22, 1.02s/it]\n 55%|█████▌ | 26/47 [00:26<00:21, 1.02s/it]\n 57%|█████▋ | 27/47 [00:27<00:20, 1.02s/it]\n 60%|█████▉ | 28/47 [00:28<00:19, 1.02s/it]\n 62%|██████▏ | 29/47 [00:29<00:18, 1.02s/it]\n 64%|██████▍ | 30/47 [00:30<00:17, 1.02s/it]\n 66%|██████▌ | 31/47 [00:31<00:16, 1.02s/it]\n 68%|██████▊ | 32/47 [00:32<00:15, 1.02s/it]\n 70%|███████ | 33/47 [00:33<00:14, 1.02s/it]\n 72%|███████▏ | 34/47 [00:34<00:13, 1.02s/it]\n 74%|███████▍ | 35/47 [00:35<00:12, 1.02s/it]\n 77%|███████▋ | 36/47 [00:36<00:11, 1.02s/it]\n 79%|███████▊ | 37/47 [00:37<00:10, 1.02s/it]\n 81%|████████ | 38/47 [00:38<00:09, 1.02s/it]\n 83%|████████▎ | 39/47 [00:39<00:08, 1.02s/it]\n 85%|████████▌ | 40/47 [00:40<00:07, 1.02s/it]\n 87%|████████▋ | 41/47 [00:41<00:06, 1.02s/it]\n 89%|████████▉ | 42/47 [00:42<00:05, 1.02s/it]\n 91%|█████████▏| 43/47 [00:43<00:04, 1.02s/it]\n 94%|█████████▎| 44/47 [00:44<00:03, 1.02s/it]\n 96%|█████████▌| 45/47 [00:45<00:02, 1.02s/it]\n 98%|█████████▊| 46/47 [00:46<00:01, 1.02s/it]\n100%|██████████| 47/47 [00:47<00:00, 1.02s/it]\n100%|██████████| 47/47 [00:47<00:00, 1.02s/it]\n 0%| | 0/3 [00:00<?, ?it/s]\n 33%|███▎ | 1/3 [00:00<00:01, 1.21it/s]\n 67%|██████▋ | 2/3 [00:01<00:00, 1.21it/s]\n100%|██████████| 3/3 [00:02<00:00, 1.21it/s]\n100%|██████████| 3/3 [00:02<00:00, 1.21it/s]",
"output": [
"https://replicate.delivery/pbxt/Ayzb8PCuzrJrOpea8qG2bPe112n9dAacePCVvLxN7dDNg8viA/out-0.png",
"https://replicate.delivery/pbxt/UUrskdfw4vy9C6CRgB8Tc2jGAf6sNqkr9QRRrAiHBr0HQeviA/out-1.png",
"https://replicate.delivery/pbxt/kqarEsplITJBMF6a5BEiQgvLekTCxSqZf1usxpvmFnyHQeviA/out-2.png",
"https://replicate.delivery/pbxt/v2cknLVYOnbRIFWqSv7fLXJ0I2y21A890KIMCh8nPSpDIfXRA/out-3.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-08-08T12:14:43.331121Z",
"started_at": "2023-08-08T12:15:13.012715Z",
"completed_at": "2023-08-08T12:16:07.978883Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/btkuistbhi2sxctpvzq4nzr6ym/cancel",
"get": "https://api.replicate.com/v1/predictions/btkuistbhi2sxctpvzq4nzr6ym"
},
"metrics": {
"predict_time": 54.966168,
"total_time": 84.647762
}
}


