typefile
{
"adapter_mode": "original",
"block_mode": "original",
"control_image": "https://replicate.delivery/pbxt/KhuVSESWxoUIHzU1pajEJGrE7aZOTpbxm23JbLI4XMWl5JnS/33ef158a8a6247d0a058046c66a0c0c0_496baaa7f7cc4587989b6e967c354a56.png",
"enable_negative_content": false,
"guidance_scale": 1,
"negative_content_strength": 0.5,
"negative_prompt": "ugly, deformed, disfigured, poor details, bad anatomy",
"num_inference_steps": 10,
"num_outputs": 1,
"prompt": "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k",
"style_image": "https://replicate.delivery/pbxt/KhuVS13nzXsU2rMYgEdlcJpNAmEiwP6U8SynbW2TKDyjQOoO/f66790d6bcbc4d529479540bec1b9f1e_06b38be3804e49e789f32fcdde1b576d.png",
"style_strength": 1
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Bf0**********************************
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 jyoung105/instant-style-control using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"jyoung105/instant-style-control:bf470ed019c0dfe7ce5bf2a684b82256e39d215f10b0410f8735638c011c4cfa",
{
input: {
adapter_mode: "original",
block_mode: "original",
control_image: "https://replicate.delivery/pbxt/KhuVSESWxoUIHzU1pajEJGrE7aZOTpbxm23JbLI4XMWl5JnS/33ef158a8a6247d0a058046c66a0c0c0_496baaa7f7cc4587989b6e967c354a56.png",
enable_negative_content: false,
guidance_scale: 1,
negative_content_strength: 0.5,
negative_prompt: "ugly, deformed, disfigured, poor details, bad anatomy",
num_inference_steps: 10,
num_outputs: 1,
prompt: "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k",
style_image: "https://replicate.delivery/pbxt/KhuVS13nzXsU2rMYgEdlcJpNAmEiwP6U8SynbW2TKDyjQOoO/f66790d6bcbc4d529479540bec1b9f1e_06b38be3804e49e789f32fcdde1b576d.png",
style_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_Bf0**********************************
This is your API token. Keep it to yourself.
import replicate
Run jyoung105/instant-style-control using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"jyoung105/instant-style-control:bf470ed019c0dfe7ce5bf2a684b82256e39d215f10b0410f8735638c011c4cfa",
input={
"adapter_mode": "original",
"block_mode": "original",
"control_image": "https://replicate.delivery/pbxt/KhuVSESWxoUIHzU1pajEJGrE7aZOTpbxm23JbLI4XMWl5JnS/33ef158a8a6247d0a058046c66a0c0c0_496baaa7f7cc4587989b6e967c354a56.png",
"enable_negative_content": False,
"guidance_scale": 1,
"negative_content_strength": 0.5,
"negative_prompt": "ugly, deformed, disfigured, poor details, bad anatomy",
"num_inference_steps": 10,
"num_outputs": 1,
"prompt": "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k",
"style_image": "https://replicate.delivery/pbxt/KhuVS13nzXsU2rMYgEdlcJpNAmEiwP6U8SynbW2TKDyjQOoO/f66790d6bcbc4d529479540bec1b9f1e_06b38be3804e49e789f32fcdde1b576d.png",
"style_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_Bf0**********************************
This is your API token. Keep it to yourself.
Run jyoung105/instant-style-control 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": "jyoung105/instant-style-control:bf470ed019c0dfe7ce5bf2a684b82256e39d215f10b0410f8735638c011c4cfa",
"input": {
"adapter_mode": "original",
"block_mode": "original",
"control_image": "https://replicate.delivery/pbxt/KhuVSESWxoUIHzU1pajEJGrE7aZOTpbxm23JbLI4XMWl5JnS/33ef158a8a6247d0a058046c66a0c0c0_496baaa7f7cc4587989b6e967c354a56.png",
"enable_negative_content": false,
"guidance_scale": 1,
"negative_content_strength": 0.5,
"negative_prompt": "ugly, deformed, disfigured, poor details, bad anatomy",
"num_inference_steps": 10,
"num_outputs": 1,
"prompt": "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k",
"style_image": "https://replicate.delivery/pbxt/KhuVS13nzXsU2rMYgEdlcJpNAmEiwP6U8SynbW2TKDyjQOoO/f66790d6bcbc4d529479540bec1b9f1e_06b38be3804e49e789f32fcdde1b576d.png",
"style_strength": 1
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "69a1dmafzhrgp0ceq7x9eyn87w",
"model": "jyoung105/instant-style-control",
"version": "bf470ed019c0dfe7ce5bf2a684b82256e39d215f10b0410f8735638c011c4cfa",
"input": {
"adapter_mode": "original",
"block_mode": "original",
"control_image": "https://replicate.delivery/pbxt/KhuVSESWxoUIHzU1pajEJGrE7aZOTpbxm23JbLI4XMWl5JnS/33ef158a8a6247d0a058046c66a0c0c0_496baaa7f7cc4587989b6e967c354a56.png",
"enable_negative_content": false,
"guidance_scale": 1,
"negative_content_strength": 0.5,
"negative_prompt": "ugly, deformed, disfigured, poor details, bad anatomy",
"num_inference_steps": 10,
"num_outputs": 1,
"prompt": "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k",
"style_image": "https://replicate.delivery/pbxt/KhuVS13nzXsU2rMYgEdlcJpNAmEiwP6U8SynbW2TKDyjQOoO/f66790d6bcbc4d529479540bec1b9f1e_06b38be3804e49e789f32fcdde1b576d.png",
"style_strength": 1
},
"logs": "Using seed: 21992\nDEVICE: cuda\nDTYPE: torch.float16\nStart inference...\n[Debug] Prompt: Astronaut in a jungle, cold color palette, muted colors, detailed, 8k, best quality, high detail, sharp focus,\n[Debug] Neg Prompt: text, watermark, lowres, low quality, worst quality, deformed, glitch, low contrast, noisy, saturation, blurry, ugly, deformed, disfigured, poor details, bad anatomy\n 0%| | 0/10 [00:00<?, ?it/s]\n 10%|█ | 1/10 [00:00<00:02, 3.25it/s]\n 20%|██ | 2/10 [00:00<00:01, 4.96it/s]\n 30%|███ | 3/10 [00:00<00:01, 5.48it/s]\n 40%|████ | 4/10 [00:00<00:01, 5.75it/s]\n 50%|█████ | 5/10 [00:00<00:00, 5.90it/s]\n 60%|██████ | 6/10 [00:01<00:00, 5.98it/s]\n 70%|███████ | 7/10 [00:01<00:00, 6.03it/s]\n 80%|████████ | 8/10 [00:01<00:00, 6.06it/s]\n 90%|█████████ | 9/10 [00:01<00:00, 6.09it/s]\n100%|██████████| 10/10 [00:01<00:00, 6.10it/s]\n100%|██████████| 10/10 [00:01<00:00, 5.77it/s]\nFinish generation in 2.479693651199341 secs.",
"output": [
"https://replicate.delivery/pbxt/opGOcVLnchJCLFjzQV4VHmO0K8jiKufgYOBMqTa81EW4FFUJA/out_0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-04-07T19:12:53.244Z",
"started_at": "2024-04-07T19:15:49.921676Z",
"completed_at": "2024-04-07T19:16:01.792931Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/69a1dmafzhrgp0ceq7x9eyn87w/cancel",
"get": "https://api.replicate.com/v1/predictions/69a1dmafzhrgp0ceq7x9eyn87w",
"web": "https://replicate.com/p/69a1dmafzhrgp0ceq7x9eyn87w"
},
"metrics": {
"predict_time": 11.871255,
"total_time": 188.548931
}
}

