ReShot — copy the shot, not the actors. Video → depth map, OpenPose skeleton or canny lines for Seedance 2.0/2.5 reference video, MiniMax H3 Fun ControlNet and Wan VACE. Apache-2.0. Open-sourced by Maosika 猫斯卡 (www.maosika.com), the AI short-drama production system.
Python ai-short-dramaai-videocannycomfyuicontrolnetdepth-anythingdepth-estimationdwposemaosikaminimaxopenposepose-controlnetpose-estimationseedanceshort-dramavideo-generationvideo-to-videowan
rename: video2blockout → depthcat (package, CLI, repo)
wangfeng8d9e22db85fb
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 12a6646..0379b7e 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1,7 +1,7 @@# Changelog## 0.1.0 — 2026-09-11-- First release: `video2blockout in.mp4 -o out.mp4` on Video Depth Anything Small (Apache-2.0).+- First release: `depthcat in.mp4 -o out.mp4` on Video Depth Anything Small (Apache-2.0).- Depth estimated at model resolution, whole-clip normalisation, near = white, x264 CRF 12.- `--target h3` / `wan` presets (fps, size multiple, max length), `--npz`, `--metrics`.- Host-RAM estimate with refusal over 50 % of physical RAM; MPS allocator cap on Apple Silicon.diff --git a/NOTICE b/NOTICEindex 9bd0966..aa16779 100644--- a/NOTICE+++ b/NOTICE@@ -1,10 +1,10 @@-video2blockout+depthcatCopyright 2026 MaoskaThis product includes software developed by Bytedance Ltd. and/or its affiliates:Video Depth Anything (https://github.com/DepthAnything/Video-Depth-Anything),licensed under the Apache License 2.0. It is vendored, unmodified except for-two import lines, under video2blockout/third_party/video_depth_anything/.+two import lines, under depthcat/third_party/video_depth_anything/.Model weights are downloaded at runtime from Hugging Face and carry their own licences:depth-anything/Video-Depth-Anything-Small Apache-2.0 (default; commercial use OK)diff --git a/README.md b/README.mdindex b9ab44c..77e36c2 100644--- a/README.md+++ b/README.md@@ -1,6 +1,6 @@-# video2blockout+# depthcat-[](https://github.com/maosika-ai/video2blockout/actions/workflows/ci.yml) [](LICENSE)+[](https://github.com/maosika-ai/depthcat/actions/workflows/ci.yml) [](LICENSE)Turn any video into a **depth "blockout" video** — the grey near-white / far-blackclip that video-generation ControlNets (MiniMax H3 Fun ControlNet, Wan VACE, …) use to@@ -16,8 +16,8 @@ One command, one model download (Apache-2.0), runs on an 8 GB GPU or an Apple M-## Install```bash-pip install git+https://github.com/maosika-ai/video2blockout-# needs ffmpeg on PATH (or: pip install "video2blockout[ffmpeg]")+pip install git+https://github.com/maosika-ai/depthcat+# needs ffmpeg on PATH (or: pip install "depthcat[ffmpeg]")```Weights (111 MB) download from Hugging Face on first run. In China set@@ -26,13 +26,13 @@ Weights (111 MB) download from Hugging Face on first run. In China set## Use```bash-video2blockout in.mp4 -o blockout.mp4 # keep fps/size, near = white-video2blockout in.mp4 -o blockout.mp4 --target h3 # MiniMax H3: 24 fps, ×32 dims, ≤15 s-video2blockout in.mp4 -o blockout.mp4 --npz depth.npz # also keep raw float depth+depthcat in.mp4 -o blockout.mp4 # keep fps/size, near = white+depthcat in.mp4 -o blockout.mp4 --target h3 # MiniMax H3: 24 fps, ×32 dims, ≤15 s+depthcat in.mp4 -o blockout.mp4 --npz depth.npz # also keep raw float depth``````python-from video2blockout import extract, to_gray, write_gray_video+from depthcat import extract, to_gray, write_gray_videodepths, fps = extract("in.mp4") # float32 [T, H, W], larger = closerwrite_gray_video(to_gray(depths), "out.mp4", fps)```@@ -90,7 +90,7 @@ We crop rather than pad: a padded black border reads to the generator as a far wCode is Apache-2.0. The model code from[DepthAnything/Video-Depth-Anything](https://github.com/DepthAnything/Video-Depth-Anything)-is vendored under `video2blockout/third_party/` (see `NOTICE`).+is vendored under `depthcat/third_party/` (see `NOTICE`).## ComfyUIdiff --git a/README.zh-CN.md b/README.zh-CN.mdindex 8a2ccb5..bfbfced 100644--- a/README.zh-CN.md+++ b/README.zh-CN.md@@ -1,6 +1,6 @@-# video2blockout+# depthcat-[](https://github.com/maosika-ai/video2blockout/actions/workflows/ci.yml) [](LICENSE)+[](https://github.com/maosika-ai/depthcat/actions/workflows/ci.yml) [](LICENSE)把任意视频抽成**深度白模视频**——近白远黑的灰度片,喂给视频生成模型的 ControlNet(MiniMax H3 Fun ControlNet、Wan VACE……),只复制参考片的**走位与镜头**,不带走人脸、@@ -13,8 +13,8 @@## 安装```bash-pip install git+https://github.com/maosika-ai/video2blockout-# 需要 PATH 里有 ffmpeg(或 pip install "video2blockout[ffmpeg]")+pip install git+https://github.com/maosika-ai/depthcat+# 需要 PATH 里有 ffmpeg(或 pip install "depthcat[ffmpeg]")```首次运行自动从 Hugging Face 下载权重。国内请设置 `HF_ENDPOINT=https://hf-mirror.com`。@@ -22,13 +22,13 @@ pip install git+https://github.com/maosika-ai/video2blockout## 用法```bash-video2blockout in.mp4 -o blockout.mp4 # 保持原 fps / 尺寸,近白远黑-video2blockout in.mp4 -o blockout.mp4 --target h3 # MiniMax H3:24fps、边长 32 的倍数、≤15 秒-video2blockout in.mp4 -o blockout.mp4 --npz depth.npz # 同时保存原始浮点深度+depthcat in.mp4 -o blockout.mp4 # 保持原 fps / 尺寸,近白远黑+depthcat in.mp4 -o blockout.mp4 --target h3 # MiniMax H3:24fps、边长 32 的倍数、≤15 秒+depthcat in.mp4 -o blockout.mp4 --npz depth.npz # 同时保存原始浮点深度``````python-from video2blockout import extract, to_gray, write_gray_video+from depthcat import extract, to_gray, write_gray_videodepths, fps = extract("in.mp4") # float32 [T, H, W],越大越近write_gray_video(to_gray(depths), "out.mp4", fps)```@@ -81,7 +81,7 @@ write_gray_video(to_gray(depths), "out.mp4", fps)代码 Apache-2.0。模型代码来自[DepthAnything/Video-Depth-Anything](https://github.com/DepthAnything/Video-Depth-Anything),-vendored 在 `video2blockout/third_party/`(见 `NOTICE`)。+vendored 在 `depthcat/third_party/`(见 `NOTICE`)。## ComfyUIdiff --git a/video2blockout/__init__.py b/depthcat/__init__.pysimilarity index 92%rename from video2blockout/__init__.pyrename to depthcat/__init__.pyindex b57148b..5ae3ebf 100644--- a/video2blockout/__init__.py+++ b/depthcat/__init__.py@@ -1,6 +1,6 @@-"""video2blockout — turn any video into a depth "blockout" video for video-generation control.+"""depthcat — turn any video into a depth "blockout" video for video-generation control.- from video2blockout import extract, to_gray, write_gray_video+ from depthcat import extract, to_gray, write_gray_videodepths, fps = extract("in.mp4") # float32 [T, H, W], larger = closerwrite_gray_video(to_gray(depths), "out.mp4", fps)"""diff --git a/video2blockout/backends/__init__.py b/depthcat/backends/__init__.pysimilarity index 100%rename from video2blockout/backends/__init__.pyrename to depthcat/backends/__init__.pydiff --git a/video2blockout/backends/base.py b/depthcat/backends/base.pysimilarity index 90%rename from video2blockout/backends/base.pyrename to depthcat/backends/base.pyindex f4ba3fb..8144854 100644--- a/video2blockout/backends/base.py+++ b/depthcat/backends/base.py@@ -2,7 +2,7 @@Every backend returns *relative inverse depth* (larger = closer to camera) as float32`[T, H, W]` at the input frame resolution, already temporally aligned across the whole-clip. Normalisation to 8-bit grey happens later in :mod:`video2blockout.postprocess`,+clip. Normalisation to 8-bit grey happens later in :mod:`depthcat.postprocess`,so backends never decide what "white" means."""diff --git a/video2blockout/backends/vda.py b/depthcat/backends/vda.pysimilarity index 100%rename from video2blockout/backends/vda.pyrename to depthcat/backends/vda.pydiff --git a/video2blockout/cli.py b/depthcat/cli.pysimilarity index 95%rename from video2blockout/cli.pyrename to depthcat/cli.pyindex d0a8e0c..11bbca7 100644--- a/video2blockout/cli.py+++ b/depthcat/cli.py@@ -1,8 +1,8 @@-"""`video2blockout` command line.+"""`depthcat` command line.- video2blockout in.mp4 -o out.mp4 # Apache-2.0 Small model, auto device- video2blockout in.mp4 -o out.mp4 --target h3 # 24 fps, ×32 dims, ≤15 s for MiniMax H3- video2blockout in.mp4 -o out.mp4 --npz depth.npz --metrics run.json+ depthcat in.mp4 -o out.mp4 # Apache-2.0 Small model, auto device+ depthcat in.mp4 -o out.mp4 --target h3 # 24 fps, ×32 dims, ≤15 s for MiniMax H3+ depthcat in.mp4 -o out.mp4 --npz depth.npz --metrics run.jsonMemory model: depth is estimated at the model's working resolution (short side 518 px)and only the 8-bit result is upscaled to the output size, frame by frame while@@ -33,7 +33,7 @@ from .targets import TARGETS, fit_dimensionsdef build_parser() -> argparse.ArgumentParser:p = argparse.ArgumentParser(- prog="video2blockout",+ prog="depthcat",description="Video → depth blockout video for video-generation ControlNets.",)p.add_argument("input", help="input video (anything ffmpeg/OpenCV can read)")@@ -108,10 +108,10 @@ def main(argv: list[str] | None = None) -> int:# ── depth ───────────────────────────────────────────────────────────────────────device = pick_device(args.device)- if os.environ.get("VIDEO2BLOCKOUT_FAKE_BACKEND"):+ if os.environ.get("DEPTHCAT_FAKE_BACKEND"):# Dry-run mode for exercising the whole pipeline (I/O, encoding, metrics, remote# runbook) without loading a model. Produces a plausible radial gradient.- _say("model FAKE backend (VIDEO2BLOCKOUT_FAKE_BACKEND set) — no inference")+ _say("model FAKE backend (DEPTHCAT_FAKE_BACKEND set) — no inference")yy, xx = np.mgrid[0:h, 0:w].astype(np.float32)base = 1.0 / (1.0 + ((xx - w / 2) ** 2 + (yy - h / 2) ** 2) / (0.15 * w * h))depths = np.stack([base * (0.8 + 0.2 * i / max(1, t - 1)) for i in range(t)]).astype(np.float32)diff --git a/video2blockout/io.py b/depthcat/io.pysimilarity index 100%rename from video2blockout/io.pyrename to depthcat/io.pydiff --git a/video2blockout/planning.py b/depthcat/planning.pysimilarity index 100%rename from video2blockout/planning.pyrename to depthcat/planning.pydiff --git a/video2blockout/postprocess.py b/depthcat/postprocess.pysimilarity index 100%rename from video2blockout/postprocess.pyrename to depthcat/postprocess.pydiff --git a/video2blockout/targets.py b/depthcat/targets.pysimilarity index 100%rename from video2blockout/targets.pyrename to depthcat/targets.pydiff --git a/video2blockout/third_party/__init__.py b/depthcat/third_party/__init__.pysimilarity index 100%rename from video2blockout/third_party/__init__.pyrename to depthcat/third_party/__init__.pydiff --git a/video2blockout/third_party/video_depth_anything/LICENSE b/depthcat/third_party/video_depth_anything/LICENSEsimilarity index 100%rename from video2blockout/third_party/video_depth_anything/LICENSErename to depthcat/third_party/video_depth_anything/LICENSEdiff --git a/video2blockout/third_party/video_depth_anything/__init__.py b/depthcat/third_party/video_depth_anything/__init__.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/__init__.pyrename to depthcat/third_party/video_depth_anything/__init__.pydiff --git a/video2blockout/third_party/video_depth_anything/dinov2.py b/depthcat/third_party/video_depth_anything/dinov2.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/dinov2.pyrename to depthcat/third_party/video_depth_anything/dinov2.pydiff --git a/video2blockout/third_party/video_depth_anything/dinov2_layers/__init__.py b/depthcat/third_party/video_depth_anything/dinov2_layers/__init__.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/dinov2_layers/__init__.pyrename to depthcat/third_party/video_depth_anything/dinov2_layers/__init__.pydiff --git a/video2blockout/third_party/video_depth_anything/dinov2_layers/attention.py b/depthcat/third_party/video_depth_anything/dinov2_layers/attention.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/dinov2_layers/attention.pyrename to depthcat/third_party/video_depth_anything/dinov2_layers/attention.pydiff --git a/video2blockout/third_party/video_depth_anything/dinov2_layers/block.py b/depthcat/third_party/video_depth_anything/dinov2_layers/block.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/dinov2_layers/block.pyrename to depthcat/third_party/video_depth_anything/dinov2_layers/block.pydiff --git a/video2blockout/third_party/video_depth_anything/dinov2_layers/drop_path.py b/depthcat/third_party/video_depth_anything/dinov2_layers/drop_path.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/dinov2_layers/drop_path.pyrename to depthcat/third_party/video_depth_anything/dinov2_layers/drop_path.pydiff --git a/video2blockout/third_party/video_depth_anything/dinov2_layers/layer_scale.py b/depthcat/third_party/video_depth_anything/dinov2_layers/layer_scale.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/dinov2_layers/layer_scale.pyrename to depthcat/third_party/video_depth_anything/dinov2_layers/layer_scale.pydiff --git a/video2blockout/third_party/video_depth_anything/dinov2_layers/mlp.py b/depthcat/third_party/video_depth_anything/dinov2_layers/mlp.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/dinov2_layers/mlp.pyrename to depthcat/third_party/video_depth_anything/dinov2_layers/mlp.pydiff --git a/video2blockout/third_party/video_depth_anything/dinov2_layers/patch_embed.py b/depthcat/third_party/video_depth_anything/dinov2_layers/patch_embed.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/dinov2_layers/patch_embed.pyrename to depthcat/third_party/video_depth_anything/dinov2_layers/patch_embed.pydiff --git a/video2blockout/third_party/video_depth_anything/dinov2_layers/swiglu_ffn.py b/depthcat/third_party/video_depth_anything/dinov2_layers/swiglu_ffn.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/dinov2_layers/swiglu_ffn.pyrename to depthcat/third_party/video_depth_anything/dinov2_layers/swiglu_ffn.pydiff --git a/video2blockout/third_party/video_depth_anything/dpt.py b/depthcat/third_party/video_depth_anything/dpt.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/dpt.pyrename to depthcat/third_party/video_depth_anything/dpt.pydiff --git a/video2blockout/third_party/video_depth_anything/dpt_temporal.py b/depthcat/third_party/video_depth_anything/dpt_temporal.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/dpt_temporal.pyrename to depthcat/third_party/video_depth_anything/dpt_temporal.pydiff --git a/video2blockout/third_party/video_depth_anything/motion_module/__init__.py b/depthcat/third_party/video_depth_anything/motion_module/__init__.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/motion_module/__init__.pyrename to depthcat/third_party/video_depth_anything/motion_module/__init__.pydiff --git a/video2blockout/third_party/video_depth_anything/motion_module/attention.py b/depthcat/third_party/video_depth_anything/motion_module/attention.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/motion_module/attention.pyrename to depthcat/third_party/video_depth_anything/motion_module/attention.pydiff --git a/video2blockout/third_party/video_depth_anything/motion_module/motion_module.py b/depthcat/third_party/video_depth_anything/motion_module/motion_module.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/motion_module/motion_module.pyrename to depthcat/third_party/video_depth_anything/motion_module/motion_module.pydiff --git a/video2blockout/third_party/video_depth_anything/util/__init__.py b/depthcat/third_party/video_depth_anything/util/__init__.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/util/__init__.pyrename to depthcat/third_party/video_depth_anything/util/__init__.pydiff --git a/video2blockout/third_party/video_depth_anything/util/align.py b/depthcat/third_party/video_depth_anything/util/align.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/util/align.pyrename to depthcat/third_party/video_depth_anything/util/align.pydiff --git a/video2blockout/third_party/video_depth_anything/util/blocks.py b/depthcat/third_party/video_depth_anything/util/blocks.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/util/blocks.pyrename to depthcat/third_party/video_depth_anything/util/blocks.pydiff --git a/video2blockout/third_party/video_depth_anything/util/transform.py b/depthcat/third_party/video_depth_anything/util/transform.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/util/transform.pyrename to depthcat/third_party/video_depth_anything/util/transform.pydiff --git a/video2blockout/third_party/video_depth_anything/video_depth.py b/depthcat/third_party/video_depth_anything/video_depth.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/video_depth.pyrename to depthcat/third_party/video_depth_anything/video_depth.pydiff --git a/video2blockout/third_party/video_depth_anything/video_depth_stream.py b/depthcat/third_party/video_depth_anything/video_depth_stream.pysimilarity index 100%rename from video2blockout/third_party/video_depth_anything/video_depth_stream.pyrename to depthcat/third_party/video_depth_anything/video_depth_stream.pydiff --git a/pyproject.toml b/pyproject.tomlindex 512852d..fd44a08 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -3,7 +3,7 @@ requires = ["setuptools>=68", "wheel"]build-backend = "setuptools.build_meta"[project]-name = "video2blockout"+name = "depthcat"version = "0.1.0"description = "Turn any video into a depth blockout video for video-generation ControlNets (MiniMax H3, Wan VACE, ...)."readme = "README.md"@@ -32,17 +32,17 @@ ffmpeg = ["imageio-ffmpeg>=0.4.7"] # bundled ffmpeg if none on PATHdev = ["pytest>=8", "ruff"][project.scripts]-video2blockout = "video2blockout.cli:main"+depthcat = "depthcat.cli:main"[project.urls]-Homepage = "https://github.com/maosika-ai/video2blockout"+Homepage = "https://github.com/maosika-ai/depthcat"[tool.setuptools.packages.find]-include = ["video2blockout*"]+include = ["depthcat*"][tool.setuptools.package-data]-"video2blockout.third_party.video_depth_anything" = ["LICENSE"]+"depthcat.third_party.video_depth_anything" = ["LICENSE"][tool.ruff]line-length = 110-extend-exclude = ["video2blockout/third_party"]+extend-exclude = ["depthcat/third_party"]diff --git a/tests/test_io.py b/tests/test_io.pyindex a2cab78..32c27c8 100644--- a/tests/test_io.py+++ b/tests/test_io.py@@ -4,11 +4,11 @@ import cv2import numpy as npimport pytest-from video2blockout.io import read_video, write_gray_video+from depthcat.io import read_video, write_gray_videodef _has_ffmpeg():try:- from video2blockout.io import ffmpeg_binary+ from depthcat.io import ffmpeg_binaryreturn bool(ffmpeg_binary())except Exception:@@ -74,7 +74,7 @@ def test_probe_video(tmp_path):for _ in range(5):vw.write(np.zeros((48, 64, 3), np.uint8))vw.release()- from video2blockout.io import probe_video+ from depthcat.io import probe_videow, h, fps, n = probe_video(p)assert (w, h, n) == (64, 48, 5) and abs(fps - 25) < 0.01diff --git a/tests/test_model_smoke.py b/tests/test_model_smoke.pyindex 879ef2f..9b07139 100644--- a/tests/test_model_smoke.py+++ b/tests/test_model_smoke.py@@ -25,7 +25,7 @@ def _synthetic_clip(path, frames=8, w=224, h=160):def test_extract_and_write(tmp_path):- from video2blockout import extract, to_gray, write_gray_video+ from depthcat import extract, to_gray, write_gray_videosrc = tmp_path / "src.mp4"_synthetic_clip(src)@@ -39,7 +39,7 @@ def test_extract_and_write(tmp_path):def test_cli_end_to_end(tmp_path):- from video2blockout.cli import main+ from depthcat.cli import mainsrc = tmp_path / "src.mp4"_synthetic_clip(src)diff --git a/tests/test_planning.py b/tests/test_planning.pyindex a31a678..f78aadc 100644--- a/tests/test_planning.py+++ b/tests/test_planning.py@@ -1,6 +1,6 @@"""Planning is pure arithmetic — test it without a model."""-from video2blockout.planning import (+from depthcat.planning import (HOST_RAM_BUDGET_RATIO,estimate_host_bytes,memory_verdict,diff --git a/tests/test_postprocess.py b/tests/test_postprocess.pyindex 911a823..5d7d662 100644--- a/tests/test_postprocess.py+++ b/tests/test_postprocess.py@@ -3,8 +3,8 @@import numpy as npimport pytest-from video2blockout.postprocess import to_gray-from video2blockout.targets import TARGETS, center_crop, fit_dimensions+from depthcat.postprocess import to_gray+from depthcat.targets import TARGETS, center_crop, fit_dimensionsdef test_global_normalisation_not_per_frame():