typefile
{
"degree_of_change": 1,
"edit_type": "ImageNet style transfer - Watercolor art",
"image": "https://replicate.delivery/mgxm/ccd230af-3441-4ace-9c4b-68f8d708183e/imagenet1.png",
"manipulation": "ImageNet style transfer",
"n_test_step": 12
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_K21**********************************
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 gwang-kim/diffusionclip using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"gwang-kim/diffusionclip:58e52a5bcc00fdd84a71592542a62320c30d1b6930342a81d5d9a961569351f1",
{
input: {
degree_of_change: 1,
edit_type: "ImageNet style transfer - Watercolor art",
image: "https://replicate.delivery/mgxm/ccd230af-3441-4ace-9c4b-68f8d708183e/imagenet1.png",
manipulation: "ImageNet style transfer",
n_test_step: 12
}
}
);
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output);
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_K21**********************************
This is your API token. Keep it to yourself.
import replicate
Run gwang-kim/diffusionclip using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"gwang-kim/diffusionclip:58e52a5bcc00fdd84a71592542a62320c30d1b6930342a81d5d9a961569351f1",
input={
"degree_of_change": 1,
"edit_type": "ImageNet style transfer - Watercolor art",
"image": "https://replicate.delivery/mgxm/ccd230af-3441-4ace-9c4b-68f8d708183e/imagenet1.png",
"manipulation": "ImageNet style transfer",
"n_test_step": 12
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.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_K21**********************************
This is your API token. Keep it to yourself.
Run gwang-kim/diffusionclip 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": "gwang-kim/diffusionclip:58e52a5bcc00fdd84a71592542a62320c30d1b6930342a81d5d9a961569351f1",
"input": {
"degree_of_change": 1,
"edit_type": "ImageNet style transfer - Watercolor art",
"image": "https://replicate.delivery/mgxm/ccd230af-3441-4ace-9c4b-68f8d708183e/imagenet1.png",
"manipulation": "ImageNet style transfer",
"n_test_step": 12
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "yrqhsvj6fnhsdhokuutdcc7opu",
"model": "gwang-kim/diffusionclip",
"version": "58e52a5bcc00fdd84a71592542a62320c30d1b6930342a81d5d9a961569351f1",
"input": {
"degree_of_change": 1,
"edit_type": "ImageNet style transfer - Watercolor art",
"image": "https://replicate.delivery/mgxm/ccd230af-3441-4ace-9c4b-68f8d708183e/imagenet1.png",
"manipulation": "ImageNet style transfer",
"n_test_step": 12
},
"logs": "None is loaded.\ncheckpoint/imagenet_watercolor_t601.pth is loaded.\n\nInversion process : 0%| | 0/40 [00:00<?, ?it/s]\nInversion process : 2%|▎ | 1/40 [00:00<00:34, 1.14it/s]\nInversion process : 5%|▌ | 2/40 [00:01<00:34, 1.12it/s]\nInversion process : 8%|▊ | 3/40 [00:02<00:33, 1.12it/s]\nInversion process : 10%|█ | 4/40 [00:03<00:32, 1.11it/s]\nInversion process : 12%|█▎ | 5/40 [00:04<00:31, 1.10it/s]\nInversion process : 15%|█▌ | 6/40 [00:05<00:30, 1.10it/s]\nInversion process : 18%|█▊ | 7/40 [00:06<00:29, 1.10it/s]\nInversion process : 20%|██ | 8/40 [00:07<00:29, 1.10it/s]\nInversion process : 22%|██▎ | 9/40 [00:08<00:28, 1.10it/s]\nInversion process : 25%|██▌ | 10/40 [00:09<00:27, 1.10it/s]\nInversion process : 28%|██▊ | 11/40 [00:09<00:26, 1.10it/s]\nInversion process : 30%|███ | 12/40 [00:10<00:25, 1.10it/s]\nInversion process : 32%|███▎ | 13/40 [00:11<00:24, 1.10it/s]\nInversion process : 35%|███▌ | 14/40 [00:12<00:23, 1.10it/s]\nInversion process : 38%|███▊ | 15/40 [00:13<00:22, 1.09it/s]\nInversion process : 40%|████ | 16/40 [00:14<00:21, 1.09it/s]\nInversion process : 42%|████▎ | 17/40 [00:15<00:21, 1.09it/s]\nInversion process : 45%|████▌ | 18/40 [00:16<00:20, 1.09it/s]\nInversion process : 48%|████▊ | 19/40 [00:17<00:19, 1.08it/s]\nInversion process : 50%|█████ | 20/40 [00:18<00:18, 1.08it/s]\nInversion process : 52%|█████▎ | 21/40 [00:19<00:17, 1.08it/s]\nInversion process : 55%|█████▌ | 22/40 [00:20<00:16, 1.08it/s]\nInversion process : 57%|█████▊ | 23/40 [00:21<00:15, 1.07it/s]\nInversion process : 60%|██████ | 24/40 [00:21<00:14, 1.07it/s]\nInversion process : 62%|██████▎ | 25/40 [00:22<00:14, 1.06it/s]\nInversion process : 65%|██████▌ | 26/40 [00:23<00:13, 1.06it/s]\nInversion process : 68%|██████▊ | 27/40 [00:24<00:12, 1.06it/s]\nInversion process : 70%|███████ | 28/40 [00:25<00:11, 1.05it/s]\nInversion process : 72%|███████▎ | 29/40 [00:26<00:10, 1.05it/s]\nInversion process : 75%|███████▌ | 30/40 [00:27<00:09, 1.05it/s]\nInversion process : 78%|███████▊ | 31/40 [00:28<00:08, 1.05it/s]\nInversion process : 80%|████████ | 32/40 [00:29<00:07, 1.04it/s]\nInversion process : 82%|████████▎ | 33/40 [00:30<00:06, 1.04it/s]\nInversion process : 85%|████████▌ | 34/40 [00:31<00:05, 1.03it/s]\nInversion process : 88%|████████▊ | 35/40 [00:32<00:04, 1.03it/s]\nInversion process : 90%|█████████ | 36/40 [00:33<00:03, 1.02it/s]\nInversion process : 92%|█████████▎| 37/40 [00:34<00:02, 1.02it/s]\nInversion process : 95%|█████████▌| 38/40 [00:35<00:01, 1.01it/s]\nInversion process : 98%|█████████▊| 39/40 [00:36<00:00, 1.01it/s]\nInversion process : 98%|█████████▊| 39/40 [00:36<00:00, 1.07it/s]\nSampling type: DDIM with eta 0.0, Steps: 12/601\nUniform skip type\n\nGenerative process 0: 0%| | 0/12 [00:00<?, ?it/s]\nGenerative process 0: 8%|▊ | 1/12 [00:00<00:10, 1.01it/s]\nGenerative process 0: 17%|█▋ | 2/12 [00:01<00:09, 1.01it/s]\nGenerative process 0: 25%|██▌ | 3/12 [00:02<00:08, 1.01it/s]\nGenerative process 0: 33%|███▎ | 4/12 [00:03<00:07, 1.00it/s]\nGenerative process 0: 42%|████▏ | 5/12 [00:04<00:06, 1.00it/s]\nGenerative process 0: 50%|█████ | 6/12 [00:06<00:06, 1.01s/it]\nGenerative process 0: 58%|█████▊ | 7/12 [00:07<00:05, 1.01s/it]\nGenerative process 0: 67%|██████▋ | 8/12 [00:08<00:04, 1.01s/it]\nGenerative process 0: 75%|███████▌ | 9/12 [00:09<00:03, 1.01s/it]\nGenerative process 0: 83%|████████▎ | 10/12 [00:10<00:02, 1.01s/it]\nGenerative process 0: 92%|█████████▏| 11/12 [00:11<00:01, 1.02s/it]\nGenerative process 0: 100%|██████████| 12/12 [00:12<00:00, 1.03s/it]\nGenerative process 0: 100%|██████████| 12/12 [00:12<00:00, 1.01s/it]",
"output": "https://replicate.delivery/mgxm/76f197d2-1594-4a64-89fe-788d3d441cea/output.png",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2022-08-09T14:43:09.416854Z",
"started_at": "2022-08-09T14:43:09.575556Z",
"completed_at": "2022-08-09T14:44:23.7947Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/yrqhsvj6fnhsdhokuutdcc7opu/cancel",
"get": "https://api.replicate.com/v1/predictions/yrqhsvj6fnhsdhokuutdcc7opu"
},
"metrics": {
"predict_time": 74.219144,
"total_time": 74.377846
}
}
