Shenrui-Ma/video-regen-recipes / templates/drawing-process/svg-redraw-comparison
svg-redraw-comparison
Unverified用参考图制作高精度 SVG 临摹绘制过程视频,交付纯 SVG 网页、独立 SVG 和原图对照 MP4。禁止 Canvas、位图嵌入与外链,按构图、线稿、固有色、阴影、高光、细节重放;横图上下、竖图左右合成。
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 1.1 KB |
| LICENSES.md | markdown | 998 B |
| README.md | markdown | 2.5 KB |
| SKILL.md | skill md | 3.8 KB |
| assets/manifest.json | config | 320 B |
| assets/reference.png | binary | 2.7 MB |
| examples/demo.html | other | 30.1 KB |
| examples/foundations.svg | other | 597.0 KB |
| examples/preview.mp4 | binary | 3.2 MB |
| examples/redraw.svg | other | 15.6 MB |
| examples/regions.json | config | 6.7 KB |
| examples/validation.json | config | 2.1 KB |
| profile.json | config | 2.2 KB |
| prompts/author-original.prompt.txt | markdown | 1.2 KB |
| prompts/redraw.prompt.txt | markdown | 1.2 KB |
| references/validation.md | markdown | 1.2 KB |
| references/workflow.md | markdown | 5.0 KB |
| scripts/_contours.py | script | 1.3 KB |
| scripts/_regions.py | script | 1.2 KB |
| scripts/_validate_svg.py | script | 1.5 KB |
| scripts/build_demo.py | script | 5.9 KB |
| scripts/clean_png.py | script | 2.1 KB |
| scripts/export_video.cjs | script | 6.1 KB |
| scripts/package_demo.py | script | 3.4 KB |
| scripts/trace_reference.py | script | 5.0 KB |
| sources.md | markdown | 1.7 KB |
| tests/check_player.cjs | script | 3.9 KB |
| tests/test_pipeline.py | script | 4.2 KB |
| web/load-art.js | script | 3.2 KB |
| web/player.css | other | 738 B |
| web/player.js | script | 2.3 KB |
README.md
View on GitHub# 基于大模型的SVG临摹重绘
**给一张图,制作“原图对照+完整 SVG 绘制过程”视频。**
> “按这张图做 SVG 临摹,从构图、线稿、固有色到阴影、高光与细节,最后导出对比视频。”
横图默认**上方原图、下方绘制过程**;竖图默认左右对比。纯 SVG Demo 不嵌入原图,参考面板仅在视频合成时加入。
## 怎么用
让 Agent 读取 [SKILL.md](SKILL.md),提供参考图和视频要求。交付包括 SVG、可播放网页和 MP4,不能只交网页就结束。
**参考图 → SVG 临摹与质量检查 → 纯 SVG 绘制 Demo → 逐帧截图 → 视频合成。**
不使用 Canvas,不需要 ComfyUI 或视频推理模型。网页不包含位图或 Base64 图片,脚本与样式内联;轻量示例单独加载本地 SVG 数据,无需联网。
## 实际示例
- [对比视频](examples/preview.mp4):40秒、24fps,上原图、下绘制过程。
- [轻量 SVG Demo](examples/demo.html):HTML 小于 200 KB;下载后打开,按页面提示选择同目录的 `redraw.svg` 与 `foundations.svg`,即可离线播放、暂停、拖动或查看完成图。
- [独立 SVG](examples/redraw.svg) · [完整提示词](prompts/author-original.prompt.txt) · [操作步骤](references/workflow.md)
轻量化保留全部路径与绘制阶段:完整 SVG 约 16.34 MB,阶段数据 [foundations.svg](examples/foundations.svg) 约 0.61 MB。缩小的是 HTML 并消除重复内嵌,不是降低画面精度。通过本地 HTTP 服务打开可自动加载两个文件。
本例采用连续色域轮廓矢量化及语义分层,静态SVG平均每通道色差为1.30/255,视觉接近原图,但并非严格逐像素1:1。它不是大模型逐笔手工绘画或思考过程录像。
模板实现:**Shenrui Ma(四倍体果蝇)**。灵感来源:[Hope麻匪《再给 GPT6 Astra 一点时间》](https://www.bilibili.com/video/BV1azYW6zEXy)。[来源与验证](sources.md)
## 配套资源
- [shenrui-comfyui-toolkit](https://github.com/Shenrui-Ma/shenrui-comfyui-toolkit):本仓库其它模板使用的固定版本图像与视频工作流;本模板不使用模型推理
- [Shenrui-Ma/video-regen-assets](https://huggingface.co/datasets/Shenrui-Ma/video-regen-assets):公开素材库;本模板的示例素材体积与哈希见 [assets/manifest.json](assets/manifest.json)
第三方组件与素材条款见 [LICENSES.md](LICENSES.md),本次验证范围见 [验证记录](references/validation.md)。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |