Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
gwang-kim /diffusionclip:58e52a5b
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
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: {
image: "https://replicate.delivery/mgxm/cbfb339e-ce2d-4645-b9ef-c399262bca8a/celeb3.png",
edit_type: "Human face manipulation - Sketch",
n_test_step: 20,
manipulation: "Human face manipulation",
degree_of_change: 1
}
}
);
// 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=<paste-your-token-here>
Find your API token in your account settings.
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={
"image": "https://replicate.delivery/mgxm/cbfb339e-ce2d-4645-b9ef-c399262bca8a/celeb3.png",
"edit_type": "Human face manipulation - Sketch",
"n_test_step": 20,
"manipulation": "Human face manipulation",
"degree_of_change": 1
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
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": {
"image": "https://replicate.delivery/mgxm/cbfb339e-ce2d-4645-b9ef-c399262bca8a/celeb3.png",
"edit_type": "Human face manipulation - Sketch",
"n_test_step": 20,
"manipulation": "Human face manipulation",
"degree_of_change": 1
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2022-08-09T14:57:21.807168Z",
"created_at": "2022-08-09T14:57:09.036581Z",
"data_removed": false,
"error": null,
"id": "teu6ub4xtnettpdf5lpkfi6pxq",
"input": {
"image": "https://replicate.delivery/mgxm/cbfb339e-ce2d-4645-b9ef-c399262bca8a/celeb3.png",
"edit_type": "Human face manipulation - Sketch",
"n_test_step": "20",
"manipulation": "Human face manipulation",
"degree_of_change": "1"
},
"logs": "None is loaded.\ncheckpoint/human_sketch_t601.pth is loaded.\n\nInversion process : 0%| | 0/40 [00:00<?, ?it/s]\nInversion process : 2%|▎ | 1/40 [00:00<00:07, 5.44it/s]\nInversion process : 5%|▌ | 2/40 [00:00<00:05, 6.46it/s]\nInversion process : 8%|▊ | 3/40 [00:00<00:05, 6.82it/s]\nInversion process : 10%|█ | 4/40 [00:00<00:05, 7.03it/s]\nInversion process : 12%|█▎ | 5/40 [00:00<00:04, 7.16it/s]\nInversion process : 15%|█▌ | 6/40 [00:00<00:04, 7.20it/s]\nInversion process : 18%|█▊ | 7/40 [00:01<00:04, 7.23it/s]\nInversion process : 20%|██ | 8/40 [00:01<00:04, 7.25it/s]\nInversion process : 22%|██▎ | 9/40 [00:01<00:04, 7.26it/s]\nInversion process : 25%|██▌ | 10/40 [00:01<00:04, 7.26it/s]\nInversion process : 28%|██▊ | 11/40 [00:01<00:04, 7.22it/s]\nInversion process : 30%|███ | 12/40 [00:01<00:03, 7.22it/s]\nInversion process : 32%|███▎ | 13/40 [00:01<00:03, 7.26it/s]\nInversion process : 35%|███▌ | 14/40 [00:01<00:03, 7.30it/s]\nInversion process : 38%|███▊ | 15/40 [00:02<00:03, 7.29it/s]\nInversion process : 40%|████ | 16/40 [00:02<00:03, 7.24it/s]\nInversion process : 42%|████▎ | 17/40 [00:02<00:03, 7.20it/s]\nInversion process : 45%|████▌ | 18/40 [00:02<00:03, 7.21it/s]\nInversion process : 48%|████▊ | 19/40 [00:02<00:02, 7.24it/s]\nInversion process : 50%|█████ | 20/40 [00:02<00:02, 7.25it/s]\nInversion process : 52%|█████▎ | 21/40 [00:02<00:02, 7.25it/s]\nInversion process : 55%|█████▌ | 22/40 [00:03<00:02, 7.23it/s]\nInversion process : 57%|█████▊ | 23/40 [00:03<00:02, 7.21it/s]\nInversion process : 60%|██████ | 24/40 [00:03<00:02, 7.22it/s]\nInversion process : 62%|██████▎ | 25/40 [00:03<00:02, 7.24it/s]\nInversion process : 65%|██████▌ | 26/40 [00:03<00:01, 7.23it/s]\nInversion process : 68%|██████▊ | 27/40 [00:03<00:01, 7.21it/s]\nInversion process : 70%|███████ | 28/40 [00:03<00:01, 7.20it/s]\nInversion process : 72%|███████▎ | 29/40 [00:04<00:01, 7.17it/s]\nInversion process : 75%|███████▌ | 30/40 [00:04<00:01, 7.14it/s]\nInversion process : 78%|███████▊ | 31/40 [00:04<00:01, 7.14it/s]\nInversion process : 80%|████████ | 32/40 [00:04<00:01, 7.14it/s]\nInversion process : 82%|████████▎ | 33/40 [00:04<00:00, 7.17it/s]\nInversion process : 85%|████████▌ | 34/40 [00:04<00:00, 7.20it/s]\nInversion process : 88%|████████▊ | 35/40 [00:04<00:00, 7.22it/s]\nInversion process : 90%|█████████ | 36/40 [00:05<00:00, 7.20it/s]\nInversion process : 92%|█████████▎| 37/40 [00:05<00:00, 7.18it/s]\nInversion process : 95%|█████████▌| 38/40 [00:05<00:00, 7.13it/s]\nInversion process : 98%|█████████▊| 39/40 [00:05<00:00, 7.10it/s]\nInversion process : 98%|█████████▊| 39/40 [00:05<00:00, 7.16it/s]\nSampling type: DDIM with eta 0.0, Steps: 20/601\nUniform skip type\n\nGenerative process 0: 0%| | 0/20 [00:00<?, ?it/s]\nGenerative process 0: 5%|▌ | 1/20 [00:00<00:02, 7.55it/s]\nGenerative process 0: 10%|█ | 2/20 [00:00<00:02, 7.40it/s]\nGenerative process 0: 15%|█▌ | 3/20 [00:00<00:02, 7.36it/s]\nGenerative process 0: 20%|██ | 4/20 [00:00<00:02, 7.32it/s]\nGenerative process 0: 25%|██▌ | 5/20 [00:00<00:02, 7.26it/s]\nGenerative process 0: 30%|███ | 6/20 [00:00<00:01, 7.18it/s]\nGenerative process 0: 35%|███▌ | 7/20 [00:00<00:01, 7.10it/s]\nGenerative process 0: 40%|████ | 8/20 [00:01<00:01, 7.08it/s]\nGenerative process 0: 45%|████▌ | 9/20 [00:01<00:01, 7.08it/s]\nGenerative process 0: 50%|█████ | 10/20 [00:01<00:01, 7.08it/s]\nGenerative process 0: 55%|█████▌ | 11/20 [00:01<00:01, 7.09it/s]\nGenerative process 0: 60%|██████ | 12/20 [00:01<00:01, 7.09it/s]\nGenerative process 0: 65%|██████▌ | 13/20 [00:01<00:00, 7.07it/s]\nGenerative process 0: 70%|███████ | 14/20 [00:01<00:00, 7.04it/s]\nGenerative process 0: 75%|███████▌ | 15/20 [00:02<00:00, 7.01it/s]\nGenerative process 0: 80%|████████ | 16/20 [00:02<00:00, 7.01it/s]\nGenerative process 0: 85%|████████▌ | 17/20 [00:02<00:00, 7.04it/s]\nGenerative process 0: 90%|█████████ | 18/20 [00:02<00:00, 7.06it/s]\nGenerative process 0: 95%|█████████▌| 19/20 [00:02<00:00, 7.06it/s]\nGenerative process 0: 100%|██████████| 20/20 [00:02<00:00, 7.04it/s]\nGenerative process 0: 100%|██████████| 20/20 [00:02<00:00, 7.10it/s]",
"metrics": {
"predict_time": 12.552633,
"total_time": 12.770587
},
"output": "https://replicate.delivery/mgxm/aca26207-3e6c-4fa8-b38e-207b4d56886a/output.png",
"started_at": "2022-08-09T14:57:09.254535Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/teu6ub4xtnettpdf5lpkfi6pxq",
"cancel": "https://api.replicate.com/v1/predictions/teu6ub4xtnettpdf5lpkfi6pxq/cancel"
},
"version": "58e52a5bcc00fdd84a71592542a62320c30d1b6930342a81d5d9a961569351f1"
}
None is loaded.
checkpoint/human_sketch_t601.pth is loaded.
Inversion process : 0%| | 0/40 [00:00<?, ?it/s]
Inversion process : 2%|▎ | 1/40 [00:00<00:07, 5.44it/s]
Inversion process : 5%|▌ | 2/40 [00:00<00:05, 6.46it/s]
Inversion process : 8%|▊ | 3/40 [00:00<00:05, 6.82it/s]
Inversion process : 10%|█ | 4/40 [00:00<00:05, 7.03it/s]
Inversion process : 12%|█▎ | 5/40 [00:00<00:04, 7.16it/s]
Inversion process : 15%|█▌ | 6/40 [00:00<00:04, 7.20it/s]
Inversion process : 18%|█▊ | 7/40 [00:01<00:04, 7.23it/s]
Inversion process : 20%|██ | 8/40 [00:01<00:04, 7.25it/s]
Inversion process : 22%|██▎ | 9/40 [00:01<00:04, 7.26it/s]
Inversion process : 25%|██▌ | 10/40 [00:01<00:04, 7.26it/s]
Inversion process : 28%|██▊ | 11/40 [00:01<00:04, 7.22it/s]
Inversion process : 30%|███ | 12/40 [00:01<00:03, 7.22it/s]
Inversion process : 32%|███▎ | 13/40 [00:01<00:03, 7.26it/s]
Inversion process : 35%|███▌ | 14/40 [00:01<00:03, 7.30it/s]
Inversion process : 38%|███▊ | 15/40 [00:02<00:03, 7.29it/s]
Inversion process : 40%|████ | 16/40 [00:02<00:03, 7.24it/s]
Inversion process : 42%|████▎ | 17/40 [00:02<00:03, 7.20it/s]
Inversion process : 45%|████▌ | 18/40 [00:02<00:03, 7.21it/s]
Inversion process : 48%|████▊ | 19/40 [00:02<00:02, 7.24it/s]
Inversion process : 50%|█████ | 20/40 [00:02<00:02, 7.25it/s]
Inversion process : 52%|█████▎ | 21/40 [00:02<00:02, 7.25it/s]
Inversion process : 55%|█████▌ | 22/40 [00:03<00:02, 7.23it/s]
Inversion process : 57%|█████▊ | 23/40 [00:03<00:02, 7.21it/s]
Inversion process : 60%|██████ | 24/40 [00:03<00:02, 7.22it/s]
Inversion process : 62%|██████▎ | 25/40 [00:03<00:02, 7.24it/s]
Inversion process : 65%|██████▌ | 26/40 [00:03<00:01, 7.23it/s]
Inversion process : 68%|██████▊ | 27/40 [00:03<00:01, 7.21it/s]
Inversion process : 70%|███████ | 28/40 [00:03<00:01, 7.20it/s]
Inversion process : 72%|███████▎ | 29/40 [00:04<00:01, 7.17it/s]
Inversion process : 75%|███████▌ | 30/40 [00:04<00:01, 7.14it/s]
Inversion process : 78%|███████▊ | 31/40 [00:04<00:01, 7.14it/s]
Inversion process : 80%|████████ | 32/40 [00:04<00:01, 7.14it/s]
Inversion process : 82%|████████▎ | 33/40 [00:04<00:00, 7.17it/s]
Inversion process : 85%|████████▌ | 34/40 [00:04<00:00, 7.20it/s]
Inversion process : 88%|████████▊ | 35/40 [00:04<00:00, 7.22it/s]
Inversion process : 90%|█████████ | 36/40 [00:05<00:00, 7.20it/s]
Inversion process : 92%|█████████▎| 37/40 [00:05<00:00, 7.18it/s]
Inversion process : 95%|█████████▌| 38/40 [00:05<00:00, 7.13it/s]
Inversion process : 98%|█████████▊| 39/40 [00:05<00:00, 7.10it/s]
Inversion process : 98%|█████████▊| 39/40 [00:05<00:00, 7.16it/s]
Sampling type: DDIM with eta 0.0, Steps: 20/601
Uniform skip type
Generative process 0: 0%| | 0/20 [00:00<?, ?it/s]
Generative process 0: 5%|▌ | 1/20 [00:00<00:02, 7.55it/s]
Generative process 0: 10%|█ | 2/20 [00:00<00:02, 7.40it/s]
Generative process 0: 15%|█▌ | 3/20 [00:00<00:02, 7.36it/s]
Generative process 0: 20%|██ | 4/20 [00:00<00:02, 7.32it/s]
Generative process 0: 25%|██▌ | 5/20 [00:00<00:02, 7.26it/s]
Generative process 0: 30%|███ | 6/20 [00:00<00:01, 7.18it/s]
Generative process 0: 35%|███▌ | 7/20 [00:00<00:01, 7.10it/s]
Generative process 0: 40%|████ | 8/20 [00:01<00:01, 7.08it/s]
Generative process 0: 45%|████▌ | 9/20 [00:01<00:01, 7.08it/s]
Generative process 0: 50%|█████ | 10/20 [00:01<00:01, 7.08it/s]
Generative process 0: 55%|█████▌ | 11/20 [00:01<00:01, 7.09it/s]
Generative process 0: 60%|██████ | 12/20 [00:01<00:01, 7.09it/s]
Generative process 0: 65%|██████▌ | 13/20 [00:01<00:00, 7.07it/s]
Generative process 0: 70%|███████ | 14/20 [00:01<00:00, 7.04it/s]
Generative process 0: 75%|███████▌ | 15/20 [00:02<00:00, 7.01it/s]
Generative process 0: 80%|████████ | 16/20 [00:02<00:00, 7.01it/s]
Generative process 0: 85%|████████▌ | 17/20 [00:02<00:00, 7.04it/s]
Generative process 0: 90%|█████████ | 18/20 [00:02<00:00, 7.06it/s]
Generative process 0: 95%|█████████▌| 19/20 [00:02<00:00, 7.06it/s]
Generative process 0: 100%|██████████| 20/20 [00:02<00:00, 7.04it/s]
Generative process 0: 100%|██████████| 20/20 [00:02<00:00, 7.10it/s]