- Implemented `image_plane.py` to build the Image Plane Geometry Nodes group with customizable parameters for geometry, subdivide, and thickness. - Created `image_plane_validation.py` to validate the functionality of the image plane, ensuring correct geometry generation and material assignment. - Developed `material_layers.py` to construct shader node groups for image materials, including depth and normal handling. - Authored `plane_layouts.py` to define node arrangements for image geometry assets. - Introduced `shadeless.py` to create a shadeless shader node group that displays color without scene lighting while preserving shadows and reflections.
22 lines
1.1 KiB
Markdown
22 lines
1.1 KiB
Markdown
# Upscale
|
||
|
||
`operators/upscale.py` 从当前 Image Empty 生成 2× 结果并替换原图,支持单图、视频与序列帧。
|
||
|
||
```mermaid
|
||
flowchart TD
|
||
A[检查源图长边小于 AI 输入上限] --> B[冻结 Preferences 模型与尺寸设置]
|
||
B --> C[准备媒体输入]
|
||
C --> D[upscale-image 逐帧处理]
|
||
D --> E{所选模型}
|
||
E -- Real-ESRGAN 或 SAFMN --> F[256×256 tile 与边缘上下文执行 4× RGB 推理]
|
||
E -- PiSA-SR --> G[分阶段生成推理,细节强度 0.7]
|
||
F --> H[统一缩放到源图 2×]
|
||
G --> H
|
||
H --> I[原 Alpha 独立 Lanczos 缩放并回填]
|
||
I --> J[写出 upscale 序列并替换 Image]
|
||
```
|
||
|
||
`server/models/upscale.py` 统一处理输入上限、模型分派和最终 RGB/Alpha 尺寸。`onnx_upscale.py` 处理常规 4× 模型,`onnx_pisa_sr.py` 处理 PiSA-SR。多帧与多 tile 只在最后一次运行请求内存收缩。
|
||
|
||
Provider 资源错误会释放当前 Upscale Session,并返回降低输入上限或切换 CPU 的提示。响应通过 `common/image.py` 加载、Pack、保留图像共享与帧设置,并提交 Undo。
|