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.
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";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run ali-vilab/anydoor using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"ali-vilab/anydoor:542c963129c4661ab53a875b1b9a84b2102ca784cf872ef2752a468721c0eb2a",
{
input: {
steps: 30,
bg_mask_path: "https://replicate.delivery/pbxt/KAr5sZjqxgOrXGCOo2PAkvrywmnD8s6gtGYEKAzxV1n8UsKN/burger-mask.png",
bg_image_path: "https://replicate.delivery/pbxt/KAr5t2fIFVQ4eNy4JwN6LAZpHyTYzXHaO78TinDeHzYWK9RS/burger.png",
guidance_scale: 4.5,
control_strength: 1,
enable_shape_control: false,
reference_image_mask: "https://replicate.delivery/pbxt/KAr5swy9Bdkv4cM2IKAvLoxCMWtLLmMLFSK1SpwTLDxzdYgW/sloth-mask.png",
reference_image_path: "https://replicate.delivery/pbxt/KAr5sJGlXZyZPR2SfOduHMvnUgS1CIc81ynRVCdHV24JdTo0/sloth.png"
}
}
);
console.log(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 ali-vilab/anydoor using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"ali-vilab/anydoor:542c963129c4661ab53a875b1b9a84b2102ca784cf872ef2752a468721c0eb2a",
input={
"steps": 30,
"bg_mask_path": "https://replicate.delivery/pbxt/KAr5sZjqxgOrXGCOo2PAkvrywmnD8s6gtGYEKAzxV1n8UsKN/burger-mask.png",
"bg_image_path": "https://replicate.delivery/pbxt/KAr5t2fIFVQ4eNy4JwN6LAZpHyTYzXHaO78TinDeHzYWK9RS/burger.png",
"guidance_scale": 4.5,
"control_strength": 1,
"enable_shape_control": False,
"reference_image_mask": "https://replicate.delivery/pbxt/KAr5swy9Bdkv4cM2IKAvLoxCMWtLLmMLFSK1SpwTLDxzdYgW/sloth-mask.png",
"reference_image_path": "https://replicate.delivery/pbxt/KAr5sJGlXZyZPR2SfOduHMvnUgS1CIc81ynRVCdHV24JdTo0/sloth.png"
}
)
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 ali-vilab/anydoor 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": "542c963129c4661ab53a875b1b9a84b2102ca784cf872ef2752a468721c0eb2a",
"input": {
"steps": 30,
"bg_mask_path": "https://replicate.delivery/pbxt/KAr5sZjqxgOrXGCOo2PAkvrywmnD8s6gtGYEKAzxV1n8UsKN/burger-mask.png",
"bg_image_path": "https://replicate.delivery/pbxt/KAr5t2fIFVQ4eNy4JwN6LAZpHyTYzXHaO78TinDeHzYWK9RS/burger.png",
"guidance_scale": 4.5,
"control_strength": 1,
"enable_shape_control": false,
"reference_image_mask": "https://replicate.delivery/pbxt/KAr5swy9Bdkv4cM2IKAvLoxCMWtLLmMLFSK1SpwTLDxzdYgW/sloth-mask.png",
"reference_image_path": "https://replicate.delivery/pbxt/KAr5sJGlXZyZPR2SfOduHMvnUgS1CIc81ynRVCdHV24JdTo0/sloth.png"
}
}' \
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": "2024-01-05T16:14:05.078761Z",
"created_at": "2024-01-05T16:13:57.255429Z",
"data_removed": false,
"error": null,
"id": "vtxdxidb4u2u64w7ffou7tdvgy",
"input": {
"steps": 30,
"bg_mask_path": "https://replicate.delivery/pbxt/KAr5sZjqxgOrXGCOo2PAkvrywmnD8s6gtGYEKAzxV1n8UsKN/burger-mask.png",
"bg_image_path": "https://replicate.delivery/pbxt/KAr5t2fIFVQ4eNy4JwN6LAZpHyTYzXHaO78TinDeHzYWK9RS/burger.png",
"guidance_scale": 4.5,
"control_strength": 1,
"enable_shape_control": false,
"reference_image_mask": "https://replicate.delivery/pbxt/KAr5swy9Bdkv4cM2IKAvLoxCMWtLLmMLFSK1SpwTLDxzdYgW/sloth-mask.png",
"reference_image_path": "https://replicate.delivery/pbxt/KAr5sJGlXZyZPR2SfOduHMvnUgS1CIc81ynRVCdHV24JdTo0/sloth.png"
},
"logs": "Using seed: 2627894035\nData shape for DDIM sampling is (1, 4, 64, 64), eta 0.0\nRunning DDIM Sampling with 31 timesteps\nDDIM Sampler: 0%| | 0/31 [00:00<?, ?it/s]\nDDIM Sampler: 3%|▎ | 1/31 [00:00<00:04, 6.18it/s]\nDDIM Sampler: 6%|▋ | 2/31 [00:00<00:04, 6.25it/s]\nDDIM Sampler: 10%|▉ | 3/31 [00:00<00:04, 6.28it/s]\nDDIM Sampler: 13%|█▎ | 4/31 [00:00<00:04, 6.29it/s]\nDDIM Sampler: 16%|█▌ | 5/31 [00:00<00:04, 6.29it/s]\nDDIM Sampler: 19%|█▉ | 6/31 [00:00<00:03, 6.28it/s]\nDDIM Sampler: 23%|██▎ | 7/31 [00:01<00:03, 6.28it/s]\nDDIM Sampler: 26%|██▌ | 8/31 [00:01<00:03, 6.28it/s]\nDDIM Sampler: 29%|██▉ | 9/31 [00:01<00:03, 6.28it/s]\nDDIM Sampler: 32%|███▏ | 10/31 [00:01<00:03, 6.27it/s]\nDDIM Sampler: 35%|███▌ | 11/31 [00:01<00:03, 6.27it/s]\nDDIM Sampler: 39%|███▊ | 12/31 [00:01<00:03, 6.28it/s]\nDDIM Sampler: 42%|████▏ | 13/31 [00:02<00:02, 6.28it/s]\nDDIM Sampler: 45%|████▌ | 14/31 [00:02<00:02, 6.29it/s]\nDDIM Sampler: 48%|████▊ | 15/31 [00:02<00:02, 6.31it/s]\nDDIM Sampler: 52%|█████▏ | 16/31 [00:02<00:02, 6.32it/s]\nDDIM Sampler: 55%|█████▍ | 17/31 [00:02<00:02, 6.33it/s]\nDDIM Sampler: 58%|█████▊ | 18/31 [00:02<00:02, 6.33it/s]\nDDIM Sampler: 61%|██████▏ | 19/31 [00:03<00:01, 6.33it/s]\nDDIM Sampler: 65%|██████▍ | 20/31 [00:03<00:01, 6.33it/s]\nDDIM Sampler: 68%|██████▊ | 21/31 [00:03<00:01, 6.33it/s]\nDDIM Sampler: 71%|███████ | 22/31 [00:03<00:01, 6.33it/s]\nDDIM Sampler: 74%|███████▍ | 23/31 [00:03<00:01, 6.33it/s]\nDDIM Sampler: 77%|███████▋ | 24/31 [00:03<00:01, 6.33it/s]\nDDIM Sampler: 81%|████████ | 25/31 [00:03<00:00, 6.33it/s]\nDDIM Sampler: 84%|████████▍ | 26/31 [00:04<00:00, 6.33it/s]\nDDIM Sampler: 87%|████████▋ | 27/31 [00:04<00:00, 6.33it/s]\nDDIM Sampler: 90%|█████████ | 28/31 [00:04<00:00, 6.33it/s]\nDDIM Sampler: 94%|█████████▎| 29/31 [00:04<00:00, 6.33it/s]\nDDIM Sampler: 97%|█████████▋| 30/31 [00:04<00:00, 6.32it/s]\nDDIM Sampler: 100%|██████████| 31/31 [00:04<00:00, 6.32it/s]\nDDIM Sampler: 100%|██████████| 31/31 [00:04<00:00, 6.31it/s]",
"metrics": {
"predict_time": 7.787525,
"total_time": 7.823332
},
"output": "https://replicate.delivery/pbxt/1yuh0r2VbN6mK50eijySUVLRGrFqtvpBb6ICrVSdcBam5uEJA/output.png",
"started_at": "2024-01-05T16:13:57.291236Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/vtxdxidb4u2u64w7ffou7tdvgy",
"cancel": "https://api.replicate.com/v1/predictions/vtxdxidb4u2u64w7ffou7tdvgy/cancel"
},
"version": "542c963129c4661ab53a875b1b9a84b2102ca784cf872ef2752a468721c0eb2a"
}
Using seed: 2627894035
Data shape for DDIM sampling is (1, 4, 64, 64), eta 0.0
Running DDIM Sampling with 31 timesteps
DDIM Sampler: 0%| | 0/31 [00:00<?, ?it/s]
DDIM Sampler: 3%|▎ | 1/31 [00:00<00:04, 6.18it/s]
DDIM Sampler: 6%|▋ | 2/31 [00:00<00:04, 6.25it/s]
DDIM Sampler: 10%|▉ | 3/31 [00:00<00:04, 6.28it/s]
DDIM Sampler: 13%|█▎ | 4/31 [00:00<00:04, 6.29it/s]
DDIM Sampler: 16%|█▌ | 5/31 [00:00<00:04, 6.29it/s]
DDIM Sampler: 19%|█▉ | 6/31 [00:00<00:03, 6.28it/s]
DDIM Sampler: 23%|██▎ | 7/31 [00:01<00:03, 6.28it/s]
DDIM Sampler: 26%|██▌ | 8/31 [00:01<00:03, 6.28it/s]
DDIM Sampler: 29%|██▉ | 9/31 [00:01<00:03, 6.28it/s]
DDIM Sampler: 32%|███▏ | 10/31 [00:01<00:03, 6.27it/s]
DDIM Sampler: 35%|███▌ | 11/31 [00:01<00:03, 6.27it/s]
DDIM Sampler: 39%|███▊ | 12/31 [00:01<00:03, 6.28it/s]
DDIM Sampler: 42%|████▏ | 13/31 [00:02<00:02, 6.28it/s]
DDIM Sampler: 45%|████▌ | 14/31 [00:02<00:02, 6.29it/s]
DDIM Sampler: 48%|████▊ | 15/31 [00:02<00:02, 6.31it/s]
DDIM Sampler: 52%|█████▏ | 16/31 [00:02<00:02, 6.32it/s]
DDIM Sampler: 55%|█████▍ | 17/31 [00:02<00:02, 6.33it/s]
DDIM Sampler: 58%|█████▊ | 18/31 [00:02<00:02, 6.33it/s]
DDIM Sampler: 61%|██████▏ | 19/31 [00:03<00:01, 6.33it/s]
DDIM Sampler: 65%|██████▍ | 20/31 [00:03<00:01, 6.33it/s]
DDIM Sampler: 68%|██████▊ | 21/31 [00:03<00:01, 6.33it/s]
DDIM Sampler: 71%|███████ | 22/31 [00:03<00:01, 6.33it/s]
DDIM Sampler: 74%|███████▍ | 23/31 [00:03<00:01, 6.33it/s]
DDIM Sampler: 77%|███████▋ | 24/31 [00:03<00:01, 6.33it/s]
DDIM Sampler: 81%|████████ | 25/31 [00:03<00:00, 6.33it/s]
DDIM Sampler: 84%|████████▍ | 26/31 [00:04<00:00, 6.33it/s]
DDIM Sampler: 87%|████████▋ | 27/31 [00:04<00:00, 6.33it/s]
DDIM Sampler: 90%|█████████ | 28/31 [00:04<00:00, 6.33it/s]
DDIM Sampler: 94%|█████████▎| 29/31 [00:04<00:00, 6.33it/s]
DDIM Sampler: 97%|█████████▋| 30/31 [00:04<00:00, 6.32it/s]
DDIM Sampler: 100%|██████████| 31/31 [00:04<00:00, 6.32it/s]
DDIM Sampler: 100%|██████████| 31/31 [00:04<00:00, 6.31it/s]