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/bb142829-428c-4008-adb2-182b23586e95/dog2.png",
edit_type: "Dog face manipulation - Hamster",
n_test_step: 40,
manipulation: "Dog face manipulation",
degree_of_change: 0.5
}
}
);
// 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/bb142829-428c-4008-adb2-182b23586e95/dog2.png",
"edit_type": "Dog face manipulation - Hamster",
"n_test_step": 40,
"manipulation": "Dog face manipulation",
"degree_of_change": 0.5
}
)
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/bb142829-428c-4008-adb2-182b23586e95/dog2.png",
"edit_type": "Dog face manipulation - Hamster",
"n_test_step": 40,
"manipulation": "Dog face manipulation",
"degree_of_change": 0.5
}
}' \
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:52:56.043223Z",
"created_at": "2022-08-09T14:52:39.264070Z",
"data_removed": false,
"error": null,
"id": "ieiu2wnc4fbotmulepo3jqac6y",
"input": {
"image": "https://replicate.delivery/mgxm/bb142829-428c-4008-adb2-182b23586e95/dog2.png",
"edit_type": "Dog face manipulation - Hamster",
"n_test_step": "40",
"manipulation": "Dog face manipulation",
"degree_of_change": "0.5"
},
"logs": "None is loaded.\ncheckpoint/dog_hamster_t601.pth is loaded.\n\nInversion process : 0%| | 0/40 [00:00<?, ?it/s]\nInversion process : 2%|▎ | 1/40 [00:00<00:05, 6.86it/s]\nInversion process : 5%|▌ | 2/40 [00:00<00:05, 7.56it/s]\nInversion process : 8%|▊ | 3/40 [00:00<00:04, 8.40it/s]\nInversion process : 10%|█ | 4/40 [00:00<00:04, 8.80it/s]\nInversion process : 12%|█▎ | 5/40 [00:00<00:03, 9.10it/s]\nInversion process : 15%|█▌ | 6/40 [00:00<00:03, 9.29it/s]\nInversion process : 18%|█▊ | 7/40 [00:00<00:03, 9.41it/s]\nInversion process : 20%|██ | 8/40 [00:00<00:03, 9.50it/s]\nInversion process : 22%|██▎ | 9/40 [00:00<00:03, 9.57it/s]\nInversion process : 25%|██▌ | 10/40 [00:01<00:03, 9.63it/s]\nInversion process : 28%|██▊ | 11/40 [00:01<00:03, 9.64it/s]\nInversion process : 30%|███ | 12/40 [00:01<00:02, 9.64it/s]\nInversion process : 32%|███▎ | 13/40 [00:01<00:02, 9.61it/s]\nInversion process : 35%|███▌ | 14/40 [00:01<00:02, 9.59it/s]\nInversion process : 38%|███▊ | 15/40 [00:01<00:02, 9.59it/s]\nInversion process : 40%|████ | 16/40 [00:01<00:02, 9.61it/s]\nInversion process : 42%|████▎ | 17/40 [00:01<00:02, 9.62it/s]\nInversion process : 45%|████▌ | 18/40 [00:01<00:02, 9.65it/s]\nInversion process : 48%|████▊ | 19/40 [00:02<00:02, 9.65it/s]\nInversion process : 50%|█████ | 20/40 [00:02<00:02, 9.64it/s]\nInversion process : 52%|█████▎ | 21/40 [00:02<00:01, 9.59it/s]\nInversion process : 55%|█████▌ | 22/40 [00:02<00:01, 9.59it/s]\nInversion process : 57%|█████▊ | 23/40 [00:02<00:01, 9.60it/s]\nInversion process : 60%|██████ | 24/40 [00:02<00:01, 9.60it/s]\nInversion process : 62%|██████▎ | 25/40 [00:02<00:01, 9.63it/s]\nInversion process : 65%|██████▌ | 26/40 [00:02<00:01, 9.64it/s]\nInversion process : 68%|██████▊ | 27/40 [00:02<00:01, 9.65it/s]\nInversion process : 70%|███████ | 28/40 [00:02<00:01, 9.64it/s]\nInversion process : 72%|███████▎ | 29/40 [00:03<00:01, 9.57it/s]\nInversion process : 75%|███████▌ | 30/40 [00:03<00:01, 9.58it/s]\nInversion process : 78%|███████▊ | 31/40 [00:03<00:00, 9.57it/s]\nInversion process : 80%|████████ | 32/40 [00:03<00:00, 9.60it/s]\nInversion process : 82%|████████▎ | 33/40 [00:03<00:00, 9.62it/s]\nInversion process : 85%|████████▌ | 34/40 [00:03<00:00, 9.61it/s]\nInversion process : 88%|████████▊ | 35/40 [00:03<00:00, 9.56it/s]\nInversion process : 90%|█████████ | 36/40 [00:03<00:00, 9.52it/s]\nInversion process : 92%|█████████▎| 37/40 [00:03<00:00, 9.56it/s]\nInversion process : 95%|█████████▌| 38/40 [00:04<00:00, 9.59it/s]\nInversion process : 98%|█████████▊| 39/40 [00:04<00:00, 9.62it/s]\nInversion process : 98%|█████████▊| 39/40 [00:04<00:00, 9.47it/s]\nSampling type: DDIM with eta 0.0, Steps: 40/601\nUniform skip type\n\nGenerative process 0: 0%| | 0/40 [00:00<?, ?it/s]\nGenerative process 0: 2%|▎ | 1/40 [00:00<00:07, 5.04it/s]\nGenerative process 0: 5%|▌ | 2/40 [00:00<00:07, 4.91it/s]\nGenerative process 0: 8%|▊ | 3/40 [00:00<00:07, 4.87it/s]\nGenerative process 0: 10%|█ | 4/40 [00:00<00:07, 4.86it/s]\nGenerative process 0: 12%|█▎ | 5/40 [00:01<00:07, 4.81it/s]\nGenerative process 0: 15%|█▌ | 6/40 [00:01<00:07, 4.82it/s]\nGenerative process 0: 18%|█▊ | 7/40 [00:01<00:06, 4.82it/s]\nGenerative process 0: 20%|██ | 8/40 [00:01<00:06, 4.84it/s]\nGenerative process 0: 22%|██▎ | 9/40 [00:01<00:06, 4.83it/s]\nGenerative process 0: 25%|██▌ | 10/40 [00:02<00:06, 4.80it/s]\nGenerative process 0: 28%|██▊ | 11/40 [00:02<00:06, 4.80it/s]\nGenerative process 0: 30%|███ | 12/40 [00:02<00:05, 4.82it/s]\nGenerative process 0: 32%|███▎ | 13/40 [00:02<00:05, 4.80it/s]\nGenerative process 0: 35%|███▌ | 14/40 [00:02<00:05, 4.80it/s]\nGenerative process 0: 38%|███▊ | 15/40 [00:03<00:05, 4.80it/s]\nGenerative process 0: 40%|████ | 16/40 [00:03<00:04, 4.81it/s]\nGenerative process 0: 42%|████▎ | 17/40 [00:03<00:04, 4.79it/s]\nGenerative process 0: 45%|████▌ | 18/40 [00:03<00:04, 4.79it/s]\nGenerative process 0: 48%|████▊ | 19/40 [00:03<00:04, 4.80it/s]\nGenerative process 0: 50%|█████ | 20/40 [00:04<00:04, 4.77it/s]\nGenerative process 0: 52%|█████▎ | 21/40 [00:04<00:03, 4.77it/s]\nGenerative process 0: 55%|█████▌ | 22/40 [00:04<00:03, 4.79it/s]\nGenerative process 0: 57%|█████▊ | 23/40 [00:04<00:03, 4.77it/s]\nGenerative process 0: 60%|██████ | 24/40 [00:04<00:03, 4.77it/s]\nGenerative process 0: 62%|██████▎ | 25/40 [00:05<00:03, 4.78it/s]\nGenerative process 0: 65%|██████▌ | 26/40 [00:05<00:02, 4.76it/s]\nGenerative process 0: 68%|██████▊ | 27/40 [00:05<00:02, 4.76it/s]\nGenerative process 0: 70%|███████ | 28/40 [00:05<00:02, 4.78it/s]\nGenerative process 0: 72%|███████▎ | 29/40 [00:06<00:02, 4.75it/s]\nGenerative process 0: 75%|███████▌ | 30/40 [00:06<00:02, 4.76it/s]\nGenerative process 0: 78%|███████▊ | 31/40 [00:06<00:01, 4.74it/s]\nGenerative process 0: 80%|████████ | 32/40 [00:06<00:01, 4.74it/s]\nGenerative process 0: 82%|████████▎ | 33/40 [00:06<00:01, 4.75it/s]\nGenerative process 0: 85%|████████▌ | 34/40 [00:07<00:01, 4.73it/s]\nGenerative process 0: 88%|████████▊ | 35/40 [00:07<00:01, 4.74it/s]\nGenerative process 0: 90%|█████████ | 36/40 [00:07<00:00, 4.71it/s]\nGenerative process 0: 92%|█████████▎| 37/40 [00:07<00:00, 4.72it/s]\nGenerative process 0: 95%|█████████▌| 38/40 [00:07<00:00, 4.71it/s]\nGenerative process 0: 98%|█████████▊| 39/40 [00:08<00:00, 4.71it/s]\nGenerative process 0: 100%|██████████| 40/40 [00:08<00:00, 4.70it/s]\nGenerative process 0: 100%|██████████| 40/40 [00:08<00:00, 4.77it/s]",
"metrics": {
"predict_time": 16.588111,
"total_time": 16.779153
},
"output": "https://replicate.delivery/mgxm/4a85d47a-4bab-40ab-9085-e2ef0e991667/output.png",
"started_at": "2022-08-09T14:52:39.455112Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/ieiu2wnc4fbotmulepo3jqac6y",
"cancel": "https://api.replicate.com/v1/predictions/ieiu2wnc4fbotmulepo3jqac6y/cancel"
},
"version": "58e52a5bcc00fdd84a71592542a62320c30d1b6930342a81d5d9a961569351f1"
}
None is loaded.
checkpoint/dog_hamster_t601.pth is loaded.
Inversion process : 0%| | 0/40 [00:00<?, ?it/s]
Inversion process : 2%|▎ | 1/40 [00:00<00:05, 6.86it/s]
Inversion process : 5%|▌ | 2/40 [00:00<00:05, 7.56it/s]
Inversion process : 8%|▊ | 3/40 [00:00<00:04, 8.40it/s]
Inversion process : 10%|█ | 4/40 [00:00<00:04, 8.80it/s]
Inversion process : 12%|█▎ | 5/40 [00:00<00:03, 9.10it/s]
Inversion process : 15%|█▌ | 6/40 [00:00<00:03, 9.29it/s]
Inversion process : 18%|█▊ | 7/40 [00:00<00:03, 9.41it/s]
Inversion process : 20%|██ | 8/40 [00:00<00:03, 9.50it/s]
Inversion process : 22%|██▎ | 9/40 [00:00<00:03, 9.57it/s]
Inversion process : 25%|██▌ | 10/40 [00:01<00:03, 9.63it/s]
Inversion process : 28%|██▊ | 11/40 [00:01<00:03, 9.64it/s]
Inversion process : 30%|███ | 12/40 [00:01<00:02, 9.64it/s]
Inversion process : 32%|███▎ | 13/40 [00:01<00:02, 9.61it/s]
Inversion process : 35%|███▌ | 14/40 [00:01<00:02, 9.59it/s]
Inversion process : 38%|███▊ | 15/40 [00:01<00:02, 9.59it/s]
Inversion process : 40%|████ | 16/40 [00:01<00:02, 9.61it/s]
Inversion process : 42%|████▎ | 17/40 [00:01<00:02, 9.62it/s]
Inversion process : 45%|████▌ | 18/40 [00:01<00:02, 9.65it/s]
Inversion process : 48%|████▊ | 19/40 [00:02<00:02, 9.65it/s]
Inversion process : 50%|█████ | 20/40 [00:02<00:02, 9.64it/s]
Inversion process : 52%|█████▎ | 21/40 [00:02<00:01, 9.59it/s]
Inversion process : 55%|█████▌ | 22/40 [00:02<00:01, 9.59it/s]
Inversion process : 57%|█████▊ | 23/40 [00:02<00:01, 9.60it/s]
Inversion process : 60%|██████ | 24/40 [00:02<00:01, 9.60it/s]
Inversion process : 62%|██████▎ | 25/40 [00:02<00:01, 9.63it/s]
Inversion process : 65%|██████▌ | 26/40 [00:02<00:01, 9.64it/s]
Inversion process : 68%|██████▊ | 27/40 [00:02<00:01, 9.65it/s]
Inversion process : 70%|███████ | 28/40 [00:02<00:01, 9.64it/s]
Inversion process : 72%|███████▎ | 29/40 [00:03<00:01, 9.57it/s]
Inversion process : 75%|███████▌ | 30/40 [00:03<00:01, 9.58it/s]
Inversion process : 78%|███████▊ | 31/40 [00:03<00:00, 9.57it/s]
Inversion process : 80%|████████ | 32/40 [00:03<00:00, 9.60it/s]
Inversion process : 82%|████████▎ | 33/40 [00:03<00:00, 9.62it/s]
Inversion process : 85%|████████▌ | 34/40 [00:03<00:00, 9.61it/s]
Inversion process : 88%|████████▊ | 35/40 [00:03<00:00, 9.56it/s]
Inversion process : 90%|█████████ | 36/40 [00:03<00:00, 9.52it/s]
Inversion process : 92%|█████████▎| 37/40 [00:03<00:00, 9.56it/s]
Inversion process : 95%|█████████▌| 38/40 [00:04<00:00, 9.59it/s]
Inversion process : 98%|█████████▊| 39/40 [00:04<00:00, 9.62it/s]
Inversion process : 98%|█████████▊| 39/40 [00:04<00:00, 9.47it/s]
Sampling type: DDIM with eta 0.0, Steps: 40/601
Uniform skip type
Generative process 0: 0%| | 0/40 [00:00<?, ?it/s]
Generative process 0: 2%|▎ | 1/40 [00:00<00:07, 5.04it/s]
Generative process 0: 5%|▌ | 2/40 [00:00<00:07, 4.91it/s]
Generative process 0: 8%|▊ | 3/40 [00:00<00:07, 4.87it/s]
Generative process 0: 10%|█ | 4/40 [00:00<00:07, 4.86it/s]
Generative process 0: 12%|█▎ | 5/40 [00:01<00:07, 4.81it/s]
Generative process 0: 15%|█▌ | 6/40 [00:01<00:07, 4.82it/s]
Generative process 0: 18%|█▊ | 7/40 [00:01<00:06, 4.82it/s]
Generative process 0: 20%|██ | 8/40 [00:01<00:06, 4.84it/s]
Generative process 0: 22%|██▎ | 9/40 [00:01<00:06, 4.83it/s]
Generative process 0: 25%|██▌ | 10/40 [00:02<00:06, 4.80it/s]
Generative process 0: 28%|██▊ | 11/40 [00:02<00:06, 4.80it/s]
Generative process 0: 30%|███ | 12/40 [00:02<00:05, 4.82it/s]
Generative process 0: 32%|███▎ | 13/40 [00:02<00:05, 4.80it/s]
Generative process 0: 35%|███▌ | 14/40 [00:02<00:05, 4.80it/s]
Generative process 0: 38%|███▊ | 15/40 [00:03<00:05, 4.80it/s]
Generative process 0: 40%|████ | 16/40 [00:03<00:04, 4.81it/s]
Generative process 0: 42%|████▎ | 17/40 [00:03<00:04, 4.79it/s]
Generative process 0: 45%|████▌ | 18/40 [00:03<00:04, 4.79it/s]
Generative process 0: 48%|████▊ | 19/40 [00:03<00:04, 4.80it/s]
Generative process 0: 50%|█████ | 20/40 [00:04<00:04, 4.77it/s]
Generative process 0: 52%|█████▎ | 21/40 [00:04<00:03, 4.77it/s]
Generative process 0: 55%|█████▌ | 22/40 [00:04<00:03, 4.79it/s]
Generative process 0: 57%|█████▊ | 23/40 [00:04<00:03, 4.77it/s]
Generative process 0: 60%|██████ | 24/40 [00:04<00:03, 4.77it/s]
Generative process 0: 62%|██████▎ | 25/40 [00:05<00:03, 4.78it/s]
Generative process 0: 65%|██████▌ | 26/40 [00:05<00:02, 4.76it/s]
Generative process 0: 68%|██████▊ | 27/40 [00:05<00:02, 4.76it/s]
Generative process 0: 70%|███████ | 28/40 [00:05<00:02, 4.78it/s]
Generative process 0: 72%|███████▎ | 29/40 [00:06<00:02, 4.75it/s]
Generative process 0: 75%|███████▌ | 30/40 [00:06<00:02, 4.76it/s]
Generative process 0: 78%|███████▊ | 31/40 [00:06<00:01, 4.74it/s]
Generative process 0: 80%|████████ | 32/40 [00:06<00:01, 4.74it/s]
Generative process 0: 82%|████████▎ | 33/40 [00:06<00:01, 4.75it/s]
Generative process 0: 85%|████████▌ | 34/40 [00:07<00:01, 4.73it/s]
Generative process 0: 88%|████████▊ | 35/40 [00:07<00:01, 4.74it/s]
Generative process 0: 90%|█████████ | 36/40 [00:07<00:00, 4.71it/s]
Generative process 0: 92%|█████████▎| 37/40 [00:07<00:00, 4.72it/s]
Generative process 0: 95%|█████████▌| 38/40 [00:07<00:00, 4.71it/s]
Generative process 0: 98%|█████████▊| 39/40 [00:08<00:00, 4.71it/s]
Generative process 0: 100%|██████████| 40/40 [00:08<00:00, 4.70it/s]
Generative process 0: 100%|██████████| 40/40 [00:08<00:00, 4.77it/s]