typefile
{
"input_video": "https://replicate.delivery/pbxt/LWT4W9jAKsv5iAuHYe8jsfeb5t0Dze3Wgvs0FSSCfLkoWN1v/videoplayback%20%28online-video-cutter.com%29.mp4",
"prompt": "best quality, perfect anime illustration",
"prompt_2": "best quality, perfect anime illustration, light"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Bqq**********************************
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 tahercoolguy/diffutoon using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"tahercoolguy/diffutoon:c1981efbe73ce88114364ca3634cc08d9e34934b02c75b68652efc7690867fc4",
{
input: {
input_video: "https://replicate.delivery/pbxt/LWT4W9jAKsv5iAuHYe8jsfeb5t0Dze3Wgvs0FSSCfLkoWN1v/videoplayback%20%28online-video-cutter.com%29.mp4",
prompt: "best quality, perfect anime illustration",
prompt_2: "best quality, perfect anime illustration, light"
}
}
);
// 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_Bqq**********************************
This is your API token. Keep it to yourself.
import replicate
Run tahercoolguy/diffutoon using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"tahercoolguy/diffutoon:c1981efbe73ce88114364ca3634cc08d9e34934b02c75b68652efc7690867fc4",
input={
"input_video": "https://replicate.delivery/pbxt/LWT4W9jAKsv5iAuHYe8jsfeb5t0Dze3Wgvs0FSSCfLkoWN1v/videoplayback%20%28online-video-cutter.com%29.mp4",
"prompt": "best quality, perfect anime illustration",
"prompt_2": "best quality, perfect anime illustration, light"
}
)
# 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_Bqq**********************************
This is your API token. Keep it to yourself.
Run tahercoolguy/diffutoon 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": "tahercoolguy/diffutoon:c1981efbe73ce88114364ca3634cc08d9e34934b02c75b68652efc7690867fc4",
"input": {
"input_video": "https://replicate.delivery/pbxt/LWT4W9jAKsv5iAuHYe8jsfeb5t0Dze3Wgvs0FSSCfLkoWN1v/videoplayback%20%28online-video-cutter.com%29.mp4",
"prompt": "best quality, perfect anime illustration",
"prompt_2": "best quality, perfect anime illustration, light"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "wm5t9ejhb9rgm0chjxy8nfgexw",
"model": "tahercoolguy/diffutoon",
"version": "c1981efbe73ce88114364ca3634cc08d9e34934b02c75b68652efc7690867fc4",
"input": {
"input_video": "https://replicate.delivery/pbxt/LWT4W9jAKsv5iAuHYe8jsfeb5t0Dze3Wgvs0FSSCfLkoWN1v/videoplayback%20%28online-video-cutter.com%29.mp4",
"prompt": "best quality, perfect anime illustration",
"prompt_2": "best quality, perfect anime illustration, light"
},
"logs": "Loading models from: models/stable_diffusion/aingdiffusion_v12.safetensors\nmodel_name: sd_text_encoder model_class: SDTextEncoder\nmodel_name: sd_unet model_class: SDUNet\nmodel_name: sd_vae_decoder model_class: SDVAEDecoder\nmodel_name: sd_vae_encoder model_class: SDVAEEncoder\nThe following models are loaded: ['sd_text_encoder', 'sd_unet', 'sd_vae_decoder', 'sd_vae_encoder'].\nLoading models from: models/ControlNet/control_v11p_sd15_softedge.pth\nmodel_name: sd_controlnet model_class: SDControlNet\n The following models are loaded: ['sd_controlnet'].\nLoading models from: models/ControlNet/control_v11f1p_sd15_depth.pth\nmodel_name: sd_controlnet model_class: SDControlNet\n The following models are loaded: ['sd_controlnet'].\nUsing sd_text_encoder from models/stable_diffusion/aingdiffusion_v12.safetensors.\nUsing sd_unet from models/stable_diffusion/aingdiffusion_v12.safetensors.\nUsing sd_vae_decoder from models/stable_diffusion/aingdiffusion_v12.safetensors.\nUsing sd_vae_encoder from models/stable_diffusion/aingdiffusion_v12.safetensors.\nUsing sd_controlnet from models/ControlNet/control_v11p_sd15_softedge.pth.\n/root/.pyenv/versions/3.10.14/lib/python3.10/site-packages/timm/models/_factory.py:117: UserWarning: Mapping deprecated model name vit_base_resnet50_384 to current vit_base_r50_s16_384.orig_in21k_ft_in1k.\nmodel = create_fn(\nUsing sd_controlnet from models/ControlNet/control_v11f1p_sd15_depth.pth.\nNo sd_ipadapter models available.\nNo sd_ipadapter_clip_image_encoder models available.\nNo sd_motion_modules models available.\nTextual inversion verybadimagenegative_v1.3 is enabled.\n 0%| | 0/30 [00:00<?, ?it/s]\n 13%|█▎ | 4/30 [00:00<00:00, 35.27it/s]\n 33%|███▎ | 10/30 [00:00<00:00, 47.84it/s]\n 53%|█████▎ | 16/30 [00:00<00:00, 52.49it/s]\n 73%|███████▎ | 22/30 [00:00<00:00, 54.72it/s]\n 93%|█████████▎| 28/30 [00:00<00:00, 55.80it/s]\n100%|██████████| 30/30 [00:00<00:00, 53.08it/s]\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:03, 8.06it/s]\n 13%|█▎ | 4/30 [00:00<00:01, 18.45it/s]\n 23%|██▎ | 7/30 [00:00<00:01, 22.11it/s]\n 33%|███▎ | 10/30 [00:00<00:00, 23.87it/s]\n 43%|████▎ | 13/30 [00:00<00:00, 24.80it/s]\n 53%|█████▎ | 16/30 [00:00<00:00, 25.32it/s]\n 63%|██████▎ | 19/30 [00:00<00:00, 25.66it/s]\n 73%|███████▎ | 22/30 [00:00<00:00, 25.92it/s]\n 83%|████████▎ | 25/30 [00:01<00:00, 26.07it/s]\n 93%|█████████▎| 28/30 [00:01<00:00, 26.11it/s]\n100%|██████████| 30/30 [00:01<00:00, 24.57it/s]\n 0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:06<02:09, 6.80s/it]\n 10%|█ | 2/20 [00:13<02:00, 6.70s/it]\n 15%|█▌ | 3/20 [00:20<01:53, 6.67s/it]\n 20%|██ | 4/20 [00:26<01:46, 6.66s/it]\n 25%|██▌ | 5/20 [00:33<01:39, 6.66s/it]\n 30%|███ | 6/20 [00:40<01:33, 6.66s/it]\n 35%|███▌ | 7/20 [00:46<01:26, 6.68s/it]\n 40%|████ | 8/20 [00:53<01:20, 6.67s/it]\n 45%|████▌ | 9/20 [01:00<01:13, 6.67s/it]\n 50%|█████ | 10/20 [01:06<01:06, 6.68s/it]\n 55%|█████▌ | 11/20 [01:13<01:00, 6.67s/it]\n 60%|██████ | 12/20 [01:20<00:53, 6.68s/it]\n 65%|██████▌ | 13/20 [01:26<00:46, 6.69s/it]\n 70%|███████ | 14/20 [01:33<00:40, 6.69s/it]\n 75%|███████▌ | 15/20 [01:40<00:33, 6.69s/it]\n 80%|████████ | 16/20 [01:46<00:26, 6.69s/it]\n 85%|████████▌ | 17/20 [01:53<00:20, 6.69s/it]\n 90%|█████████ | 18/20 [02:00<00:13, 6.69s/it]\n 95%|█████████▌| 19/20 [02:07<00:06, 6.69s/it]\n100%|██████████| 20/20 [02:13<00:00, 6.69s/it]\n100%|██████████| 20/20 [02:13<00:00, 6.69s/it]\nFast Mode Step 1/4: 0%| | 0/7 [00:00<?, ?it/s]\nFast Mode Step 1/4: 14%|█▍ | 1/7 [00:09<00:57, 9.57s/it]\nFast Mode Step 1/4: 29%|██▊ | 2/7 [00:10<00:21, 4.25s/it]\nFast Mode Step 1/4: 43%|████▎ | 3/7 [00:10<00:10, 2.55s/it]\nFast Mode Step 1/4: 57%|█████▋ | 4/7 [00:11<00:05, 1.75s/it]\nFast Mode Step 1/4: 71%|███████▏ | 5/7 [00:11<00:02, 1.30s/it]\nFast Mode Step 1/4: 86%|████████▌ | 6/7 [00:12<00:01, 1.04s/it]\nFast Mode Step 1/4: 100%|██████████| 7/7 [00:12<00:00, 1.07it/s]\nFast Mode Step 1/4: 100%|██████████| 7/7 [00:12<00:00, 1.84s/it]\nFast Mode Step 2/4: 0%| | 0/6 [00:00<?, ?it/s]\nFast Mode Step 2/4: 17%|█▋ | 1/6 [00:00<00:02, 1.91it/s]\nFast Mode Step 2/4: 33%|███▎ | 2/6 [00:01<00:02, 1.92it/s]\nFast Mode Step 2/4: 50%|█████ | 3/6 [00:01<00:01, 1.92it/s]\nFast Mode Step 2/4: 67%|██████▋ | 4/6 [00:02<00:01, 1.39it/s]\nFast Mode Step 2/4: 83%|████████▎ | 5/6 [00:03<00:00, 1.55it/s]\nFast Mode Step 2/4: 100%|██████████| 6/6 [00:03<00:00, 1.76it/s]\nFast Mode Step 2/4: 100%|██████████| 6/6 [00:03<00:00, 1.70it/s]\nFast Mode Step 3/4: 0%| | 0/7 [00:00<?, ?it/s]\nFast Mode Step 3/4: 14%|█▍ | 1/7 [00:00<00:03, 1.92it/s]\nFast Mode Step 3/4: 29%|██▊ | 2/7 [00:01<00:02, 1.94it/s]\nFast Mode Step 3/4: 43%|████▎ | 3/7 [00:01<00:02, 1.95it/s]\nFast Mode Step 3/4: 57%|█████▋ | 4/7 [00:02<00:01, 1.95it/s]\nFast Mode Step 3/4: 71%|███████▏ | 5/7 [00:02<00:01, 1.95it/s]\nFast Mode Step 3/4: 86%|████████▌ | 6/7 [00:03<00:00, 1.93it/s]\nFast Mode Step 3/4: 100%|██████████| 7/7 [00:03<00:00, 2.31it/s]\nFast Mode Step 3/4: 100%|██████████| 7/7 [00:03<00:00, 2.09it/s]\nFast Mode Step 4/4: 0%| | 0/6 [00:00<?, ?it/s]\nFast Mode Step 4/4: 17%|█▋ | 1/6 [00:00<00:02, 1.91it/s]\nFast Mode Step 4/4: 33%|███▎ | 2/6 [00:01<00:02, 1.93it/s]\nFast Mode Step 4/4: 50%|█████ | 3/6 [00:01<00:01, 1.92it/s]\nFast Mode Step 4/4: 67%|██████▋ | 4/6 [00:02<00:01, 1.93it/s]\nFast Mode Step 4/4: 83%|████████▎ | 5/6 [00:02<00:00, 1.92it/s]\nFast Mode Step 4/4: 100%|██████████| 6/6 [00:03<00:00, 2.08it/s]\nFast Mode Step 4/4: 100%|██████████| 6/6 [00:03<00:00, 2.00it/s]\nSaving images: 0%| | 0/30 [00:00<?, ?it/s]\nSaving images: 7%|▋ | 2/30 [00:00<00:02, 12.21it/s]\nSaving images: 13%|█▎ | 4/30 [00:00<00:02, 12.41it/s]\nSaving images: 20%|██ | 6/30 [00:00<00:01, 12.55it/s]\nSaving images: 27%|██▋ | 8/30 [00:00<00:01, 12.62it/s]\nSaving images: 33%|███▎ | 10/30 [00:00<00:01, 12.67it/s]\nSaving images: 40%|████ | 12/30 [00:00<00:01, 12.66it/s]\nSaving images: 47%|████▋ | 14/30 [00:01<00:01, 12.65it/s]\nSaving images: 53%|█████▎ | 16/30 [00:01<00:01, 12.60it/s]\nSaving images: 60%|██████ | 18/30 [00:01<00:00, 12.61it/s]\nSaving images: 67%|██████▋ | 20/30 [00:01<00:00, 12.61it/s]\nSaving images: 73%|███████▎ | 22/30 [00:01<00:00, 12.59it/s]\nSaving images: 80%|████████ | 24/30 [00:01<00:00, 12.57it/s]\nSaving images: 87%|████████▋ | 26/30 [00:02<00:00, 12.56it/s]\nSaving images: 93%|█████████▎| 28/30 [00:02<00:00, 12.56it/s]\nSaving images: 100%|██████████| 30/30 [00:02<00:00, 12.55it/s]\nSaving images: 100%|██████████| 30/30 [00:02<00:00, 12.58it/s]\nSaving video: 0%| | 0/30 [00:00<?, ?it/s]\nSaving video: 3%|▎ | 1/30 [00:00<00:06, 4.52it/s]\nSaving video: 100%|██████████| 30/30 [00:00<00:00, 112.54it/s]\nLoading models from: models/stable_diffusion/aingdiffusion_v12.safetensors\nmodel_name: sd_text_encoder model_class: SDTextEncoder\nmodel_name: sd_unet model_class: SDUNet\nmodel_name: sd_vae_decoder model_class: SDVAEDecoder\nmodel_name: sd_vae_encoder model_class: SDVAEEncoder\nThe following models are loaded: ['sd_text_encoder', 'sd_unet', 'sd_vae_decoder', 'sd_vae_encoder'].\nLoading models from: models/AnimateDiff/mm_sd_v15_v2.ckpt\nmodel_name: sd_motion_modules model_class: SDMotionModel\n The following models are loaded: ['sd_motion_modules'].\nLoading models from: models/ControlNet/control_v11f1e_sd15_tile.pth\nmodel_name: sd_controlnet model_class: SDControlNet\n The following models are loaded: ['sd_controlnet'].\nLoading models from: models/ControlNet/control_v11p_sd15_lineart.pth\nmodel_name: sd_controlnet model_class: SDControlNet\n The following models are loaded: ['sd_controlnet'].\nUsing sd_text_encoder from models/stable_diffusion/aingdiffusion_v12.safetensors.\nUsing sd_unet from models/stable_diffusion/aingdiffusion_v12.safetensors.\nUsing sd_vae_decoder from models/stable_diffusion/aingdiffusion_v12.safetensors.\nUsing sd_vae_encoder from models/stable_diffusion/aingdiffusion_v12.safetensors.\nUsing sd_controlnet from models/ControlNet/control_v11f1e_sd15_tile.pth.\nUsing sd_controlnet from models/ControlNet/control_v11p_sd15_lineart.pth.\nNo sd_ipadapter models available.\nNo sd_ipadapter_clip_image_encoder models available.\nUsing sd_motion_modules from models/AnimateDiff/mm_sd_v15_v2.ckpt.\nTextual inversion verybadimagenegative_v1.3 is enabled.\n 0%| | 0/30 [00:00<?, ?it/s]\n 57%|█████▋ | 17/30 [00:00<00:00, 166.58it/s]\n100%|██████████| 30/30 [00:00<00:00, 180.05it/s]\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:03<01:42, 3.52s/it]\n 10%|█ | 3/30 [00:03<00:25, 1.05it/s]\n 17%|█▋ | 5/30 [00:03<00:12, 2.03it/s]\n 23%|██▎ | 7/30 [00:03<00:07, 3.24it/s]\n 30%|███ | 9/30 [00:03<00:04, 4.67it/s]\n 37%|███▋ | 11/30 [00:04<00:03, 6.20it/s]\n 43%|████▎ | 13/30 [00:04<00:02, 7.82it/s]\n 50%|█████ | 15/30 [00:04<00:01, 9.38it/s]\n 57%|█████▋ | 17/30 [00:04<00:01, 10.84it/s]\n 63%|██████▎ | 19/30 [00:04<00:00, 12.27it/s]\n 70%|███████ | 21/30 [00:04<00:00, 13.54it/s]\n 77%|███████▋ | 23/30 [00:04<00:00, 14.57it/s]\n 83%|████████▎ | 25/30 [00:04<00:00, 15.42it/s]\n 90%|█████████ | 27/30 [00:05<00:00, 15.95it/s]\n 97%|█████████▋| 29/30 [00:05<00:00, 16.42it/s]\n100%|██████████| 30/30 [00:05<00:00, 5.75it/s]\n 0%| | 0/10 [00:00<?, ?it/s]\n 10%|█ | 1/10 [00:21<03:15, 21.68s/it]\n 20%|██ | 2/10 [00:42<02:51, 21.39s/it]\n 30%|███ | 3/10 [01:04<02:29, 21.31s/it]\n 40%|████ | 4/10 [01:25<02:07, 21.27s/it]\n 50%|█████ | 5/10 [01:46<01:46, 21.31s/it]\n 60%|██████ | 6/10 [02:07<01:25, 21.31s/it]\n 70%|███████ | 7/10 [02:29<01:03, 21.30s/it]\n 80%|████████ | 8/10 [02:50<00:42, 21.31s/it]\n 90%|█████████ | 9/10 [03:11<00:21, 21.30s/it]\n100%|██████████| 10/10 [03:33<00:00, 21.30s/it]\n100%|██████████| 10/10 [03:33<00:00, 21.32s/it]\nSaving images: 0%| | 0/30 [00:00<?, ?it/s]\nSaving images: 3%|▎ | 1/30 [00:00<00:13, 2.21it/s]\nSaving images: 7%|▋ | 2/30 [00:00<00:13, 2.12it/s]\nSaving images: 10%|█ | 3/30 [00:01<00:12, 2.17it/s]\nSaving images: 13%|█▎ | 4/30 [00:01<00:11, 2.19it/s]\nSaving images: 17%|█▋ | 5/30 [00:02<00:11, 2.21it/s]\nSaving images: 20%|██ | 6/30 [00:02<00:10, 2.22it/s]\nSaving images: 23%|██▎ | 7/30 [00:03<00:10, 2.23it/s]\nSaving images: 27%|██▋ | 8/30 [00:03<00:09, 2.24it/s]\nSaving images: 30%|███ | 9/30 [00:04<00:09, 2.24it/s]\nSaving images: 33%|███▎ | 10/30 [00:04<00:08, 2.25it/s]\nSaving images: 37%|███▋ | 11/30 [00:04<00:08, 2.25it/s]\nSaving images: 40%|████ | 12/30 [00:05<00:07, 2.26it/s]\nSaving images: 43%|████▎ | 13/30 [00:05<00:07, 2.26it/s]\nSaving images: 47%|████▋ | 14/30 [00:06<00:07, 2.28it/s]\nSaving images: 50%|█████ | 15/30 [00:06<00:06, 2.30it/s]\nSaving images: 53%|█████▎ | 16/30 [00:07<00:06, 2.31it/s]\nSaving images: 57%|█████▋ | 17/30 [00:07<00:05, 2.33it/s]\nSaving images: 60%|██████ | 18/30 [00:07<00:05, 2.35it/s]\nSaving images: 63%|██████▎ | 19/30 [00:08<00:04, 2.36it/s]\nSaving images: 67%|██████▋ | 20/30 [00:08<00:04, 2.37it/s]\nSaving images: 70%|███████ | 21/30 [00:09<00:03, 2.37it/s]\nSaving images: 73%|███████▎ | 22/30 [00:09<00:03, 2.38it/s]\nSaving images: 77%|███████▋ | 23/30 [00:10<00:02, 2.39it/s]\nSaving images: 80%|████████ | 24/30 [00:10<00:02, 2.39it/s]\nSaving images: 83%|████████▎ | 25/30 [00:10<00:02, 2.40it/s]\nSaving images: 87%|████████▋ | 26/30 [00:11<00:01, 2.41it/s]\nSaving images: 90%|█████████ | 27/30 [00:11<00:01, 2.41it/s]\nSaving images: 93%|█████████▎| 28/30 [00:12<00:00, 2.42it/s]\nSaving images: 97%|█████████▋| 29/30 [00:12<00:00, 2.43it/s]\nSaving images: 100%|██████████| 30/30 [00:12<00:00, 2.43it/s]\nSaving images: 100%|██████████| 30/30 [00:12<00:00, 2.32it/s]\nSaving video: 0%| | 0/30 [00:00<?, ?it/s]\nSaving video: 3%|▎ | 1/30 [00:00<00:10, 2.82it/s]\nSaving video: 7%|▋ | 2/30 [00:00<00:06, 4.10it/s]\nSaving video: 27%|██▋ | 8/30 [00:00<00:01, 18.10it/s]\nSaving video: 53%|█████▎ | 16/30 [00:00<00:00, 33.81it/s]\nSaving video: 70%|███████ | 21/30 [00:01<00:00, 18.86it/s]\nSaving video: 83%|████████▎ | 25/30 [00:01<00:00, 17.70it/s]\nSaving video: 93%|█████████▎| 28/30 [00:01<00:00, 14.59it/s]\nSaving video: 100%|██████████| 30/30 [00:01<00:00, 16.47it/s]",
"output": "https://replicate.delivery/pbxt/ziy8T6relvVsS6dhIDzXPeuTncsqeexeTIRfJIz23zv60rx1E/video.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-08-28T05:36:32.602Z",
"started_at": "2024-08-28T05:39:34.641208Z",
"completed_at": "2024-08-28T05:47:00.843157Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/wm5t9ejhb9rgm0chjxy8nfgexw/cancel",
"get": "https://api.replicate.com/v1/predictions/wm5t9ejhb9rgm0chjxy8nfgexw",
"web": "https://replicate.com/p/wm5t9ejhb9rgm0chjxy8nfgexw"
},
"metrics": {
"predict_time": 446.201949052,
"total_time": 628.241157
}
}