typetext
{
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 2,
"image": "https://replicate.delivery/pbxt/M8wxklFIjIjicmWCvhCJ3dsNPV9Nt7sdz6TkeMz7DoZUAasS/IMG_0954.png",
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 45,
"num_outputs": 4,
"output_format": "png",
"output_quality": 100,
"prompt": "A confident woman le with pale skin and long, sleek brown shoulder length hair sitting on a chair. She is dressed in a perfectly fit tailored deep teal suit with satin lapels, paired with a black top underneath. The background is softly textured, creating a subtle contrast with her polished and elegant appearance. Her expression is poised and composed, exuding authority and charisma. The shot is professional. She has dark eyes. ",
"prompt_strength": 0.9
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_HWW**********************************
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 leticiaaduke/test2 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"leticiaaduke/test2:5f6bfb817ddae4f4423f0730e1ea04dca771ea57fbe65306c26a39526d9bfffb",
{
input: {
aspect_ratio: "1:1",
extra_lora_scale: 1,
go_fast: false,
guidance_scale: 2,
image: "https://replicate.delivery/pbxt/M8wxklFIjIjicmWCvhCJ3dsNPV9Nt7sdz6TkeMz7DoZUAasS/IMG_0954.png",
lora_scale: 1,
megapixels: "1",
model: "dev",
num_inference_steps: 45,
num_outputs: 4,
output_format: "png",
output_quality: 100,
prompt: "A confident woman le with pale skin and long, sleek brown shoulder length hair sitting on a chair. She is dressed in a perfectly fit tailored deep teal suit with satin lapels, paired with a black top underneath. The background is softly textured, creating a subtle contrast with her polished and elegant appearance. Her expression is poised and composed, exuding authority and charisma. The shot is professional. She has dark eyes. ",
prompt_strength: 0.9
}
}
);
// 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_HWW**********************************
This is your API token. Keep it to yourself.
import replicate
Run leticiaaduke/test2 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"leticiaaduke/test2:5f6bfb817ddae4f4423f0730e1ea04dca771ea57fbe65306c26a39526d9bfffb",
input={
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": False,
"guidance_scale": 2,
"image": "https://replicate.delivery/pbxt/M8wxklFIjIjicmWCvhCJ3dsNPV9Nt7sdz6TkeMz7DoZUAasS/IMG_0954.png",
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 45,
"num_outputs": 4,
"output_format": "png",
"output_quality": 100,
"prompt": "A confident woman le with pale skin and long, sleek brown shoulder length hair sitting on a chair. She is dressed in a perfectly fit tailored deep teal suit with satin lapels, paired with a black top underneath. The background is softly textured, creating a subtle contrast with her polished and elegant appearance. Her expression is poised and composed, exuding authority and charisma. The shot is professional. She has dark eyes. ",
"prompt_strength": 0.9
}
)
# 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_HWW**********************************
This is your API token. Keep it to yourself.
Run leticiaaduke/test2 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": "leticiaaduke/test2:5f6bfb817ddae4f4423f0730e1ea04dca771ea57fbe65306c26a39526d9bfffb",
"input": {
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 2,
"image": "https://replicate.delivery/pbxt/M8wxklFIjIjicmWCvhCJ3dsNPV9Nt7sdz6TkeMz7DoZUAasS/IMG_0954.png",
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 45,
"num_outputs": 4,
"output_format": "png",
"output_quality": 100,
"prompt": "A confident woman le with pale skin and long, sleek brown shoulder length hair sitting on a chair. She is dressed in a perfectly fit tailored deep teal suit with satin lapels, paired with a black top underneath. The background is softly textured, creating a subtle contrast with her polished and elegant appearance. Her expression is poised and composed, exuding authority and charisma. The shot is professional. She has dark eyes. ",
"prompt_strength": 0.9
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "aqsp0xk559rme0ckrq68rh6xe4",
"model": "leticiaaduke/test2",
"version": "5f6bfb817ddae4f4423f0730e1ea04dca771ea57fbe65306c26a39526d9bfffb",
"input": {
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 2,
"image": "https://replicate.delivery/pbxt/M8wxklFIjIjicmWCvhCJ3dsNPV9Nt7sdz6TkeMz7DoZUAasS/IMG_0954.png",
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 45,
"num_outputs": 4,
"output_format": "png",
"output_quality": 100,
"prompt": "A confident woman le with pale skin and long, sleek brown shoulder length hair sitting on a chair. She is dressed in a perfectly fit tailored deep teal suit with satin lapels, paired with a black top underneath. The background is softly textured, creating a subtle contrast with her polished and elegant appearance. Her expression is poised and composed, exuding authority and charisma. The shot is professional. She has dark eyes. ",
"prompt_strength": 0.9
},
"logs": "2024-12-14 15:32:08.067 | DEBUG | fp8.lora_loading:apply_lora_to_model:574 - Extracting keys\n2024-12-14 15:32:08.067 | DEBUG | fp8.lora_loading:apply_lora_to_model:581 - Keys extracted\nApplying LoRA: 0%| | 0/304 [00:00<?, ?it/s]\nApplying LoRA: 93%|█████████▎| 282/304 [00:00<00:00, 2811.56it/s]\nApplying LoRA: 100%|██████████| 304/304 [00:00<00:00, 2613.00it/s]\n2024-12-14 15:32:08.184 | SUCCESS | fp8.lora_loading:unload_loras:564 - LoRAs unloaded in 0.12s\nfree=28649486286848\nDownloading weights\n2024-12-14T15:32:08Z | INFO | [ Initiating ] chunk_size=150M dest=/tmp/tmp6a1n8yo5/weights url=https://replicate.delivery/yhqm/BG3zE6pGnqojI199jhDFH5f9Zjg4bYXoObN2fSU4eGsFfrtOB/trained_model.tar\n2024-12-14T15:32:10Z | INFO | [ Complete ] dest=/tmp/tmp6a1n8yo5/weights size=\"172 MB\" total_elapsed=2.158s url=https://replicate.delivery/yhqm/BG3zE6pGnqojI199jhDFH5f9Zjg4bYXoObN2fSU4eGsFfrtOB/trained_model.tar\nDownloaded weights in 2.18s\n2024-12-14 15:32:10.369 | INFO | fp8.lora_loading:convert_lora_weights:498 - Loading LoRA weights for /src/weights-cache/3b1473488bc6cf5f\n2024-12-14 15:32:10.446 | INFO | fp8.lora_loading:convert_lora_weights:519 - LoRA weights loaded\n2024-12-14 15:32:10.446 | DEBUG | fp8.lora_loading:apply_lora_to_model:574 - Extracting keys\n2024-12-14 15:32:10.446 | DEBUG | fp8.lora_loading:apply_lora_to_model:581 - Keys extracted\nApplying LoRA: 0%| | 0/304 [00:00<?, ?it/s]\nApplying LoRA: 93%|█████████▎| 282/304 [00:00<00:00, 2814.41it/s]\nApplying LoRA: 100%|██████████| 304/304 [00:00<00:00, 2615.05it/s]\n2024-12-14 15:32:10.563 | SUCCESS | fp8.lora_loading:load_lora:539 - LoRA applied in 0.19s\nUsing seed: 54295\nImage detected - settting to img2img mode\nInput image size: 736x896\nInput image size set to: 736x896\n0it [00:00, ?it/s]\n2it [00:00, 9.48it/s]\n3it [00:00, 8.55it/s]\n4it [00:00, 8.13it/s]\n5it [00:00, 7.90it/s]\n6it [00:00, 7.77it/s]\n7it [00:00, 7.69it/s]\n8it [00:01, 7.63it/s]\n9it [00:01, 7.60it/s]\n10it [00:01, 7.57it/s]\n11it [00:01, 7.55it/s]\n12it [00:01, 7.54it/s]\n13it [00:01, 7.53it/s]\n14it [00:01, 7.51it/s]\n15it [00:01, 7.49it/s]\n16it [00:02, 7.49it/s]\n17it [00:02, 7.50it/s]\n18it [00:02, 7.49it/s]\n19it [00:02, 7.49it/s]\n20it [00:02, 7.49it/s]\n21it [00:02, 7.50it/s]\n22it [00:02, 7.50it/s]\n23it [00:03, 7.50it/s]\n24it [00:03, 7.50it/s]\n25it [00:03, 7.50it/s]\n26it [00:03, 7.49it/s]\n27it [00:03, 7.48it/s]\n28it [00:03, 7.49it/s]\n29it [00:03, 7.48it/s]\n30it [00:03, 7.49it/s]\n31it [00:04, 7.49it/s]\n32it [00:04, 7.50it/s]\n33it [00:04, 7.50it/s]\n34it [00:04, 7.50it/s]\n35it [00:04, 7.50it/s]\n36it [00:04, 7.50it/s]\n37it [00:04, 7.50it/s]\n38it [00:05, 7.50it/s]\n39it [00:05, 7.48it/s]\n40it [00:05, 7.47it/s]\n41it [00:05, 7.48it/s]\n41it [00:05, 7.57it/s]\n0it [00:00, ?it/s]\n1it [00:00, 7.69it/s]\n2it [00:00, 7.57it/s]\n3it [00:00, 7.53it/s]\n4it [00:00, 7.49it/s]\n5it [00:00, 7.45it/s]\n6it [00:00, 7.45it/s]\n7it [00:00, 7.43it/s]\n8it [00:01, 7.43it/s]\n9it [00:01, 7.42it/s]\n10it [00:01, 7.43it/s]\n11it [00:01, 7.45it/s]\n12it [00:01, 7.46it/s]\n13it [00:01, 7.48it/s]\n14it [00:01, 7.48it/s]\n15it [00:02, 7.47it/s]\n16it [00:02, 7.47it/s]\n17it [00:02, 7.47it/s]\n18it [00:02, 7.47it/s]\n19it [00:02, 7.47it/s]\n20it [00:02, 7.47it/s]\n21it [00:02, 7.47it/s]\n22it [00:02, 7.47it/s]\n23it [00:03, 7.48it/s]\n24it [00:03, 7.48it/s]\n25it [00:03, 7.49it/s]\n26it [00:03, 7.50it/s]\n27it [00:03, 7.51it/s]\n28it [00:03, 7.51it/s]\n29it [00:03, 7.50it/s]\n30it [00:04, 7.50it/s]\n31it [00:04, 7.48it/s]\n32it [00:04, 7.48it/s]\n33it [00:04, 7.49it/s]\n34it [00:04, 7.48it/s]\n35it [00:04, 7.48it/s]\n36it [00:04, 7.49it/s]\n37it [00:04, 7.49it/s]\n38it [00:05, 7.50it/s]\n39it [00:05, 7.50it/s]\n40it [00:05, 7.49it/s]\n41it [00:05, 7.50it/s]\n41it [00:05, 7.48it/s]\n0it [00:00, ?it/s]\n1it [00:00, 7.68it/s]\n2it [00:00, 7.57it/s]\n3it [00:00, 7.54it/s]\n4it [00:00, 7.51it/s]\n5it [00:00, 7.49it/s]\n6it [00:00, 7.48it/s]\n7it [00:00, 7.48it/s]\n8it [00:01, 7.46it/s]\n9it [00:01, 7.44it/s]\n10it [00:01, 7.43it/s]\n11it [00:01, 7.43it/s]\n12it [00:01, 7.44it/s]\n13it [00:01, 7.44it/s]\n14it [00:01, 7.44it/s]\n15it [00:02, 7.45it/s]\n16it [00:02, 7.46it/s]\n17it [00:02, 7.47it/s]\n18it [00:02, 7.46it/s]\n19it [00:02, 7.47it/s]\n20it [00:02, 7.48it/s]\n21it [00:02, 7.48it/s]\n22it [00:02, 7.49it/s]\n23it [00:03, 7.48it/s]\n24it [00:03, 7.47it/s]\n25it [00:03, 7.46it/s]\n26it [00:03, 7.44it/s]\n27it [00:03, 7.43it/s]\n28it [00:03, 7.44it/s]\n29it [00:03, 7.45it/s]\n30it [00:04, 7.45it/s]\n31it [00:04, 7.46it/s]\n32it [00:04, 7.47it/s]\n33it [00:04, 7.47it/s]\n34it [00:04, 7.47it/s]\n35it [00:04, 7.46it/s]\n36it [00:04, 7.46it/s]\n37it [00:04, 7.47it/s]\n38it [00:05, 7.47it/s]\n39it [00:05, 7.46it/s]\n40it [00:05, 7.47it/s]\n41it [00:05, 7.46it/s]\n41it [00:05, 7.47it/s]\n0it [00:00, ?it/s]\n1it [00:00, 7.60it/s]\n2it [00:00, 7.50it/s]\n3it [00:00, 7.48it/s]\n4it [00:00, 7.47it/s]\n5it [00:00, 7.47it/s]\n6it [00:00, 7.48it/s]\n7it [00:00, 7.47it/s]\n8it [00:01, 7.47it/s]\n9it [00:01, 7.44it/s]\n10it [00:01, 7.45it/s]\n11it [00:01, 7.44it/s]\n12it [00:01, 7.44it/s]\n13it [00:01, 7.45it/s]\n14it [00:01, 7.44it/s]\n15it [00:02, 7.46it/s]\n16it [00:02, 7.45it/s]\n17it [00:02, 7.46it/s]\n18it [00:02, 7.44it/s]\n19it [00:02, 7.43it/s]\n20it [00:02, 7.42it/s]\n21it [00:02, 7.42it/s]\n22it [00:02, 7.43it/s]\n23it [00:03, 7.45it/s]\n24it [00:03, 7.44it/s]\n25it [00:03, 7.44it/s]\n26it [00:03, 7.45it/s]\n27it [00:03, 7.45it/s]\n28it [00:03, 7.45it/s]\n29it [00:03, 7.44it/s]\n30it [00:04, 7.42it/s]\n31it [00:04, 7.43it/s]\n32it [00:04, 7.44it/s]\n33it [00:04, 7.43it/s]\n34it [00:04, 7.44it/s]\n35it [00:04, 7.45it/s]\n36it [00:04, 7.46it/s]\n37it [00:04, 7.47it/s]\n38it [00:05, 7.46it/s]\n39it [00:05, 7.45it/s]\n40it [00:05, 7.44it/s]\n41it [00:05, 7.43it/s]\n41it [00:05, 7.45it/s]\nTotal safe images: 4 out of 4",
"output": [
"https://replicate.delivery/xezq/XqbIQc4vWZrYGlVS3zat83QQTwuv13S6iPMqWpnuuQeJua9JA/out-0.png",
"https://replicate.delivery/xezq/LZEnfFBS9PSbRqIautKjlxgZeDkHY7UEaFaXVt3lHk7Tc16TA/out-1.png",
"https://replicate.delivery/xezq/09LtfmIOgX2iIK8jIsA7aN3DKpA1spsVD56WjHQkUEoJua9JA/out-2.png",
"https://replicate.delivery/xezq/yGb0b0RtebwvfUw4rT7ZhelTpfszDfeqrN9cdDB3SXlfJua9JA/out-3.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-12-14T15:32:07.082Z",
"started_at": "2024-12-14T15:32:07.946092Z",
"completed_at": "2024-12-14T15:32:35.561034Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/aqsp0xk559rme0ckrq68rh6xe4/cancel",
"get": "https://api.replicate.com/v1/predictions/aqsp0xk559rme0ckrq68rh6xe4",
"stream": "https://stream.replicate.com/v1/files/bcwr-zlmp3mvzd7nfdjtjybxykrhlco7o3kiujwrtnqblq6rvh564a2wq",
"web": "https://replicate.com/p/aqsp0xk559rme0ckrq68rh6xe4"
},
"metrics": {
"predict_time": 27.614942868,
"total_time": 28.479034
}
}



