Download da3_compat.py from junaid-simamdigital/Simam3DZeroGPU: direct link, hf CLI and curl.
- Browser
- Download file 797 Bytes
-
https://huggingface.co/spaces/junaid-simamdigital/Simam3DZeroGPU/resolve/main/da3_compat.py
- Command line
-
hf download hf://spaces/junaid-simamdigital/Simam3DZeroGPU/da3_compat.py
-
curl -L -o da3_compat.py https://huggingface.co/spaces/junaid-simamdigital/Simam3DZeroGPU/resolve/main/da3_compat.py
797 Bytes
| """Dependency-free resolver for known Depth Anything 3 package layouts.""" | |
| from __future__ import annotations | |
| import importlib | |
| def resolve_da3_class(importer=importlib.import_module): | |
| """Return ``(DepthAnything3, module_name)`` or a useful ImportError.""" | |
| errors = [] | |
| for location in ("depth_anything_3.api", "depth_anything_3"): | |
| try: | |
| module = importer(location) | |
| candidate = getattr(module, "DepthAnything3", None) | |
| if candidate is not None: | |
| return candidate, location | |
| errors.append(f"{location}: DepthAnything3 is missing") | |
| except (ImportError, ModuleNotFoundError, AttributeError) as exc: | |
| errors.append(f"{location}: {type(exc).__name__}: {exc}") | |
| raise ImportError("; ".join(errors)) | |