chenxwh
/
depthcrafter
Generating Consistent Long Depth Sequences for Open-world Videos
Prediction
chenxwh/depthcrafter:1c9bfc62IDw88pztdxmsrgj0cj8nq9yz034gStatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
- video
- datast
- open
- max_res
- 1024
- overlap
- 15
- save_npz
- target_fps
- 15
- window_size
- 110
- guidance_scale
- 1.2
- process_length
- 60
- num_denoising_steps
- 10
{ "video": "https://replicate.delivery/pbxt/LiSKH5N17Dpsep8CEGdvmzx8uxQjvtArSYJXpB6USd5ScQlC/example_01.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": false, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run chenxwh/depthcrafter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "chenxwh/depthcrafter:1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b", { input: { video: "https://replicate.delivery/pbxt/LiSKH5N17Dpsep8CEGdvmzx8uxQjvtArSYJXpB6USd5ScQlC/example_01.mp4", datast: "open", max_res: 1024, overlap: 15, save_npz: false, target_fps: 15, window_size: 110, guidance_scale: 1.2, process_length: 60, num_denoising_steps: 10 } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run chenxwh/depthcrafter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "chenxwh/depthcrafter:1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b", input={ "video": "https://replicate.delivery/pbxt/LiSKH5N17Dpsep8CEGdvmzx8uxQjvtArSYJXpB6USd5ScQlC/example_01.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": False, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run chenxwh/depthcrafter 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": "1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b", "input": { "video": "https://replicate.delivery/pbxt/LiSKH5N17Dpsep8CEGdvmzx8uxQjvtArSYJXpB6USd5ScQlC/example_01.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": false, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run chenxwh/depthcrafter using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/chenxwh/depthcrafter@sha256:1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b \ -i 'video="https://replicate.delivery/pbxt/LiSKH5N17Dpsep8CEGdvmzx8uxQjvtArSYJXpB6USd5ScQlC/example_01.mp4"' \ -i 'datast="open"' \ -i 'max_res=1024' \ -i 'overlap=15' \ -i 'save_npz=false' \ -i 'target_fps=15' \ -i 'window_size=110' \ -i 'guidance_scale=1.2' \ -i 'process_length=60' \ -i 'num_denoising_steps=10'
To learn more, take a look at the Cog documentation.
Pull and run chenxwh/depthcrafter using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/chenxwh/depthcrafter@sha256:1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "video": "https://replicate.delivery/pbxt/LiSKH5N17Dpsep8CEGdvmzx8uxQjvtArSYJXpB6USd5ScQlC/example_01.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": false, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 } }' \ http://localhost:5000/predictions
Output
{ "completed_at": "2024-10-01T00:18:38.636578Z", "created_at": "2024-10-01T00:15:38.406000Z", "data_removed": false, "error": null, "id": "w88pztdxmsrgj0cj8nq9yz034g", "input": { "video": "https://replicate.delivery/pbxt/LiSKH5N17Dpsep8CEGdvmzx8uxQjvtArSYJXpB6USd5ScQlC/example_01.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": false, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 }, "logs": "Using seed: 7396\n==> frames shape: (60, 576, 1024, 3)\nElapsed time for encoding video: 9502.76953125 ms\n 0%| | 0/10 [00:00<?, ?it/s]\n 10%|█ | 1/10 [00:05<00:49, 5.55s/it]\n 20%|██ | 2/10 [00:12<00:50, 6.26s/it]\n 30%|███ | 3/10 [00:19<00:45, 6.49s/it]\n 40%|████ | 4/10 [00:25<00:39, 6.59s/it]\n 50%|█████ | 5/10 [00:32<00:33, 6.66s/it]\n 60%|██████ | 6/10 [00:39<00:26, 6.70s/it]\n 70%|███████ | 7/10 [00:46<00:20, 6.73s/it]\n 80%|████████ | 8/10 [00:52<00:13, 6.75s/it]\n 90%|█████████ | 9/10 [00:59<00:06, 6.77s/it]\n100%|██████████| 10/10 [01:06<00:00, 6.78s/it]\n100%|██████████| 10/10 [01:06<00:00, 6.66s/it]\nElapsed time for denoising video: 68187.703125 ms\nElapsed time for decoding video: 17718.001953125 ms", "metrics": { "predict_time": 97.857017597, "total_time": 180.230578 }, "output": { "npz": null, "depth_video": "https://replicate.delivery/pbxt/GMO4aeo2ykxcVanVyeWMne4EiYiJvok8s1dbZEBuS1E8OeIOB/out.mp4" }, "started_at": "2024-10-01T00:17:00.779561Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/w88pztdxmsrgj0cj8nq9yz034g", "cancel": "https://api.replicate.com/v1/predictions/w88pztdxmsrgj0cj8nq9yz034g/cancel" }, "version": "1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b" }
Generated inUsing seed: 7396 ==> frames shape: (60, 576, 1024, 3) Elapsed time for encoding video: 9502.76953125 ms 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:05<00:49, 5.55s/it] 20%|██ | 2/10 [00:12<00:50, 6.26s/it] 30%|███ | 3/10 [00:19<00:45, 6.49s/it] 40%|████ | 4/10 [00:25<00:39, 6.59s/it] 50%|█████ | 5/10 [00:32<00:33, 6.66s/it] 60%|██████ | 6/10 [00:39<00:26, 6.70s/it] 70%|███████ | 7/10 [00:46<00:20, 6.73s/it] 80%|████████ | 8/10 [00:52<00:13, 6.75s/it] 90%|█████████ | 9/10 [00:59<00:06, 6.77s/it] 100%|██████████| 10/10 [01:06<00:00, 6.78s/it] 100%|██████████| 10/10 [01:06<00:00, 6.66s/it] Elapsed time for denoising video: 68187.703125 ms Elapsed time for decoding video: 17718.001953125 ms
Prediction
chenxwh/depthcrafter:1c9bfc62IDa2exdg3941rgp0cj8p0838863mStatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
- video
- datast
- open
- max_res
- 1024
- overlap
- 15
- save_npz
- target_fps
- 15
- window_size
- 110
- guidance_scale
- 1.2
- process_length
- 60
- num_denoising_steps
- 10
{ "video": "https://replicate.delivery/pbxt/LiSi8OkoMdHvnAJJu2xkrie4iykABkvxUOMXQ7ehixoOPF0e/example_02.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": true, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run chenxwh/depthcrafter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "chenxwh/depthcrafter:1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b", { input: { video: "https://replicate.delivery/pbxt/LiSi8OkoMdHvnAJJu2xkrie4iykABkvxUOMXQ7ehixoOPF0e/example_02.mp4", datast: "open", max_res: 1024, overlap: 15, save_npz: true, target_fps: 15, window_size: 110, guidance_scale: 1.2, process_length: 60, num_denoising_steps: 10 } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run chenxwh/depthcrafter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "chenxwh/depthcrafter:1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b", input={ "video": "https://replicate.delivery/pbxt/LiSi8OkoMdHvnAJJu2xkrie4iykABkvxUOMXQ7ehixoOPF0e/example_02.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": True, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run chenxwh/depthcrafter 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": "1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b", "input": { "video": "https://replicate.delivery/pbxt/LiSi8OkoMdHvnAJJu2xkrie4iykABkvxUOMXQ7ehixoOPF0e/example_02.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": true, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run chenxwh/depthcrafter using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/chenxwh/depthcrafter@sha256:1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b \ -i 'video="https://replicate.delivery/pbxt/LiSi8OkoMdHvnAJJu2xkrie4iykABkvxUOMXQ7ehixoOPF0e/example_02.mp4"' \ -i 'datast="open"' \ -i 'max_res=1024' \ -i 'overlap=15' \ -i 'save_npz=true' \ -i 'target_fps=15' \ -i 'window_size=110' \ -i 'guidance_scale=1.2' \ -i 'process_length=60' \ -i 'num_denoising_steps=10'
To learn more, take a look at the Cog documentation.
Pull and run chenxwh/depthcrafter using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/chenxwh/depthcrafter@sha256:1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "video": "https://replicate.delivery/pbxt/LiSi8OkoMdHvnAJJu2xkrie4iykABkvxUOMXQ7ehixoOPF0e/example_02.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": true, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 } }' \ http://localhost:5000/predictions
Output
npz
out.npzdepth_video
{ "completed_at": "2024-10-01T00:37:53.048401Z", "created_at": "2024-10-01T00:34:56.416000Z", "data_removed": false, "error": null, "id": "a2exdg3941rgp0cj8p0838863m", "input": { "video": "https://replicate.delivery/pbxt/LiSi8OkoMdHvnAJJu2xkrie4iykABkvxUOMXQ7ehixoOPF0e/example_02.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": true, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 }, "logs": "Using seed: 56096\n==> frames shape: (60, 576, 1024, 3)\nElapsed time for encoding video: 8618.146484375 ms\n 0%| | 0/10 [00:00<?, ?it/s]\n 10%|█ | 1/10 [00:05<00:47, 5.26s/it]\n 20%|██ | 2/10 [00:12<00:49, 6.16s/it]\n 30%|███ | 3/10 [00:18<00:45, 6.45s/it]\n 40%|████ | 4/10 [00:25<00:39, 6.59s/it]\n 50%|█████ | 5/10 [00:32<00:33, 6.67s/it]\n 60%|██████ | 6/10 [00:39<00:26, 6.72s/it]\n 70%|███████ | 7/10 [00:46<00:20, 6.76s/it]\n 80%|████████ | 8/10 [00:52<00:13, 6.78s/it]\n 90%|█████████ | 9/10 [00:59<00:06, 6.80s/it]\n100%|██████████| 10/10 [01:06<00:00, 6.81s/it]\n100%|██████████| 10/10 [01:06<00:00, 6.66s/it]\nElapsed time for denoising video: 68239.7265625 ms\nElapsed time for decoding video: 17792.451171875 ms", "metrics": { "predict_time": 103.510892014, "total_time": 176.632401 }, "output": { "npz": "https://replicate.delivery/pbxt/yceY2s25LETaGCXM0LydkrfQsTtNqO7vvXjvT9N7GVEeyeIOB/out.npz", "depth_video": "https://replicate.delivery/pbxt/A2D6foB4Jes7jE3X5tqnWBGTZmt9wp2lVguxf4LGB8sAzeIOB/out.mp4" }, "started_at": "2024-10-01T00:36:09.537509Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/a2exdg3941rgp0cj8p0838863m", "cancel": "https://api.replicate.com/v1/predictions/a2exdg3941rgp0cj8p0838863m/cancel" }, "version": "1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b" }
Generated inUsing seed: 56096 ==> frames shape: (60, 576, 1024, 3) Elapsed time for encoding video: 8618.146484375 ms 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:05<00:47, 5.26s/it] 20%|██ | 2/10 [00:12<00:49, 6.16s/it] 30%|███ | 3/10 [00:18<00:45, 6.45s/it] 40%|████ | 4/10 [00:25<00:39, 6.59s/it] 50%|█████ | 5/10 [00:32<00:33, 6.67s/it] 60%|██████ | 6/10 [00:39<00:26, 6.72s/it] 70%|███████ | 7/10 [00:46<00:20, 6.76s/it] 80%|████████ | 8/10 [00:52<00:13, 6.78s/it] 90%|█████████ | 9/10 [00:59<00:06, 6.80s/it] 100%|██████████| 10/10 [01:06<00:00, 6.81s/it] 100%|██████████| 10/10 [01:06<00:00, 6.66s/it] Elapsed time for denoising video: 68239.7265625 ms Elapsed time for decoding video: 17792.451171875 ms
Prediction
chenxwh/depthcrafter:1c9bfc62IDcdvx0rracsrgg0cj8p59vzaa2mStatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
- video
- datast
- open
- max_res
- 1024
- overlap
- 15
- save_npz
- target_fps
- 15
- window_size
- 110
- guidance_scale
- 1.2
- process_length
- 60
- num_denoising_steps
- 10
{ "video": "https://replicate.delivery/pbxt/LiSsAJ4eJ9yDOGaL4E8cVVHPDb7OYMZjEGHx8a2sinMF56se/example_03.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": false, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run chenxwh/depthcrafter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "chenxwh/depthcrafter:1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b", { input: { video: "https://replicate.delivery/pbxt/LiSsAJ4eJ9yDOGaL4E8cVVHPDb7OYMZjEGHx8a2sinMF56se/example_03.mp4", datast: "open", max_res: 1024, overlap: 15, save_npz: false, target_fps: 15, window_size: 110, guidance_scale: 1.2, process_length: 60, num_denoising_steps: 10 } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run chenxwh/depthcrafter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "chenxwh/depthcrafter:1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b", input={ "video": "https://replicate.delivery/pbxt/LiSsAJ4eJ9yDOGaL4E8cVVHPDb7OYMZjEGHx8a2sinMF56se/example_03.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": False, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run chenxwh/depthcrafter 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": "1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b", "input": { "video": "https://replicate.delivery/pbxt/LiSsAJ4eJ9yDOGaL4E8cVVHPDb7OYMZjEGHx8a2sinMF56se/example_03.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": false, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run chenxwh/depthcrafter using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/chenxwh/depthcrafter@sha256:1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b \ -i 'video="https://replicate.delivery/pbxt/LiSsAJ4eJ9yDOGaL4E8cVVHPDb7OYMZjEGHx8a2sinMF56se/example_03.mp4"' \ -i 'datast="open"' \ -i 'max_res=1024' \ -i 'overlap=15' \ -i 'save_npz=false' \ -i 'target_fps=15' \ -i 'window_size=110' \ -i 'guidance_scale=1.2' \ -i 'process_length=60' \ -i 'num_denoising_steps=10'
To learn more, take a look at the Cog documentation.
Pull and run chenxwh/depthcrafter using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/chenxwh/depthcrafter@sha256:1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "video": "https://replicate.delivery/pbxt/LiSsAJ4eJ9yDOGaL4E8cVVHPDb7OYMZjEGHx8a2sinMF56se/example_03.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": false, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 } }' \ http://localhost:5000/predictions
Output
{ "completed_at": "2024-10-01T00:47:04.552757Z", "created_at": "2024-10-01T00:45:27.526000Z", "data_removed": false, "error": null, "id": "cdvx0rracsrgg0cj8p59vzaa2m", "input": { "video": "https://replicate.delivery/pbxt/LiSsAJ4eJ9yDOGaL4E8cVVHPDb7OYMZjEGHx8a2sinMF56se/example_03.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": false, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 }, "logs": "Using seed: 33937\n==> frames shape: (60, 576, 1024, 3)\nElapsed time for encoding video: 8600.65234375 ms\n 0%| | 0/10 [00:00<?, ?it/s]\n 10%|█ | 1/10 [00:05<00:47, 5.27s/it]\n 20%|██ | 2/10 [00:12<00:49, 6.13s/it]\n 30%|███ | 3/10 [00:18<00:44, 6.41s/it]\n 40%|████ | 4/10 [00:25<00:39, 6.55s/it]\n 50%|█████ | 5/10 [00:32<00:33, 6.63s/it]\n 60%|██████ | 6/10 [00:39<00:26, 6.68s/it]\n 70%|███████ | 7/10 [00:45<00:20, 6.71s/it]\n 80%|████████ | 8/10 [00:52<00:13, 6.73s/it]\n 90%|█████████ | 9/10 [00:59<00:06, 6.74s/it]\n100%|██████████| 10/10 [01:06<00:00, 6.76s/it]\n100%|██████████| 10/10 [01:06<00:00, 6.62s/it]\nElapsed time for denoising video: 67803.9140625 ms\nElapsed time for decoding video: 17710.439453125 ms", "metrics": { "predict_time": 96.927849918, "total_time": 97.026757 }, "output": { "npz": null, "depth_video": "https://replicate.delivery/pbxt/p0jgRReSf8q7fJYodgJpjKrE1hDc6G2VR0fyN4C7vnEdIeRcC/out.mp4" }, "started_at": "2024-10-01T00:45:27.624907Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/cdvx0rracsrgg0cj8p59vzaa2m", "cancel": "https://api.replicate.com/v1/predictions/cdvx0rracsrgg0cj8p59vzaa2m/cancel" }, "version": "1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b" }
Generated inUsing seed: 33937 ==> frames shape: (60, 576, 1024, 3) Elapsed time for encoding video: 8600.65234375 ms 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:05<00:47, 5.27s/it] 20%|██ | 2/10 [00:12<00:49, 6.13s/it] 30%|███ | 3/10 [00:18<00:44, 6.41s/it] 40%|████ | 4/10 [00:25<00:39, 6.55s/it] 50%|█████ | 5/10 [00:32<00:33, 6.63s/it] 60%|██████ | 6/10 [00:39<00:26, 6.68s/it] 70%|███████ | 7/10 [00:45<00:20, 6.71s/it] 80%|████████ | 8/10 [00:52<00:13, 6.73s/it] 90%|█████████ | 9/10 [00:59<00:06, 6.74s/it] 100%|██████████| 10/10 [01:06<00:00, 6.76s/it] 100%|██████████| 10/10 [01:06<00:00, 6.62s/it] Elapsed time for denoising video: 67803.9140625 ms Elapsed time for decoding video: 17710.439453125 ms
Prediction
chenxwh/depthcrafter:1c9bfc62IDvyef7jjdy9rgp0cj8p6vpvypkwStatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
- video
- datast
- open
- max_res
- 1024
- overlap
- 15
- save_npz
- target_fps
- 15
- window_size
- 110
- guidance_scale
- 1.2
- process_length
- 60
- num_denoising_steps
- 10
{ "video": "https://replicate.delivery/pbxt/LiSvWFmeWnKdXfIltqJuth7m2Bn7Q52eBrZnpBHtDoYI6yGY/example_04.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": false, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run chenxwh/depthcrafter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "chenxwh/depthcrafter:1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b", { input: { video: "https://replicate.delivery/pbxt/LiSvWFmeWnKdXfIltqJuth7m2Bn7Q52eBrZnpBHtDoYI6yGY/example_04.mp4", datast: "open", max_res: 1024, overlap: 15, save_npz: false, target_fps: 15, window_size: 110, guidance_scale: 1.2, process_length: 60, num_denoising_steps: 10 } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run chenxwh/depthcrafter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "chenxwh/depthcrafter:1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b", input={ "video": "https://replicate.delivery/pbxt/LiSvWFmeWnKdXfIltqJuth7m2Bn7Q52eBrZnpBHtDoYI6yGY/example_04.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": False, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run chenxwh/depthcrafter 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": "1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b", "input": { "video": "https://replicate.delivery/pbxt/LiSvWFmeWnKdXfIltqJuth7m2Bn7Q52eBrZnpBHtDoYI6yGY/example_04.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": false, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run chenxwh/depthcrafter using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/chenxwh/depthcrafter@sha256:1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b \ -i 'video="https://replicate.delivery/pbxt/LiSvWFmeWnKdXfIltqJuth7m2Bn7Q52eBrZnpBHtDoYI6yGY/example_04.mp4"' \ -i 'datast="open"' \ -i 'max_res=1024' \ -i 'overlap=15' \ -i 'save_npz=false' \ -i 'target_fps=15' \ -i 'window_size=110' \ -i 'guidance_scale=1.2' \ -i 'process_length=60' \ -i 'num_denoising_steps=10'
To learn more, take a look at the Cog documentation.
Pull and run chenxwh/depthcrafter using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/chenxwh/depthcrafter@sha256:1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "video": "https://replicate.delivery/pbxt/LiSvWFmeWnKdXfIltqJuth7m2Bn7Q52eBrZnpBHtDoYI6yGY/example_04.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": false, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 } }' \ http://localhost:5000/predictions
Output
{ "completed_at": "2024-10-01T00:51:41.411747Z", "created_at": "2024-10-01T00:49:01.426000Z", "data_removed": false, "error": null, "id": "vyef7jjdy9rgp0cj8p6vpvypkw", "input": { "video": "https://replicate.delivery/pbxt/LiSvWFmeWnKdXfIltqJuth7m2Bn7Q52eBrZnpBHtDoYI6yGY/example_04.mp4", "datast": "open", "max_res": 1024, "overlap": 15, "save_npz": false, "target_fps": 15, "window_size": 110, "guidance_scale": 1.2, "process_length": 60, "num_denoising_steps": 10 }, "logs": "Using seed: 5814\n==> frames shape: (60, 576, 1024, 3)\nElapsed time for encoding video: 8546.4814453125 ms\n 0%| | 0/10 [00:00<?, ?it/s]\n 10%|█ | 1/10 [00:05<00:49, 5.46s/it]\n 20%|██ | 2/10 [00:12<00:49, 6.20s/it]\n 30%|███ | 3/10 [00:18<00:45, 6.44s/it]\n 40%|████ | 4/10 [00:25<00:39, 6.56s/it]\n 50%|█████ | 5/10 [00:32<00:33, 6.63s/it]\n 60%|██████ | 6/10 [00:39<00:26, 6.67s/it]\n 70%|███████ | 7/10 [00:45<00:20, 6.70s/it]\n 80%|████████ | 8/10 [00:52<00:13, 6.72s/it]\n 90%|█████████ | 9/10 [00:59<00:06, 6.73s/it]\n100%|██████████| 10/10 [01:06<00:00, 6.75s/it]\n100%|██████████| 10/10 [01:06<00:00, 6.62s/it]\nElapsed time for denoising video: 67839.0234375 ms\nElapsed time for decoding video: 17690.04296875 ms", "metrics": { "predict_time": 96.273190146, "total_time": 159.985747 }, "output": { "npz": null, "depth_video": "https://replicate.delivery/pbxt/TIRfWJG6K1xoCi8J2JVj3hpf6NfxasgEc29jwcSqS1U6MfIOB/out.mp4" }, "started_at": "2024-10-01T00:50:05.138556Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/vyef7jjdy9rgp0cj8p6vpvypkw", "cancel": "https://api.replicate.com/v1/predictions/vyef7jjdy9rgp0cj8p6vpvypkw/cancel" }, "version": "1c9bfc62fd0750ddadeccf1af4cdef4d74a8a064debd8152ade87f3c9dc30d2b" }
Generated inUsing seed: 5814 ==> frames shape: (60, 576, 1024, 3) Elapsed time for encoding video: 8546.4814453125 ms 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:05<00:49, 5.46s/it] 20%|██ | 2/10 [00:12<00:49, 6.20s/it] 30%|███ | 3/10 [00:18<00:45, 6.44s/it] 40%|████ | 4/10 [00:25<00:39, 6.56s/it] 50%|█████ | 5/10 [00:32<00:33, 6.63s/it] 60%|██████ | 6/10 [00:39<00:26, 6.67s/it] 70%|███████ | 7/10 [00:45<00:20, 6.70s/it] 80%|████████ | 8/10 [00:52<00:13, 6.72s/it] 90%|█████████ | 9/10 [00:59<00:06, 6.73s/it] 100%|██████████| 10/10 [01:06<00:00, 6.75s/it] 100%|██████████| 10/10 [01:06<00:00, 6.62s/it] Elapsed time for denoising video: 67839.0234375 ms Elapsed time for decoding video: 17690.04296875 ms
Want to make some of these yourself?
Run this model