typetext
{
"aspect_ratio": "832x480",
"cfg_scale": 6,
"denoising_strength": 0.7,
"frames_per_second": 16,
"input_video": "https://replicate.delivery/pbxt/MbUZEHGJFGoTaCAlbxPCAHvkmQrWOwAWGhb3o6xwdYRtoV7C/replicate-prediction-6jxv92xhadrma0cncbabf652xm.mp4",
"negative_prompt": "low quality, blurry, distorted, disfigured, text, watermark",
"num_frames": 81,
"num_inference_steps": 30,
"prompt": "a puppy wearing black sunglasses",
"tiled": true
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_64U**********************************
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 lucataco/wan-2.1-1.3b-vid2vid using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/wan-2.1-1.3b-vid2vid:9349766527ed95fa6194dcca4cae3d497357e207025beb0b97fb0403420142b8",
{
input: {
aspect_ratio: "832x480",
cfg_scale: 6,
denoising_strength: 0.7,
frames_per_second: 16,
input_video: "https://replicate.delivery/pbxt/MbUZEHGJFGoTaCAlbxPCAHvkmQrWOwAWGhb3o6xwdYRtoV7C/replicate-prediction-6jxv92xhadrma0cncbabf652xm.mp4",
negative_prompt: "low quality, blurry, distorted, disfigured, text, watermark",
num_frames: 81,
num_inference_steps: 30,
prompt: "a puppy wearing black sunglasses",
tiled: true
}
}
);
// 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_64U**********************************
This is your API token. Keep it to yourself.
import replicate
Run lucataco/wan-2.1-1.3b-vid2vid using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/wan-2.1-1.3b-vid2vid:9349766527ed95fa6194dcca4cae3d497357e207025beb0b97fb0403420142b8",
input={
"aspect_ratio": "832x480",
"cfg_scale": 6,
"denoising_strength": 0.7,
"frames_per_second": 16,
"input_video": "https://replicate.delivery/pbxt/MbUZEHGJFGoTaCAlbxPCAHvkmQrWOwAWGhb3o6xwdYRtoV7C/replicate-prediction-6jxv92xhadrma0cncbabf652xm.mp4",
"negative_prompt": "low quality, blurry, distorted, disfigured, text, watermark",
"num_frames": 81,
"num_inference_steps": 30,
"prompt": "a puppy wearing black sunglasses",
"tiled": True
}
)
# 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_64U**********************************
This is your API token. Keep it to yourself.
Run lucataco/wan-2.1-1.3b-vid2vid 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": "lucataco/wan-2.1-1.3b-vid2vid:9349766527ed95fa6194dcca4cae3d497357e207025beb0b97fb0403420142b8",
"input": {
"aspect_ratio": "832x480",
"cfg_scale": 6,
"denoising_strength": 0.7,
"frames_per_second": 16,
"input_video": "https://replicate.delivery/pbxt/MbUZEHGJFGoTaCAlbxPCAHvkmQrWOwAWGhb3o6xwdYRtoV7C/replicate-prediction-6jxv92xhadrma0cncbabf652xm.mp4",
"negative_prompt": "low quality, blurry, distorted, disfigured, text, watermark",
"num_frames": 81,
"num_inference_steps": 30,
"prompt": "a puppy wearing black sunglasses",
"tiled": true
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "3aybzba7k5rmc0cnyynbneaztg",
"model": "lucataco/wan-2.1-1.3b-vid2vid",
"version": "9349766527ed95fa6194dcca4cae3d497357e207025beb0b97fb0403420142b8",
"input": {
"aspect_ratio": "832x480",
"cfg_scale": 6,
"denoising_strength": 0.7,
"frames_per_second": 16,
"input_video": "https://replicate.delivery/pbxt/MbUZEHGJFGoTaCAlbxPCAHvkmQrWOwAWGhb3o6xwdYRtoV7C/replicate-prediction-6jxv92xhadrma0cncbabf652xm.mp4",
"negative_prompt": "low quality, blurry, distorted, disfigured, text, watermark",
"num_frames": 81,
"num_inference_steps": 30,
"prompt": "a puppy wearing black sunglasses",
"tiled": true
},
"logs": "huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...\nTo disable this warning, you can either:\n- Avoid using `tokenizers` before the fork if possible\n- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)\nVAE encoding: 0%| | 0/9 [00:00<?, ?it/s]\nVAE encoding: 11%|█ | 1/9 [00:00<00:05, 1.58it/s]\nVAE encoding: 22%|██▏ | 2/9 [00:01<00:04, 1.58it/s]\nVAE encoding: 33%|███▎ | 3/9 [00:01<00:03, 1.58it/s]\nVAE encoding: 44%|████▍ | 4/9 [00:02<00:03, 1.57it/s]\nVAE encoding: 56%|█████▌ | 5/9 [00:03<00:02, 1.57it/s]\nVAE encoding: 67%|██████▋ | 6/9 [00:03<00:01, 1.58it/s]\nVAE encoding: 78%|███████▊ | 7/9 [00:04<00:01, 1.57it/s]\nVAE encoding: 89%|████████▉ | 8/9 [00:05<00:00, 1.57it/s]\nVAE encoding: 100%|██████████| 9/9 [00:05<00:00, 1.57it/s]\nVAE encoding: 100%|██████████| 9/9 [00:05<00:00, 1.57it/s]\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:03<01:44, 3.60s/it]\n 7%|▋ | 2/30 [00:07<01:40, 3.60s/it]\n 10%|█ | 3/30 [00:10<01:37, 3.60s/it]\n 13%|█▎ | 4/30 [00:14<01:33, 3.60s/it]\n 17%|█▋ | 5/30 [00:17<01:29, 3.60s/it]\n 20%|██ | 6/30 [00:21<01:26, 3.61s/it]\n 23%|██▎ | 7/30 [00:25<01:22, 3.60s/it]\n 27%|██▋ | 8/30 [00:28<01:19, 3.60s/it]\n 30%|███ | 9/30 [00:32<01:15, 3.60s/it]\n 33%|███▎ | 10/30 [00:36<01:12, 3.60s/it]\n 37%|███▋ | 11/30 [00:39<01:08, 3.61s/it]\n 40%|████ | 12/30 [00:43<01:04, 3.60s/it]\n 43%|████▎ | 13/30 [00:46<01:01, 3.60s/it]\n 47%|████▋ | 14/30 [00:50<00:57, 3.60s/it]\n 50%|█████ | 15/30 [00:54<00:54, 3.60s/it]\n 53%|█████▎ | 16/30 [00:57<00:50, 3.60s/it]\n 57%|█████▋ | 17/30 [01:01<00:46, 3.60s/it]\n 60%|██████ | 18/30 [01:04<00:43, 3.60s/it]\n 63%|██████▎ | 19/30 [01:08<00:39, 3.60s/it]\n 67%|██████▋ | 20/30 [01:12<00:35, 3.60s/it]\n 70%|███████ | 21/30 [01:15<00:32, 3.60s/it]\n 73%|███████▎ | 22/30 [01:19<00:28, 3.61s/it]\n 77%|███████▋ | 23/30 [01:22<00:25, 3.61s/it]\n 80%|████████ | 24/30 [01:26<00:21, 3.61s/it]\n 83%|████████▎ | 25/30 [01:30<00:18, 3.61s/it]\n 87%|████████▋ | 26/30 [01:33<00:14, 3.61s/it]\n 90%|█████████ | 27/30 [01:37<00:10, 3.61s/it]\n 93%|█████████▎| 28/30 [01:40<00:07, 3.61s/it]\n 97%|█████████▋| 29/30 [01:44<00:03, 3.61s/it]\n100%|██████████| 30/30 [01:48<00:00, 3.60s/it]\n100%|██████████| 30/30 [01:48<00:00, 3.60s/it]\nVAE decoding: 0%| | 0/9 [00:00<?, ?it/s]\nVAE decoding: 11%|█ | 1/9 [00:01<00:08, 1.12s/it]\nVAE decoding: 22%|██▏ | 2/9 [00:02<00:07, 1.11s/it]\nVAE decoding: 33%|███▎ | 3/9 [00:03<00:06, 1.11s/it]\nVAE decoding: 44%|████▍ | 4/9 [00:04<00:05, 1.11s/it]\nVAE decoding: 56%|█████▌ | 5/9 [00:05<00:04, 1.11s/it]\nVAE decoding: 67%|██████▋ | 6/9 [00:06<00:03, 1.11s/it]\nVAE decoding: 78%|███████▊ | 7/9 [00:07<00:02, 1.11s/it]\nVAE decoding: 89%|████████▉ | 8/9 [00:08<00:01, 1.11s/it]\nVAE decoding: 100%|██████████| 9/9 [00:09<00:00, 1.11s/it]\nVAE decoding: 100%|██████████| 9/9 [00:09<00:00, 1.11s/it]\nSaving video: 0%| | 0/81 [00:00<?, ?it/s]huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...\nTo disable this warning, you can either:\n- Avoid using `tokenizers` before the fork if possible\n- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)\nSaving video: 1%| | 1/81 [00:00<00:23, 3.33it/s]\nSaving video: 89%|████████▉ | 72/81 [00:00<00:00, 230.25it/s]\nSaving video: 100%|██████████| 81/81 [00:00<00:00, 186.99it/s]",
"output": "https://replicate.delivery/xezq/8pFLomYr6wrQIJOYErDNrnZ5xwqQLiirI1yuB2ZmDSDfbZPKA/tmp_vurc1dr.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-04-02T18:01:26.681Z",
"started_at": "2025-04-02T18:01:26.689737Z",
"completed_at": "2025-04-02T18:03:40.537024Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/3aybzba7k5rmc0cnyynbneaztg/cancel",
"get": "https://api.replicate.com/v1/predictions/3aybzba7k5rmc0cnyynbneaztg",
"stream": "https://stream.replicate.com/v1/files/bcwr-fowizvzrn7x5glwymckz5k4gsffnz2kfshm6axaeqkzvqylmvorq",
"web": "https://replicate.com/p/3aybzba7k5rmc0cnyynbneaztg"
},
"metrics": {
"predict_time": 133.847287778,
"total_time": 133.856024
}
}