typetext
{
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 3,
"image": "https://replicate.delivery/pbxt/MRI3M4GaaYB5KTPMWFUvGQrhLPYdsPQNSHdKfSzTpEdMIATa/full.png",
"lora_scale": 1,
"mask": "https://replicate.delivery/pbxt/MRI3MXYqMXsSfZYoJi72vsbABNJVOCOkIEuFoFgHMy3gVLqh/test.png",
"megapixels": "1",
"model": "dev",
"num_inference_steps": 28,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "*\"Emperor Palpatine slowly raises his hands, his palms facing the ground, before unleashing a torrent of crackling blue lightning from his fingertips, illuminating the dimly lit chamber with raw Sith power.\"*",
"prompt_strength": 0.8
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_YuZ**********************************
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 swk23/palps using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"swk23/palps:6611c77369c06d32895ba992029d064a0b9730df3a6eeaa4a6fe7d8dece5eb4d",
{
input: {
aspect_ratio: "1:1",
extra_lora_scale: 1,
go_fast: false,
guidance_scale: 3,
image: "https://replicate.delivery/pbxt/MRI3M4GaaYB5KTPMWFUvGQrhLPYdsPQNSHdKfSzTpEdMIATa/full.png",
lora_scale: 1,
mask: "https://replicate.delivery/pbxt/MRI3MXYqMXsSfZYoJi72vsbABNJVOCOkIEuFoFgHMy3gVLqh/test.png",
megapixels: "1",
model: "dev",
num_inference_steps: 28,
num_outputs: 1,
output_format: "webp",
output_quality: 80,
prompt: "*\"Emperor Palpatine slowly raises his hands, his palms facing the ground, before unleashing a torrent of crackling blue lightning from his fingertips, illuminating the dimly lit chamber with raw Sith power.\"*",
prompt_strength: 0.8
}
}
);
// 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_YuZ**********************************
This is your API token. Keep it to yourself.
import replicate
Run swk23/palps using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"swk23/palps:6611c77369c06d32895ba992029d064a0b9730df3a6eeaa4a6fe7d8dece5eb4d",
input={
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": False,
"guidance_scale": 3,
"image": "https://replicate.delivery/pbxt/MRI3M4GaaYB5KTPMWFUvGQrhLPYdsPQNSHdKfSzTpEdMIATa/full.png",
"lora_scale": 1,
"mask": "https://replicate.delivery/pbxt/MRI3MXYqMXsSfZYoJi72vsbABNJVOCOkIEuFoFgHMy3gVLqh/test.png",
"megapixels": "1",
"model": "dev",
"num_inference_steps": 28,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "*\"Emperor Palpatine slowly raises his hands, his palms facing the ground, before unleashing a torrent of crackling blue lightning from his fingertips, illuminating the dimly lit chamber with raw Sith power.\"*",
"prompt_strength": 0.8
}
)
# 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_YuZ**********************************
This is your API token. Keep it to yourself.
Run swk23/palps 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": "swk23/palps:6611c77369c06d32895ba992029d064a0b9730df3a6eeaa4a6fe7d8dece5eb4d",
"input": {
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 3,
"image": "https://replicate.delivery/pbxt/MRI3M4GaaYB5KTPMWFUvGQrhLPYdsPQNSHdKfSzTpEdMIATa/full.png",
"lora_scale": 1,
"mask": "https://replicate.delivery/pbxt/MRI3MXYqMXsSfZYoJi72vsbABNJVOCOkIEuFoFgHMy3gVLqh/test.png",
"megapixels": "1",
"model": "dev",
"num_inference_steps": 28,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "*\\"Emperor Palpatine slowly raises his hands, his palms facing the ground, before unleashing a torrent of crackling blue lightning from his fingertips, illuminating the dimly lit chamber with raw Sith power.\\"*",
"prompt_strength": 0.8
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "sc6wgqkg99rm80cmszhas54b58",
"model": "swk23/palps",
"version": "6611c77369c06d32895ba992029d064a0b9730df3a6eeaa4a6fe7d8dece5eb4d",
"input": {
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 3,
"image": "https://replicate.delivery/pbxt/MRI3M4GaaYB5KTPMWFUvGQrhLPYdsPQNSHdKfSzTpEdMIATa/full.png",
"lora_scale": 1,
"mask": "https://replicate.delivery/pbxt/MRI3MXYqMXsSfZYoJi72vsbABNJVOCOkIEuFoFgHMy3gVLqh/test.png",
"megapixels": "1",
"model": "dev",
"num_inference_steps": 28,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "*\"Emperor Palpatine slowly raises his hands, his palms facing the ground, before unleashing a torrent of crackling blue lightning from his fingertips, illuminating the dimly lit chamber with raw Sith power.\"*",
"prompt_strength": 0.8
},
"logs": "free=29577902108672\nDownloading weights\n2025-02-04T07:35:11Z | INFO | [ Initiating ] chunk_size=150M dest=/tmp/tmp3yyxromh/weights url=https://replicate.delivery/xezq/omoZ3YNbgxagLJMbQuLxINpHCSpAp0GxiGMMYk0wrv1Gp7CF/trained_model.tar\n2025-02-04T07:35:13Z | INFO | [ Complete ] dest=/tmp/tmp3yyxromh/weights size=\"172 MB\" total_elapsed=1.656s url=https://replicate.delivery/xezq/omoZ3YNbgxagLJMbQuLxINpHCSpAp0GxiGMMYk0wrv1Gp7CF/trained_model.tar\nDownloaded weights in 1.70s\nLoaded LoRAs in 2.25s\nUsing seed: 47357\nPrompt: *\"Emperor Palpatine slowly raises his hands, his palms facing the ground, before unleashing a torrent of crackling blue lightning from his fingertips, illuminating the dimly lit chamber with raw Sith power.\"*\n[!] Resizing input image from 1536x640 to 1536x640\n[!] inpaint mode\n 0%| | 0/23 [00:00<?, ?it/s]\n 4%|▍ | 1/23 [00:00<00:06, 3.53it/s]\n 9%|▊ | 2/23 [00:00<00:05, 3.92it/s]\n 13%|█▎ | 3/23 [00:00<00:04, 4.07it/s]\n 17%|█▋ | 4/23 [00:00<00:04, 4.14it/s]\n 22%|██▏ | 5/23 [00:01<00:04, 4.18it/s]\n 26%|██▌ | 6/23 [00:01<00:04, 4.20it/s]\n 30%|███ | 7/23 [00:01<00:03, 4.22it/s]\n 35%|███▍ | 8/23 [00:01<00:03, 4.23it/s]\n 39%|███▉ | 9/23 [00:02<00:03, 4.24it/s]\n 43%|████▎ | 10/23 [00:02<00:03, 4.25it/s]\n 48%|████▊ | 11/23 [00:02<00:02, 4.25it/s]\n 52%|█████▏ | 12/23 [00:02<00:02, 4.25it/s]\n 57%|█████▋ | 13/23 [00:03<00:02, 4.25it/s]\n 61%|██████ | 14/23 [00:03<00:02, 4.25it/s]\n 65%|██████▌ | 15/23 [00:03<00:01, 4.25it/s]\n 70%|██████▉ | 16/23 [00:03<00:01, 4.26it/s]\n 74%|███████▍ | 17/23 [00:04<00:01, 4.26it/s]\n 78%|███████▊ | 18/23 [00:04<00:01, 4.25it/s]\n 83%|████████▎ | 19/23 [00:04<00:00, 4.25it/s]\n 87%|████████▋ | 20/23 [00:04<00:00, 4.25it/s]\n 91%|█████████▏| 21/23 [00:04<00:00, 4.25it/s]\n 96%|█████████▌| 22/23 [00:05<00:00, 4.25it/s]\n100%|██████████| 23/23 [00:05<00:00, 4.52it/s]\n100%|██████████| 23/23 [00:05<00:00, 4.25it/s]\nTotal safe images: 1 out of 1",
"output": [
"https://replicate.delivery/xezq/aPawQPUN7pJzJFEuWxjaZDbKXam3STohwhcNxZXg5pfbq7FKA/out-0.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-02-04T07:35:11.178Z",
"started_at": "2025-02-04T07:35:11.260229Z",
"completed_at": "2025-02-04T07:35:19.638073Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/sc6wgqkg99rm80cmszhas54b58/cancel",
"get": "https://api.replicate.com/v1/predictions/sc6wgqkg99rm80cmszhas54b58",
"stream": "https://stream.replicate.com/v1/files/bcwr-gs7mouk36xe3oqkt5aabismrb4p3wlj4qirupbq6ntd3kwlpob5q",
"web": "https://replicate.com/p/sc6wgqkg99rm80cmszhas54b58"
},
"metrics": {
"predict_time": 8.377844088,
"total_time": 8.460073
}
}

