Refactor and enhance SnapForm functionality

- Introduced MODEL_NUMBERS for better model indexing.
- Improved enum_items function to cache results and handle download status.
- Updated ActiveJob class to manage temporary input paths and added displacement_via property.
- Changed IMAGE_DEPTH_PROCESS_RES_METHOD from "lower_bound_resize" to "upper_bound_resize".
- Enhanced RunJob operator to include new properties and improved error messages.
- Modified panel layout for better user experience and added runtime installation checks.
- Updated SnapFormSettings to reflect new model properties and defaults.
- Added temporary input path management in runtime.
- Refined worker functions to improve error handling and messaging.
- Expanded tests to cover new functionality and ensure backward compatibility.
- Fixed packaging script to align with versioning conventions.
This commit is contained in:
2026-08-03 13:47:15 +08:00
parent b02372c457
commit a503786c62
14 changed files with 827 additions and 174 deletions

View File

@@ -229,7 +229,7 @@ def wait_for_exported_paths(output_directory, export_format, timeout=30.0):
def reconstruct(args):
write_status(args.status, 0.02, "Starting DA3 runtime")
write_status(args.status, 0.02, "Starting AI runtime")
import torch
from depth_anything_3.api import DepthAnything3
@@ -291,7 +291,7 @@ def reconstruct(args):
)
if not result_paths:
raise RuntimeError(
f"DA3 did not export any {args.export_format} files"
f"No {args.export_format} files were exported"
)
write_status(
args.status,
@@ -373,7 +373,7 @@ def main():
else:
reconstruct(args)
except Exception as error:
write_status(args.status, 1.0, "DA3 task failed", str(error))
write_status(args.status, 1.0, "Task failed", str(error))
raise