typetext
{
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 9.58,
"image": "https://replicate.delivery/pbxt/MN2qWKDYehoE3rsfsOPY4f3pGXNH0HXrqKgdjjWZqpwuUnSH/lady_002_vanilla.png",
"lora_scale": 1,
"mask": "https://replicate.delivery/pbxt/MN2qW6TxHNOpEDF3g1CKrbQSrKF2Nn9g7RUB30Xes1WxKnEH/lady_002_vanilla_mask.png",
"megapixels": "1",
"model": "dev",
"num_inference_steps": 50,
"num_outputs": 1,
"output_format": "jpg",
"output_quality": 80,
"prompt": "BespokePunksStyle",
"prompt_strength": 1
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_FkX**********************************
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 codelace/nocaptions3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"codelace/nocaptions3:699912703d8dd9762877ff8d693a808a2e089bf74534fad1acb31e43b2e79f0b",
{
input: {
aspect_ratio: "1:1",
extra_lora_scale: 1,
go_fast: false,
guidance_scale: 9.58,
image: "https://replicate.delivery/pbxt/MN2qWKDYehoE3rsfsOPY4f3pGXNH0HXrqKgdjjWZqpwuUnSH/lady_002_vanilla.png",
lora_scale: 1,
mask: "https://replicate.delivery/pbxt/MN2qW6TxHNOpEDF3g1CKrbQSrKF2Nn9g7RUB30Xes1WxKnEH/lady_002_vanilla_mask.png",
megapixels: "1",
model: "dev",
num_inference_steps: 50,
num_outputs: 1,
output_format: "jpg",
output_quality: 80,
prompt: "BespokePunksStyle",
prompt_strength: 1
}
}
);
// 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_FkX**********************************
This is your API token. Keep it to yourself.
import replicate
Run codelace/nocaptions3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"codelace/nocaptions3:699912703d8dd9762877ff8d693a808a2e089bf74534fad1acb31e43b2e79f0b",
input={
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": False,
"guidance_scale": 9.58,
"image": "https://replicate.delivery/pbxt/MN2qWKDYehoE3rsfsOPY4f3pGXNH0HXrqKgdjjWZqpwuUnSH/lady_002_vanilla.png",
"lora_scale": 1,
"mask": "https://replicate.delivery/pbxt/MN2qW6TxHNOpEDF3g1CKrbQSrKF2Nn9g7RUB30Xes1WxKnEH/lady_002_vanilla_mask.png",
"megapixels": "1",
"model": "dev",
"num_inference_steps": 50,
"num_outputs": 1,
"output_format": "jpg",
"output_quality": 80,
"prompt": "BespokePunksStyle",
"prompt_strength": 1
}
)
# 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_FkX**********************************
This is your API token. Keep it to yourself.
Run codelace/nocaptions3 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": "codelace/nocaptions3:699912703d8dd9762877ff8d693a808a2e089bf74534fad1acb31e43b2e79f0b",
"input": {
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 9.58,
"image": "https://replicate.delivery/pbxt/MN2qWKDYehoE3rsfsOPY4f3pGXNH0HXrqKgdjjWZqpwuUnSH/lady_002_vanilla.png",
"lora_scale": 1,
"mask": "https://replicate.delivery/pbxt/MN2qW6TxHNOpEDF3g1CKrbQSrKF2Nn9g7RUB30Xes1WxKnEH/lady_002_vanilla_mask.png",
"megapixels": "1",
"model": "dev",
"num_inference_steps": 50,
"num_outputs": 1,
"output_format": "jpg",
"output_quality": 80,
"prompt": "BespokePunksStyle",
"prompt_strength": 1
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "pr0ewnev85rme0cmj95at7xwmm",
"model": "codelace/nocaptions3",
"version": "699912703d8dd9762877ff8d693a808a2e089bf74534fad1acb31e43b2e79f0b",
"input": {
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 9.58,
"image": "https://replicate.delivery/pbxt/MN2qWKDYehoE3rsfsOPY4f3pGXNH0HXrqKgdjjWZqpwuUnSH/lady_002_vanilla.png",
"lora_scale": 1,
"mask": "https://replicate.delivery/pbxt/MN2qW6TxHNOpEDF3g1CKrbQSrKF2Nn9g7RUB30Xes1WxKnEH/lady_002_vanilla_mask.png",
"megapixels": "1",
"model": "dev",
"num_inference_steps": 50,
"num_outputs": 1,
"output_format": "jpg",
"output_quality": 80,
"prompt": "BespokePunksStyle",
"prompt_strength": 1
},
"logs": "2025-01-23 08:32:47.403 | DEBUG | fp8.lora_loading:apply_lora_to_model:574 - Extracting keys\n2025-01-23 08:32:47.404 | DEBUG | fp8.lora_loading:apply_lora_to_model:581 - Keys extracted\nApplying LoRA: 0%| | 0/304 [00:00<?, ?it/s]\nApplying LoRA: 91%|█████████▏| 278/304 [00:00<00:00, 2778.88it/s]\nApplying LoRA: 100%|██████████| 304/304 [00:00<00:00, 2650.84it/s]\n2025-01-23 08:32:47.519 | SUCCESS | fp8.lora_loading:unload_loras:564 - LoRAs unloaded in 0.12s\nfree=29127590260736\nDownloading weights\n2025-01-23T08:32:47Z | INFO | [ Initiating ] chunk_size=150M dest=/tmp/tmpj7glogp9/weights url=https://replicate.delivery/xezq/MKoZRVQ88p6dGhP6vUETXATQDGVufyleGAP9YnjkgfuXg1LoA/trained_model.tar\n2025-01-23T08:32:49Z | INFO | [ Complete ] dest=/tmp/tmpj7glogp9/weights size=\"344 MB\" total_elapsed=2.394s url=https://replicate.delivery/xezq/MKoZRVQ88p6dGhP6vUETXATQDGVufyleGAP9YnjkgfuXg1LoA/trained_model.tar\nDownloaded weights in 2.42s\n2025-01-23 08:32:49.939 | INFO | fp8.lora_loading:convert_lora_weights:498 - Loading LoRA weights for /src/weights-cache/67225bfb7e57db18\n2025-01-23 08:32:50.052 | INFO | fp8.lora_loading:convert_lora_weights:519 - LoRA weights loaded\n2025-01-23 08:32:50.053 | DEBUG | fp8.lora_loading:apply_lora_to_model:574 - Extracting keys\n2025-01-23 08:32:50.053 | DEBUG | fp8.lora_loading:apply_lora_to_model:581 - Keys extracted\nApplying LoRA: 0%| | 0/304 [00:00<?, ?it/s]\nApplying LoRA: 91%|█████████▏| 278/304 [00:00<00:00, 2779.57it/s]\nApplying LoRA: 100%|██████████| 304/304 [00:00<00:00, 2651.48it/s]\n2025-01-23 08:32:50.168 | SUCCESS | fp8.lora_loading:load_lora:539 - LoRA applied in 0.23s\nUsing seed: 21209\nImage detected - setting to img2img mode\nInput image size: 576x576\nInput image size set to: 576x576\n0it [00:00, ?it/s]\n2it [00:00, 16.28it/s]\n4it [00:00, 14.26it/s]\n6it [00:00, 13.74it/s]\n8it [00:00, 13.51it/s]\n10it [00:00, 13.36it/s]\n12it [00:00, 13.27it/s]\n14it [00:01, 13.22it/s]\n16it [00:01, 13.18it/s]\n18it [00:01, 13.15it/s]\n20it [00:01, 13.14it/s]\n22it [00:01, 13.11it/s]\n24it [00:01, 13.11it/s]\n26it [00:01, 13.10it/s]\n28it [00:02, 13.10it/s]\n30it [00:02, 13.11it/s]\n32it [00:02, 13.13it/s]\n34it [00:02, 13.13it/s]\n36it [00:02, 13.12it/s]\n38it [00:02, 13.12it/s]\n40it [00:03, 13.13it/s]\n42it [00:03, 13.11it/s]\n44it [00:03, 13.12it/s]\n46it [00:03, 13.12it/s]\n48it [00:03, 13.13it/s]\n50it [00:03, 13.13it/s]\n50it [00:03, 13.22it/s]\nTotal safe images: 1 out of 1",
"output": [
"https://replicate.delivery/xezq/UsL9GcIVS1r8CRWoPADAW5YQSPzyOtPkLO41RLQfcHNbh9DKA/out-0.jpg"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-01-23T08:32:46.913Z",
"started_at": "2025-01-23T08:32:47.018185Z",
"completed_at": "2025-01-23T08:32:54.53775Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/pr0ewnev85rme0cmj95at7xwmm/cancel",
"get": "https://api.replicate.com/v1/predictions/pr0ewnev85rme0cmj95at7xwmm",
"stream": "https://stream.replicate.com/v1/files/bcwr-j7wag4a64jmvngi2mgb3sqrpz3gzz3zn77rdzyydch7mf5qsu43q",
"web": "https://replicate.com/p/pr0ewnev85rme0cmj95at7xwmm"
},
"metrics": {
"predict_time": 7.5195654990000005,
"total_time": 7.62475
}
}

