defaultAn astronaut riding a rainbow unicorn
typetext
{
"apply_watermark": true,
"background_color": "#A2A2A2",
"condition_canny_scale": 0.9,
"condition_depth_scale": 0.09,
"guidance_scale": 7.5,
"image": "https://replicate.delivery/pbxt/KbVQ4ItrGWdUk9jN7KdNo5nr7h9CxSvJncYIhKtDlpA61nyl/Screenshot%202024-03-20%20at%2019.09.12.png",
"ip_image": "https://replicate.delivery/pbxt/KbVQ45hsJ2OSfsMuV7FUWjCodQCIosVO3LofwKHfO7rghXGs/339009%402x.jpg",
"ip_scale": 0.83,
"lora_scale": 0.3,
"negative_prompt": "",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "shot in the style of sksfer, words \"MARC AGUILAR\" by Van Gogh, colorful pattern",
"resizing_scale": 1,
"scheduler": "K_EULER",
"strength": 1
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_7v0**********************************
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 fermatresearch/magic-style-transfer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"fermatresearch/magic-style-transfer:3b5fa5d360c361090f11164292e45cc5d14cea8d089591d47c580cac9ec1c7ca",
{
input: {
apply_watermark: true,
background_color: "#A2A2A2",
condition_canny_scale: 0.9,
condition_depth_scale: 0.09,
guidance_scale: 7.5,
image: "https://replicate.delivery/pbxt/KbVQ4ItrGWdUk9jN7KdNo5nr7h9CxSvJncYIhKtDlpA61nyl/Screenshot%202024-03-20%20at%2019.09.12.png",
ip_image: "https://replicate.delivery/pbxt/KbVQ45hsJ2OSfsMuV7FUWjCodQCIosVO3LofwKHfO7rghXGs/339009%402x.jpg",
ip_scale: 0.83,
lora_scale: 0.3,
negative_prompt: "",
num_inference_steps: 30,
num_outputs: 1,
prompt: "shot in the style of sksfer, words \"MARC AGUILAR\" by Van Gogh, colorful pattern",
resizing_scale: 1,
scheduler: "K_EULER",
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_7v0**********************************
This is your API token. Keep it to yourself.
import replicate
Run fermatresearch/magic-style-transfer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"fermatresearch/magic-style-transfer:3b5fa5d360c361090f11164292e45cc5d14cea8d089591d47c580cac9ec1c7ca",
input={
"apply_watermark": True,
"background_color": "#A2A2A2",
"condition_canny_scale": 0.9,
"condition_depth_scale": 0.09,
"guidance_scale": 7.5,
"image": "https://replicate.delivery/pbxt/KbVQ4ItrGWdUk9jN7KdNo5nr7h9CxSvJncYIhKtDlpA61nyl/Screenshot%202024-03-20%20at%2019.09.12.png",
"ip_image": "https://replicate.delivery/pbxt/KbVQ45hsJ2OSfsMuV7FUWjCodQCIosVO3LofwKHfO7rghXGs/339009%402x.jpg",
"ip_scale": 0.83,
"lora_scale": 0.3,
"negative_prompt": "",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "shot in the style of sksfer, words \"MARC AGUILAR\" by Van Gogh, colorful pattern",
"resizing_scale": 1,
"scheduler": "K_EULER",
"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_7v0**********************************
This is your API token. Keep it to yourself.
Run fermatresearch/magic-style-transfer 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": "fermatresearch/magic-style-transfer:3b5fa5d360c361090f11164292e45cc5d14cea8d089591d47c580cac9ec1c7ca",
"input": {
"apply_watermark": true,
"background_color": "#A2A2A2",
"condition_canny_scale": 0.9,
"condition_depth_scale": 0.09,
"guidance_scale": 7.5,
"image": "https://replicate.delivery/pbxt/KbVQ4ItrGWdUk9jN7KdNo5nr7h9CxSvJncYIhKtDlpA61nyl/Screenshot%202024-03-20%20at%2019.09.12.png",
"ip_image": "https://replicate.delivery/pbxt/KbVQ45hsJ2OSfsMuV7FUWjCodQCIosVO3LofwKHfO7rghXGs/339009%402x.jpg",
"ip_scale": 0.83,
"lora_scale": 0.3,
"negative_prompt": "",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "shot in the style of sksfer, words \\"MARC AGUILAR\\" by Van Gogh, colorful pattern",
"resizing_scale": 1,
"scheduler": "K_EULER",
"strength": 1
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "l362oidbq3lho4epawqurablle",
"model": "fermatresearch/magic-style-transfer",
"version": "3b5fa5d360c361090f11164292e45cc5d14cea8d089591d47c580cac9ec1c7ca",
"input": {
"apply_watermark": true,
"background_color": "#A2A2A2",
"condition_canny_scale": 0.9,
"condition_depth_scale": 0.09,
"guidance_scale": 7.5,
"image": "https://replicate.delivery/pbxt/KbVQ4ItrGWdUk9jN7KdNo5nr7h9CxSvJncYIhKtDlpA61nyl/Screenshot%202024-03-20%20at%2019.09.12.png",
"ip_image": "https://replicate.delivery/pbxt/KbVQ45hsJ2OSfsMuV7FUWjCodQCIosVO3LofwKHfO7rghXGs/339009%402x.jpg",
"ip_scale": 0.83,
"lora_scale": 0.3,
"negative_prompt": "",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "shot in the style of sksfer, words \"MARC AGUILAR\" by Van Gogh, colorful pattern",
"resizing_scale": 1,
"scheduler": "K_EULER",
"strength": 1
},
"logs": "Using seed: 55864\nPrompt: shot in the style of sksfer, words \"MARC AGUILAR\" by Van Gogh, colorful pattern\nOriginal width:1420, height:774\nAspect Ratio: 1.83\nnew_width:1344, new_height:768\nYou have 2 ControlNets and you have passed 1 prompts. The conditionings will be fixed across the prompts.\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:09, 2.97it/s]\n 7%|▋ | 2/30 [00:00<00:10, 2.77it/s]\n 10%|█ | 3/30 [00:01<00:10, 2.65it/s]\n 13%|█▎ | 4/30 [00:01<00:09, 2.61it/s]\n 17%|█▋ | 5/30 [00:01<00:09, 2.59it/s]\n 20%|██ | 6/30 [00:02<00:09, 2.57it/s]\n 23%|██▎ | 7/30 [00:02<00:08, 2.56it/s]\n 27%|██▋ | 8/30 [00:03<00:08, 2.55it/s]\n 30%|███ | 9/30 [00:03<00:08, 2.55it/s]\n 33%|███▎ | 10/30 [00:03<00:07, 2.54it/s]\n 37%|███▋ | 11/30 [00:04<00:07, 2.54it/s]\n 40%|████ | 12/30 [00:04<00:07, 2.54it/s]\n 43%|████▎ | 13/30 [00:05<00:06, 2.54it/s]\n 47%|████▋ | 14/30 [00:05<00:06, 2.54it/s]\n 50%|█████ | 15/30 [00:05<00:05, 2.54it/s]\n 53%|█████▎ | 16/30 [00:06<00:05, 2.54it/s]\n 57%|█████▋ | 17/30 [00:06<00:05, 2.54it/s]\n 60%|██████ | 18/30 [00:07<00:04, 2.53it/s]\n 63%|██████▎ | 19/30 [00:07<00:04, 2.53it/s]\n 67%|██████▋ | 20/30 [00:07<00:03, 2.53it/s]\n 70%|███████ | 21/30 [00:08<00:03, 2.53it/s]\n 73%|███████▎ | 22/30 [00:08<00:03, 2.53it/s]\n 77%|███████▋ | 23/30 [00:08<00:02, 2.53it/s]\n 80%|████████ | 24/30 [00:09<00:02, 2.53it/s]\n 83%|████████▎ | 25/30 [00:09<00:01, 2.53it/s]\n 87%|████████▋ | 26/30 [00:10<00:01, 2.53it/s]\n 90%|█████████ | 27/30 [00:10<00:01, 2.53it/s]\n 93%|█████████▎| 28/30 [00:10<00:00, 2.53it/s]\n 97%|█████████▋| 29/30 [00:11<00:00, 2.53it/s]\n100%|██████████| 30/30 [00:11<00:00, 2.52it/s]\n100%|██████████| 30/30 [00:11<00:00, 2.55it/s]",
"output": [
"https://replicate.delivery/pbxt/U8K8kORxUV76CJeWFZSPIu8AX2fPLZreCEzY9VD7Z7J1EbElA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-03-20T18:10:21.157751Z",
"started_at": "2024-03-20T18:10:21.175419Z",
"completed_at": "2024-03-20T18:10:35.114254Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/l362oidbq3lho4epawqurablle/cancel",
"get": "https://api.replicate.com/v1/predictions/l362oidbq3lho4epawqurablle"
},
"metrics": {
"predict_time": 13.938835,
"total_time": 13.956503
}
}

