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/24ca9517-9d26-4fd6-a09a-6b01ceda8104/dog1.png",
edit_type: "Dog face manipulation - Bear",
n_test_step: 40,
manipulation: "Dog 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/24ca9517-9d26-4fd6-a09a-6b01ceda8104/dog1.png",
"edit_type": "Dog face manipulation - Bear",
"n_test_step": 40,
"manipulation": "Dog 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/24ca9517-9d26-4fd6-a09a-6b01ceda8104/dog1.png",
"edit_type": "Dog face manipulation - Bear",
"n_test_step": 40,
"manipulation": "Dog 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:47:41.080364Z",
"created_at": "2022-08-09T14:47:27.109060Z",
"data_removed": false,
"error": null,
"id": "gudt5etdnzbblcivxqhc6mppjm",
"input": {
"image": "https://replicate.delivery/mgxm/24ca9517-9d26-4fd6-a09a-6b01ceda8104/dog1.png",
"edit_type": "Dog face manipulation - Bear",
"n_test_step": "40",
"manipulation": "Dog face manipulation",
"degree_of_change": 1
},
"logs": "None is loaded.\ncheckpoint/dog_bear_t500.pth is loaded.\n\nInversion process : 0%| | 0/40 [00:00<?, ?it/s]\nInversion process : 2%|▎ | 1/40 [00:00<00:05, 6.68it/s]\nInversion process : 5%|▌ | 2/40 [00:00<00:04, 8.18it/s]\nInversion process : 8%|▊ | 3/40 [00:00<00:04, 8.80it/s]\nInversion process : 10%|█ | 4/40 [00:00<00:03, 9.13it/s]\nInversion process : 12%|█▎ | 5/40 [00:00<00:03, 9.38it/s]\nInversion process : 15%|█▌ | 6/40 [00:00<00:03, 9.54it/s]\nInversion process : 18%|█▊ | 7/40 [00:00<00:03, 9.64it/s]\nInversion process : 20%|██ | 8/40 [00:00<00:03, 9.70it/s]\nInversion process : 22%|██▎ | 9/40 [00:00<00:03, 9.74it/s]\nInversion process : 25%|██▌ | 10/40 [00:01<00:03, 9.78it/s]\nInversion process : 28%|██▊ | 11/40 [00:01<00:02, 9.77it/s]\nInversion process : 30%|███ | 12/40 [00:01<00:02, 9.78it/s]\nInversion process : 32%|███▎ | 13/40 [00:01<00:02, 9.80it/s]\nInversion process : 35%|███▌ | 14/40 [00:01<00:02, 9.79it/s]\nInversion process : 38%|███▊ | 15/40 [00:01<00:02, 9.79it/s]\nInversion process : 40%|████ | 16/40 [00:01<00:02, 9.80it/s]\nInversion process : 42%|████▎ | 17/40 [00:01<00:02, 9.81it/s]\nInversion process : 45%|████▌ | 18/40 [00:01<00:02, 9.84it/s]\nInversion process : 48%|████▊ | 19/40 [00:01<00:02, 9.84it/s]\nInversion process : 50%|█████ | 20/40 [00:02<00:02, 9.85it/s]\nInversion process : 52%|█████▎ | 21/40 [00:02<00:01, 9.85it/s]\nInversion process : 55%|█████▌ | 22/40 [00:02<00:01, 9.84it/s]\nInversion process : 57%|█████▊ | 23/40 [00:02<00:01, 9.84it/s]\nInversion process : 60%|██████ | 24/40 [00:02<00:01, 9.84it/s]\nInversion process : 62%|██████▎ | 25/40 [00:02<00:01, 9.84it/s]\nInversion process : 65%|██████▌ | 26/40 [00:02<00:01, 9.85it/s]\nInversion process : 68%|██████▊ | 27/40 [00:02<00:01, 9.85it/s]\nInversion process : 70%|███████ | 28/40 [00:02<00:01, 9.84it/s]\nInversion process : 72%|███████▎ | 29/40 [00:03<00:01, 9.87it/s]\nInversion process : 75%|███████▌ | 30/40 [00:03<00:01, 9.86it/s]\nInversion process : 78%|███████▊ | 31/40 [00:03<00:00, 9.84it/s]\nInversion process : 80%|████████ | 32/40 [00:03<00:00, 9.85it/s]\nInversion process : 82%|████████▎ | 33/40 [00:03<00:00, 9.85it/s]\nInversion process : 85%|████████▌ | 34/40 [00:03<00:00, 9.83it/s]\nInversion process : 88%|████████▊ | 35/40 [00:03<00:00, 9.86it/s]\nInversion process : 90%|█████████ | 36/40 [00:03<00:00, 9.85it/s]\nInversion process : 92%|█████████▎| 37/40 [00:03<00:00, 9.85it/s]\nInversion process : 95%|█████████▌| 38/40 [00:03<00:00, 9.84it/s]\nInversion process : 98%|█████████▊| 39/40 [00:04<00:00, 9.86it/s]\nInversion process : 98%|█████████▊| 39/40 [00:04<00:00, 9.71it/s]\nSampling type: DDIM with eta 0.0, Steps: 40/500\nUniform skip type\n\nGenerative process 0: 0%| | 0/40 [00:00<?, ?it/s]\nGenerative process 0: 5%|▌ | 2/40 [00:00<00:03, 10.21it/s]\nGenerative process 0: 10%|█ | 4/40 [00:00<00:03, 9.98it/s]\nGenerative process 0: 12%|█▎ | 5/40 [00:00<00:03, 9.95it/s]\nGenerative process 0: 15%|█▌ | 6/40 [00:00<00:03, 9.92it/s]\nGenerative process 0: 18%|█▊ | 7/40 [00:00<00:03, 9.86it/s]\nGenerative process 0: 20%|██ | 8/40 [00:00<00:03, 9.82it/s]\nGenerative process 0: 22%|██▎ | 9/40 [00:00<00:03, 9.78it/s]\nGenerative process 0: 25%|██▌ | 10/40 [00:01<00:03, 9.73it/s]\nGenerative process 0: 28%|██▊ | 11/40 [00:01<00:02, 9.69it/s]\nGenerative process 0: 30%|███ | 12/40 [00:01<00:02, 9.69it/s]\nGenerative process 0: 32%|███▎ | 13/40 [00:01<00:02, 9.71it/s]\nGenerative process 0: 35%|███▌ | 14/40 [00:01<00:02, 9.70it/s]\nGenerative process 0: 38%|███▊ | 15/40 [00:01<00:02, 9.71it/s]\nGenerative process 0: 40%|████ | 16/40 [00:01<00:02, 9.72it/s]\nGenerative process 0: 42%|████▎ | 17/40 [00:01<00:02, 9.77it/s]\nGenerative process 0: 45%|████▌ | 18/40 [00:01<00:02, 9.77it/s]\nGenerative process 0: 48%|████▊ | 19/40 [00:01<00:02, 9.79it/s]\nGenerative process 0: 50%|█████ | 20/40 [00:02<00:02, 9.81it/s]\nGenerative process 0: 52%|█████▎ | 21/40 [00:02<00:01, 9.80it/s]\nGenerative process 0: 55%|█████▌ | 22/40 [00:02<00:01, 9.77it/s]\nGenerative process 0: 57%|█████▊ | 23/40 [00:02<00:01, 9.75it/s]\nGenerative process 0: 60%|██████ | 24/40 [00:02<00:01, 9.74it/s]\nGenerative process 0: 62%|██████▎ | 25/40 [00:02<00:01, 9.67it/s]\nGenerative process 0: 65%|██████▌ | 26/40 [00:02<00:01, 9.67it/s]\nGenerative process 0: 68%|██████▊ | 27/40 [00:02<00:01, 9.67it/s]\nGenerative process 0: 70%|███████ | 28/40 [00:02<00:01, 9.69it/s]\nGenerative process 0: 72%|███████▎ | 29/40 [00:02<00:01, 9.64it/s]\nGenerative process 0: 75%|███████▌ | 30/40 [00:03<00:01, 9.67it/s]\nGenerative process 0: 78%|███████▊ | 31/40 [00:03<00:00, 9.70it/s]\nGenerative process 0: 80%|████████ | 32/40 [00:03<00:00, 9.73it/s]\nGenerative process 0: 82%|████████▎ | 33/40 [00:03<00:00, 9.78it/s]\nGenerative process 0: 85%|████████▌ | 34/40 [00:03<00:00, 9.75it/s]\nGenerative process 0: 88%|████████▊ | 35/40 [00:03<00:00, 9.73it/s]\nGenerative process 0: 90%|█████████ | 36/40 [00:03<00:00, 9.72it/s]\nGenerative process 0: 92%|█████████▎| 37/40 [00:03<00:00, 9.66it/s]\nGenerative process 0: 95%|█████████▌| 38/40 [00:03<00:00, 9.63it/s]\nGenerative process 0: 98%|█████████▊| 39/40 [00:04<00:00, 9.64it/s]\nGenerative process 0: 100%|██████████| 40/40 [00:04<00:00, 9.64it/s]\nGenerative process 0: 100%|██████████| 40/40 [00:04<00:00, 9.74it/s]",
"metrics": {
"predict_time": 13.762829,
"total_time": 13.971304
},
"output": "https://replicate.delivery/mgxm/7c7607cf-d745-4362-b1cb-91f6f1c9125b/output.png",
"started_at": "2022-08-09T14:47:27.317535Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/gudt5etdnzbblcivxqhc6mppjm",
"cancel": "https://api.replicate.com/v1/predictions/gudt5etdnzbblcivxqhc6mppjm/cancel"
},
"version": "58e52a5bcc00fdd84a71592542a62320c30d1b6930342a81d5d9a961569351f1"
}
None is loaded.
checkpoint/dog_bear_t500.pth is loaded.
Inversion process : 0%| | 0/40 [00:00<?, ?it/s]
Inversion process : 2%|▎ | 1/40 [00:00<00:05, 6.68it/s]
Inversion process : 5%|▌ | 2/40 [00:00<00:04, 8.18it/s]
Inversion process : 8%|▊ | 3/40 [00:00<00:04, 8.80it/s]
Inversion process : 10%|█ | 4/40 [00:00<00:03, 9.13it/s]
Inversion process : 12%|█▎ | 5/40 [00:00<00:03, 9.38it/s]
Inversion process : 15%|█▌ | 6/40 [00:00<00:03, 9.54it/s]
Inversion process : 18%|█▊ | 7/40 [00:00<00:03, 9.64it/s]
Inversion process : 20%|██ | 8/40 [00:00<00:03, 9.70it/s]
Inversion process : 22%|██▎ | 9/40 [00:00<00:03, 9.74it/s]
Inversion process : 25%|██▌ | 10/40 [00:01<00:03, 9.78it/s]
Inversion process : 28%|██▊ | 11/40 [00:01<00:02, 9.77it/s]
Inversion process : 30%|███ | 12/40 [00:01<00:02, 9.78it/s]
Inversion process : 32%|███▎ | 13/40 [00:01<00:02, 9.80it/s]
Inversion process : 35%|███▌ | 14/40 [00:01<00:02, 9.79it/s]
Inversion process : 38%|███▊ | 15/40 [00:01<00:02, 9.79it/s]
Inversion process : 40%|████ | 16/40 [00:01<00:02, 9.80it/s]
Inversion process : 42%|████▎ | 17/40 [00:01<00:02, 9.81it/s]
Inversion process : 45%|████▌ | 18/40 [00:01<00:02, 9.84it/s]
Inversion process : 48%|████▊ | 19/40 [00:01<00:02, 9.84it/s]
Inversion process : 50%|█████ | 20/40 [00:02<00:02, 9.85it/s]
Inversion process : 52%|█████▎ | 21/40 [00:02<00:01, 9.85it/s]
Inversion process : 55%|█████▌ | 22/40 [00:02<00:01, 9.84it/s]
Inversion process : 57%|█████▊ | 23/40 [00:02<00:01, 9.84it/s]
Inversion process : 60%|██████ | 24/40 [00:02<00:01, 9.84it/s]
Inversion process : 62%|██████▎ | 25/40 [00:02<00:01, 9.84it/s]
Inversion process : 65%|██████▌ | 26/40 [00:02<00:01, 9.85it/s]
Inversion process : 68%|██████▊ | 27/40 [00:02<00:01, 9.85it/s]
Inversion process : 70%|███████ | 28/40 [00:02<00:01, 9.84it/s]
Inversion process : 72%|███████▎ | 29/40 [00:03<00:01, 9.87it/s]
Inversion process : 75%|███████▌ | 30/40 [00:03<00:01, 9.86it/s]
Inversion process : 78%|███████▊ | 31/40 [00:03<00:00, 9.84it/s]
Inversion process : 80%|████████ | 32/40 [00:03<00:00, 9.85it/s]
Inversion process : 82%|████████▎ | 33/40 [00:03<00:00, 9.85it/s]
Inversion process : 85%|████████▌ | 34/40 [00:03<00:00, 9.83it/s]
Inversion process : 88%|████████▊ | 35/40 [00:03<00:00, 9.86it/s]
Inversion process : 90%|█████████ | 36/40 [00:03<00:00, 9.85it/s]
Inversion process : 92%|█████████▎| 37/40 [00:03<00:00, 9.85it/s]
Inversion process : 95%|█████████▌| 38/40 [00:03<00:00, 9.84it/s]
Inversion process : 98%|█████████▊| 39/40 [00:04<00:00, 9.86it/s]
Inversion process : 98%|█████████▊| 39/40 [00:04<00:00, 9.71it/s]
Sampling type: DDIM with eta 0.0, Steps: 40/500
Uniform skip type
Generative process 0: 0%| | 0/40 [00:00<?, ?it/s]
Generative process 0: 5%|▌ | 2/40 [00:00<00:03, 10.21it/s]
Generative process 0: 10%|█ | 4/40 [00:00<00:03, 9.98it/s]
Generative process 0: 12%|█▎ | 5/40 [00:00<00:03, 9.95it/s]
Generative process 0: 15%|█▌ | 6/40 [00:00<00:03, 9.92it/s]
Generative process 0: 18%|█▊ | 7/40 [00:00<00:03, 9.86it/s]
Generative process 0: 20%|██ | 8/40 [00:00<00:03, 9.82it/s]
Generative process 0: 22%|██▎ | 9/40 [00:00<00:03, 9.78it/s]
Generative process 0: 25%|██▌ | 10/40 [00:01<00:03, 9.73it/s]
Generative process 0: 28%|██▊ | 11/40 [00:01<00:02, 9.69it/s]
Generative process 0: 30%|███ | 12/40 [00:01<00:02, 9.69it/s]
Generative process 0: 32%|███▎ | 13/40 [00:01<00:02, 9.71it/s]
Generative process 0: 35%|███▌ | 14/40 [00:01<00:02, 9.70it/s]
Generative process 0: 38%|███▊ | 15/40 [00:01<00:02, 9.71it/s]
Generative process 0: 40%|████ | 16/40 [00:01<00:02, 9.72it/s]
Generative process 0: 42%|████▎ | 17/40 [00:01<00:02, 9.77it/s]
Generative process 0: 45%|████▌ | 18/40 [00:01<00:02, 9.77it/s]
Generative process 0: 48%|████▊ | 19/40 [00:01<00:02, 9.79it/s]
Generative process 0: 50%|█████ | 20/40 [00:02<00:02, 9.81it/s]
Generative process 0: 52%|█████▎ | 21/40 [00:02<00:01, 9.80it/s]
Generative process 0: 55%|█████▌ | 22/40 [00:02<00:01, 9.77it/s]
Generative process 0: 57%|█████▊ | 23/40 [00:02<00:01, 9.75it/s]
Generative process 0: 60%|██████ | 24/40 [00:02<00:01, 9.74it/s]
Generative process 0: 62%|██████▎ | 25/40 [00:02<00:01, 9.67it/s]
Generative process 0: 65%|██████▌ | 26/40 [00:02<00:01, 9.67it/s]
Generative process 0: 68%|██████▊ | 27/40 [00:02<00:01, 9.67it/s]
Generative process 0: 70%|███████ | 28/40 [00:02<00:01, 9.69it/s]
Generative process 0: 72%|███████▎ | 29/40 [00:02<00:01, 9.64it/s]
Generative process 0: 75%|███████▌ | 30/40 [00:03<00:01, 9.67it/s]
Generative process 0: 78%|███████▊ | 31/40 [00:03<00:00, 9.70it/s]
Generative process 0: 80%|████████ | 32/40 [00:03<00:00, 9.73it/s]
Generative process 0: 82%|████████▎ | 33/40 [00:03<00:00, 9.78it/s]
Generative process 0: 85%|████████▌ | 34/40 [00:03<00:00, 9.75it/s]
Generative process 0: 88%|████████▊ | 35/40 [00:03<00:00, 9.73it/s]
Generative process 0: 90%|█████████ | 36/40 [00:03<00:00, 9.72it/s]
Generative process 0: 92%|█████████▎| 37/40 [00:03<00:00, 9.66it/s]
Generative process 0: 95%|█████████▌| 38/40 [00:03<00:00, 9.63it/s]
Generative process 0: 98%|█████████▊| 39/40 [00:04<00:00, 9.64it/s]
Generative process 0: 100%|██████████| 40/40 [00:04<00:00, 9.64it/s]
Generative process 0: 100%|██████████| 40/40 [00:04<00:00, 9.74it/s]