Files
AnyImage/README.md
nan 9c896213a5 Enhance device management and model handling in SnapForm
- Updated frame extraction logic to allow for single frame extraction.
- Integrated model readiness checks for BEN2 and DA3 models in relevant operators.
- Added directory name attribute to model specifications for better organization.
- Improved device selection logic for production and debug tasks.
- Refactored preferences to expose device settings and ensure they reflect available hardware.
- Enhanced runtime device detection and management, including support for CUDA and MPS.
- Updated tests to cover new device management features and model directory handling.
- Removed deprecated download model tests to streamline codebase.
2026-08-08 20:16:11 +08:00

65 lines
3.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# SnapForm
SnapForm 是一个 Blender 扩展,可以把一张照片、一段视频或一组序列帧快速变成有真实深度的立体面片。
## 它能做什么
- 一键把 Image Empty 转换为立体面片:让 AI 估算深度,或直接用原图作为深度
- 一键去除图片背景,生成透明前景图
- 支持视频与序列帧输入,逐帧处理,动画也能得到逐帧对应的立体面片
- 全部操作都在右键菜单里完成,不需要写任何代码
## 安装
1. 下载对应系统的扩展压缩包:
- Windows:`SnapForm.v0.10.10.windows-x64.zip`
- macOS(Apple 芯片):`SnapForm.v0.10.10.macos-arm64.zip`
- macOS(Intel):`SnapForm.v0.10.10.macos-x64.zip`
- Linux:`SnapForm.v0.10.10.linux-x64.zip`
2. 打开 Blender,进入 `Preferences > Extensions`
3. 点击 `Install from Disk`,选择下载的压缩包
4. 在扩展偏好设置中确认 Storage Root 与 Device(保持默认即可);Device 默认取本机
最快的 CUDA/MPS,否则 CPU。下载超时会自动重试国内镜像,无需手动配置
5. 打开 3D 视图右侧的 `SnapForm` 面板,点击 `Install Runtime`
DA3、BEN2 源码包和 uv 已内置在扩展里,安装时直接从本地解包,不需要访问 GitHub。首次使用仍会自动
下载运行环境依赖(PyTorch 等)和 AI 模型,请保持网络畅通,下载需要一些时间。
## 快速上手
### 转换为立体面片
1. 在 3D 视图中选中一个 Image Empty(空物体,显示方式为 Image)
2. 右键选择 `Convert to Depth Plane`
3. 在对话框中选择:
- `Depth from`:`Original` 直接用原图,`AI Generated` 让 AI 估算深度
- 需要去背景时勾选 `Remove Background`
- 其余选项保持默认即可
4. 点击确认,稍等片刻就得到带位移的立体面片
### 去除背景
选中 Image Empty 后,右键选择 `Remove Background`,完成后 Empty 会自动换成透明前景图。
### 视频与序列帧
SnapForm 支持视频(mp4、mkv、mov 等)和序列帧,会逐帧处理并生成逐帧对应的立体面片。处理范围默认
跟随 Empty 上设置的 `Image Frames` 与 `Offset`,不需要额外配置。
## 任务结果保存在哪里
任务结果保存在 `~/.snapform/jobs/` 下,每个任务一个文件夹。视频或序列帧生成的面片会引用这些文件夹
里的序列帧,请保留对应文件夹,不要随意删除。
## 常见问题
- 首次使用需要下载模型,如果下载慢或失败,稍后在 `Host > Models` 里重试即可
- 安装 Runtime 时提示下载超时:新版会自动探测并切换到镜像、失败时自动重试一次;如果仍然
超时,在扩展偏好设置的 `PyPI Index` 中填入镜像地址(如清华)后重新安装即可
- 找不到右键入口时,请确认选中了 Empty,且显示方式为 Image
- 动画面片不动:检查 Empty 的 `Image Frames` 是否大于 1,并确认播放场景帧
## 技术文档
面向开发者的技术内容见 [docs/technical.md](docs/technical.md)。