Skip to content

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.

Colab notebook (examples/reshot_colab.ipynb) + python -m reshot; links point at it instead of a paid Space

wangfengfcf11599b100
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2a9631b..6d08e5f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,11 +1,12 @@
# Changelog
## 0.4.1 — 2026-09-14
-- **Hugging Face Space that runs.** [huggingface.co/spaces/netbee/reshot](https://huggingface.co/spaces/netbee/reshot)
- on ZeroGPU: drop a clip up to 15 s, pick the target model, get `depth.mp4` and the prompt line
- back — no install. Source in `demo/space/`.
-- `run(cfg, backend=...)` accepts a pre-built backend, so a resident process (the Space, a server)
- loads the weights once instead of per clip. Without it nothing changes.
+- **Colab notebook.** `examples/reshot_colab.ipynb` — a free GPU, upload a clip, download
+ `depth.mp4`, no install. "Open in Colab" badge in both READMEs.
+- `run(cfg, backend=...)` accepts a pre-built backend, so a resident process (a server, a
+ Space) loads the weights once instead of per clip. Without it nothing changes.
+- `demo/space/`: a ZeroGPU Gradio app, ready for a Hugging Face account with billing enabled
+ (Gradio Spaces are no longer free to host). `demo/landing/`: the static Space.
- Discussions are open; the README has a Community section.
## 0.4.0 — 2026-09-12
diff --git a/README.md b/README.md
index 9e9755b..ce43a33 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
<p align="center"><img src="docs/demo-fight.gif" width="720" alt="a fight scene, its depth map, and three new takes generated from it"></p>
<p align="center"><sub>Top: the reference and its depth map. Bottom: three takes generated from that depth map — two women, one rabbit. Same moves, same camera. <a href="docs/demo-fight.mp4">Full-resolution clip</a>.</sub></p>
-<p align="center"><a href="README.zh-CN.md">中文</a> · <a href="docs/USAGE.md">User guide</a> · <a href="https://github.com/maosika-ai/ComfyUI-ReShot">ComfyUI nodes</a> · <a href="https://huggingface.co/spaces/netbee/reshot">Try it online</a> · <a href="https://github.com/maosika-ai/reshot/discussions">Community</a> · <a href="CHANGELOG.md">Changelog</a></p>
+<p align="center"><a href="README.zh-CN.md">中文</a> · <a href="docs/USAGE.md">User guide</a> · <a href="https://github.com/maosika-ai/ComfyUI-ReShot">ComfyUI nodes</a> · <a href="https://huggingface.co/spaces/maosika/reshot">Hugging Face</a> · <a href="https://github.com/maosika-ai/reshot/discussions">Community</a> · <a href="CHANGELOG.md">Changelog</a></p>
<p align="center">
<a href="https://github.com/maosika-ai/reshot/actions/workflows/ci.yml"><img src="https://github.com/maosika-ai/reshot/actions/workflows/ci.yml/badge.svg" alt="ci"></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue.svg" alt="Apache-2.0"></a>
@@ -37,7 +37,7 @@ The three takes in the demo were made exactly this way. Every file involved is i
### 1. Install
-**No install:** [try it in the browser](https://huggingface.co/spaces/netbee/reshot) on a free GPU — clips up to 15 s, about 30 seconds each.
+**No install:** [open the notebook in Colab](https://colab.research.google.com/github/maosika-ai/reshot/blob/main/examples/reshot_colab.ipynb) — a free GPU, upload a clip, download `depth.mp4`. <a href="https://colab.research.google.com/github/maosika-ai/reshot/blob/main/examples/reshot_colab.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open in Colab"></a>
```bash
pip install reshot # needs ffmpeg on PATH
diff --git a/README.zh-CN.md b/README.zh-CN.md
index f5dfd5a..9b83b4e 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -5,7 +5,7 @@
<p align="center"><img src="docs/demo-fight.gif" width="720" alt="一段武打参考片、它的深度图、用深度图生成的三段新武打片"></p>
<p align="center"><sub>上排:参考片和它的深度图。下排:用这张深度图生成的三段片——两个女人、一只兔子。动作一样,镜头一样。<a href="docs/demo-fight.mp4">高清原片</a>。</sub></p>
-<p align="center"><a href="README.md">English</a> · <a href="docs/USAGE.zh-CN.md">使用手册</a> · <a href="https://github.com/maosika-ai/ComfyUI-ReShot">ComfyUI 节点</a> · <a href="https://huggingface.co/spaces/netbee/reshot">在线试用</a> · <a href="https://github.com/maosika-ai/reshot/discussions">社区</a> · <a href="CHANGELOG.md">更新日志</a></p>
+<p align="center"><a href="README.md">English</a> · <a href="docs/USAGE.zh-CN.md">使用手册</a> · <a href="https://github.com/maosika-ai/ComfyUI-ReShot">ComfyUI 节点</a> · <a href="https://huggingface.co/spaces/maosika/reshot">Hugging Face</a> · <a href="https://github.com/maosika-ai/reshot/discussions">社区</a> · <a href="CHANGELOG.md">更新日志</a></p>
<p align="center">
<a href="https://github.com/maosika-ai/reshot/actions/workflows/ci.yml"><img src="https://github.com/maosika-ai/reshot/actions/workflows/ci.yml/badge.svg" alt="ci"></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue.svg" alt="Apache-2.0"></a>
@@ -37,7 +37,7 @@ ReShot 吃进一个 `.mp4`,吐出一个 `.mp4`。输出是一段**深度图视
### 1. 装
-**不想装:**[在浏览器里直接试](https://huggingface.co/spaces/netbee/reshot),免费 GPU,15 秒以内的片,一段约 30 秒。
+**不想装:**[在 Colab 里打开笔记本](https://colab.research.google.com/github/maosika-ai/reshot/blob/main/examples/reshot_colab.ipynb),免费 GPU,传一段视频、下载 depth.mp4。<a href="https://colab.research.google.com/github/maosika-ai/reshot/blob/main/examples/reshot_colab.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open in Colab"></a>
```bash
pip install reshot # 需要 PATH 里有 ffmpeg
diff --git a/demo/landing/README.md b/demo/landing/README.md
index 3636b7c..6fb8f04 100644
--- a/demo/landing/README.md
+++ b/demo/landing/README.md
@@ -18,7 +18,7 @@ its faces, wardrobe or style.
- Presets for Seedance 2.0/2.5 reference video, MiniMax H3 Fun ControlNet, Wan VACE.
- Code, CLI, docs: https://github.com/maosika-ai/reshot (Apache-2.0)
- Model: Video Depth Anything Small (Apache-2.0, ByteDance, CVPR 2025)
-- Try it in the browser: https://huggingface.co/spaces/netbee/reshot (free GPU). Locally: `pip install reshot`.
+- Try it without installing: https://colab.research.google.com/github/maosika-ai/reshot/blob/main/examples/reshot_colab.ipynb (free GPU). Locally: `pip install reshot`.
ReShot is open-sourced by [Maosika 猫斯卡](https://www.maosika.com) — a professional AI video
production system for AI short drama, AI short video and AI manhua drama: from a one-line idea to
diff --git a/demo/landing/index.html b/demo/landing/index.html
index 0320ca1..8fcfed6 100644
--- a/demo/landing/index.html
+++ b/demo/landing/index.html
@@ -36,9 +36,9 @@
<p class="cap">top: the reference and its depth map · bottom: three takes generated from that depth map — two women, one rabbit; same moves, same camera<br><span class="zh">上排:参考片和它的深度图 · 下排:用这张深度图生成的三段片——两个女人、一只兔子;动作一样,镜头一样</span></p>
<div class="row">
- <a class="btn" href="https://huggingface.co/spaces/netbee/reshot">Try it in your browser — free GPU, no install · 在线试用,免安装</a>
+ <a class="btn" href="https://colab.research.google.com/github/maosika-ai/reshot/blob/main/examples/reshot_colab.ipynb">Try it in Colab — free GPU, no install · 在 Colab 里试,免安装</a>
</div>
-<p class="cap">Drop a clip up to 15 s, get <code>depth.mp4</code> and the prompt line back in about 30 seconds.<br><span class="zh">拖一段 15 秒以内的视频进去,30 秒左右拿到 depth.mp4 和提示词。</span></p>
+<p class="cap">Open the notebook, upload a clip, run, download <code>depth.mp4</code> with the prompt line for your video model.<br><span class="zh">打开笔记本,上传视频,运行,下载 depth.mp4 和给视频模型的提示词。</span></p>
<pre><code>pip install reshot
reshot # opens a page in your browser — drop the clip in, click, download
@@ -107,5 +107,5 @@ reshot reference.mp4 -o depth.mp4 --target seedance # or the command line</c
<p><a class="btn" href="https://www.maosika.com">Make AI short drama at maosika.com · 去猫斯卡做 AI 短剧</a></p>
</div>
-<footer>Apache-2.0 · model code vendored from <a href="https://github.com/DepthAnything/Video-Depth-Anything">Video Depth Anything</a> (CVPR 2025) · built at <a href="https://www.maosika.com">Maosika 猫斯卡 · www.maosika.com</a>. Try it at <a href="https://huggingface.co/spaces/netbee/reshot">spaces/netbee/reshot</a>, or run it locally with <code>pip install reshot</code>.</footer>
+<footer>Apache-2.0 · model code vendored from <a href="https://github.com/DepthAnything/Video-Depth-Anything">Video Depth Anything</a> (CVPR 2025) · built at <a href="https://www.maosika.com">Maosika 猫斯卡 · www.maosika.com</a>. Try it in <a href="https://colab.research.google.com/github/maosika-ai/reshot/blob/main/examples/reshot_colab.ipynb">Colab</a>, or run it locally with <code>pip install reshot</code>.</footer>
</main></body></html>
diff --git a/examples/reshot_colab.ipynb b/examples/reshot_colab.ipynb
new file mode 100644
index 0000000..a4f2407
--- /dev/null
+++ b/examples/reshot_colab.ipynb
@@ -0,0 +1,215 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# ReShot — copy the shot, not the actors\n",
+ "\n",
+ "Turn a reference video into a **depth map video** on a free Colab GPU, then give that grey clip to\n",
+ "Seedance or MiniMax H3 as the reference: it repeats the choreography and the camera moves with\n",
+ "your own characters in it.\n",
+ "\n",
+ "**Before you run:** menu *Runtime → Change runtime type → T4 GPU*. Then *Runtime → Run all*.\n",
+ "Four steps: check the GPU · install · pick a clip · run and download.\n",
+ "\n",
+ "Code and docs: [github.com/maosika-ai/reshot](https://github.com/maosika-ai/reshot) · Apache-2.0 ·\n",
+ "made at [Maosika 猫斯卡](https://www.maosika.com), the AI short-drama production system.\n",
+ "\n",
+ "在免费的 Colab GPU 上把参考视频变成深度图视频,再交给 Seedance / MiniMax H3 当参考。\n",
+ "先在菜单 *代码执行程序 → 更改运行时类型* 选 **T4 GPU**,然后 *全部运行*。"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## 1 · GPU"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "cellView": "form"
+ },
+ "execution_count": null,
+ "outputs": [],
+ "source": [
+ "#@title Check that this runtime has a GPU\n",
+ "import torch, subprocess\n",
+ "print(subprocess.run([\"nvidia-smi\", \"-L\"], capture_output=True, text=True).stdout.strip() or \"no nvidia-smi\")\n",
+ "print(\"torch\", torch.__version__, \"· CUDA available:\", torch.cuda.is_available())\n",
+ "assert torch.cuda.is_available(), \"No GPU. Runtime → Change runtime type → T4 GPU, then run again.\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## 2 · Install"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "cellView": "form"
+ },
+ "execution_count": null,
+ "outputs": [],
+ "source": [
+ "#@title Install ReShot (about a minute; Colab already has a CUDA build of PyTorch)\n",
+ "in_china = False #@param {type:\"boolean\"}\n",
+ "import os\n",
+ "if in_china:\n",
+ " os.environ[\"HF_ENDPOINT\"] = \"https://hf-mirror.com\" # the 111 MB weights come from Hugging Face\n",
+ "%pip install -q \"reshot[ffmpeg]\"\n",
+ "import reshot\n",
+ "print(\"reshot\", reshot.__version__)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## 3 · Pick a clip"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "cellView": "form"
+ },
+ "execution_count": null,
+ "outputs": [],
+ "source": [
+ "#@title Use the demo clip, or upload your own (mp4 / mov / webm, best ≤ 15 s)\n",
+ "source = \"demo clip (12 s corridor fight)\" #@param [\"demo clip (12 s corridor fight)\", \"upload my own\"]\n",
+ "import urllib.request, os\n",
+ "if source.startswith(\"upload\"):\n",
+ " from google.colab import files\n",
+ " up = files.upload()\n",
+ " assert up, \"nothing uploaded\"\n",
+ " INPUT = next(iter(up))\n",
+ "else:\n",
+ " INPUT = \"city_night.mp4\"\n",
+ " if not os.path.exists(INPUT):\n",
+ " urllib.request.urlretrieve(\"https://github.com/maosika-ai/reshot/raw/main/examples/city_night.mp4\", INPUT)\n",
+ "import cv2\n",
+ "cap = cv2.VideoCapture(INPUT); n, fps = cap.get(cv2.CAP_PROP_FRAME_COUNT), cap.get(cv2.CAP_PROP_FPS)\n",
+ "print(f\"{INPUT}: {int(cap.get(3))}×{int(cap.get(4))} · {fps:.0f} fps · {n/fps:.1f} s\"); cap.release()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## 4 · Make the depth map"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "cellView": "form"
+ },
+ "execution_count": null,
+ "outputs": [],
+ "source": [
+ "#@title Run (a 12 s clip takes ~40 s on a T4 at `fast`, ~2 min at `full`)\n",
+ "target = \"seedance\" #@param [\"seedance\", \"h3\", \"wan\", \"none\"]\n",
+ "quality = \"fast\" #@param [\"fast\", \"full\"]\n",
+ "import json, subprocess, sys, time\n",
+ "t0 = time.time()\n",
+ "r = subprocess.run([sys.executable, \"-m\", \"reshot\", INPUT, \"-o\", \"depth.mp4\",\n",
+ " \"--target\", target, \"--quality\", quality, \"--metrics\", \"metrics.json\"],\n",
+ " capture_output=True, text=True)\n",
+ "print(r.stderr[-3000:])\n",
+ "assert r.returncode == 0 and os.path.exists(\"depth.mp4\"), \"run failed — read the message above\"\n",
+ "m = json.load(open(\"metrics.json\"))\n",
+ "print(f\"done in {time.time()-t0:.0f} s · {m['frames']} frames @ {m['fps']} fps · \"\n",
+ " f\"{m['output_size'][0]}×{m['output_size'][1]} · {m['ms_per_frame']:.0f} ms/frame on {m['device']}\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "cellView": "form"
+ },
+ "execution_count": null,
+ "outputs": [],
+ "source": [
+ "#@title Look at it: reference and depth side by side, then the two clips\n",
+ "import base64, cv2\n",
+ "from IPython.display import HTML, display\n",
+ "def frame(path, idx=0):\n",
+ " cap = cv2.VideoCapture(path); cap.set(cv2.CAP_PROP_POS_FRAMES, idx); ok, bgr = cap.read(); cap.release()\n",
+ " h = 360; bgr = cv2.resize(bgr, (int(bgr.shape[1] * h / bgr.shape[0]), h))\n",
+ " return base64.b64encode(cv2.imencode(\".jpg\", bgr)[1]).decode()\n",
+ "def video(path):\n",
+ " return f'<video controls loop muted autoplay width=\"360\" src=\"data:video/mp4;base64,{base64.b64encode(open(path,\"rb\").read()).decode()}\"></video>'\n",
+ "display(HTML(f'<div style=\"display:flex;gap:12px\"><img src=\"data:image/jpeg;base64,{frame(INPUT)}\"><img src=\"data:image/jpeg;base64,{frame(\"depth.mp4\")}\"></div>'\n",
+ " f'<div style=\"display:flex;gap:12px;margin-top:12px\">{video(INPUT)}{video(\"depth.mp4\")}</div>'))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## 5 · Download, and what to do with it"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "cellView": "form"
+ },
+ "execution_count": null,
+ "outputs": [],
+ "source": [
+ "#@title Download depth.mp4 and print the prompt line for your video model\n",
+ "from google.colab import files\n",
+ "NEXT = {\n",
+ " \"seedance\": (\"Upload depth.mp4 to Seedance 2.0 / 2.5 as a reference video and start the prompt with:\",\n",
+ " \"参考@视频1的动作与运镜,顺序与视频保持一致。\\n(then describe your people, wardrobe, set and look)\"),\n",
+ " \"h3\": (\"In MiniMax H3 attach depth.mp4 as <Video 1> (a character sheet as <Picture 1>); define it and say the grey look is not to be copied:\",\n",
+ " \"<Subject 3> is the choreography and camera movement shown in <Video 1>, a grey depth map in which near objects are white and far objects are black: (one sentence on what happens in the clip)\\n\"\n",
+ " \"<Subject 3>: attribute_transfer - every action, position, timing and camera move of <Video 1> is transferred onto <Subject 1>; its grey depth look is not transferred.\"),\n",
+ " \"wan\": (\"Connect depth.mp4 to WanVaceToVideo → control_video in ComfyUI.\", \"\"),\n",
+ " \"none\": (\"Hand depth.mp4 to any model that reads a depth video.\", \"\"),\n",
+ "}\n",
+ "how, prompt = NEXT[target]\n",
+ "print(how); print(); print(prompt)\n",
+ "files.download(\"depth.mp4\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "---\n",
+ "Made something? Post the reference, the depth map, the take and your prompt line in\n",
+ "[Show and tell](https://github.com/maosika-ai/reshot/discussions/2). Something broke?\n",
+ "[Open an issue](https://github.com/maosika-ai/reshot/issues/new/choose) with the message from step 4.\n",
+ "\n",
+ "For whole folders, longer clips and scripting, run it on your own machine: `pip install reshot`,\n",
+ "then `reshot` for the local web page or `reshot clip.mp4 -o depth.mp4 --target seedance`."
+ ]
+ }
+ ],
+ "metadata": {
+ "accelerator": "GPU",
+ "colab": {
+ "name": "reshot_colab.ipynb",
+ "provenance": [],
+ "gpuType": "T4"
+ },
+ "kernelspec": {
+ "display_name": "Python 3",
+ "name": "python3"
+ },
+ "language_info": {
+ "name": "python"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
\ No newline at end of file
diff --git a/reshot/__main__.py b/reshot/__main__.py
new file mode 100644
index 0000000..9cf41f3
--- /dev/null
+++ b/reshot/__main__.py
@@ -0,0 +1,6 @@
+"""`python -m reshot …` — the same CLI as the `reshot` command, for environments where the
+console script is not on PATH (a notebook, a venv that was not activated)."""
+
+from .cli import main
+
+raise SystemExit(main())