Official model: https://ai.gitcode.com/hf_mirrors/infinity1096/UFM-Base-980, fixed revision 50a7c673f43a68276e91aa980d9b917d7f08142a.
Use fresh sibling directories for an independent installation:
git clone https://gitcode.com/hf_mirrors/infinity1096/UFM-Base-980.git model
git -C model checkout --detach 50a7c673f43a68276e91aa980d9b917d7f08142a
git -C model lfs pull
git clone --recurse-submodules https://github.com/infinity1096/UFM.git third_party/UFM
git -C third_party/UFM checkout --detach ff78d6c3db807c91578acccb58ee67d4394d5e5f
git -C third_party/UFM submodule update --init --recursive
git clone https://github.com/facebookresearch/dinov2.git third_party/dinov2
git -C third_party/dinov2 checkout --detach 7764ea0f912e53c92e82eb78a2a1631e92725fc8
git clone https://gitcode.com/2301_78565107/UFM-Base-980.git repo
cd repo
python3 -m pip install --no-deps --target ../pydeps -r requirements.txtsource /usr/local/Ascend/cann-9.0/set_env.sh
export PYTHONNOUSERSITE=1
export PYTHONPATH="$(pwd)/../pydeps:$(pwd)/../third_party/UFM${PYTHONPATH:+:$PYTHONPATH}"
python3 inference.py --model_path ../model --dinov2_source ../third_party/dinov2 \
--device npu:0 --output_json result.jsonThe entry redirects the upstream torch-hub architecture request to the local DINOv2 source with pretrained=False; it never downloads at runtime. The supplied UFM checkpoint binds the model. To avoid backend-dependent fused-SDPA accumulation in the multi-view refinement stack, the entry uses the equivalent explicit float32 QK matmul, mask, softmax and value-matmul path; HF32 remains disabled.
The NPU path is local-only and fail-closed. Model, both inputs, and complete flow/covisibility outputs must remain on the selected NPU. The entry replaces the relevant DINOv2 and information-sharing nn.GELU modules with the exact-erf primitive 0.5*x*(1+erf(x/sqrt(2))).
The run uses eight 56×56 paired tensors and records all 100,352 native flow, mask and mask-logit values. The result reports the requested/model/input/output devices, NPU name, shapes/count, finite status and exit status.
Server baseline: Python 3.11, PyTorch 2.10.0+cpu, torch_npu 2.10.0, torchvision 0.25.0+cpu, CANN 9.0.0, Ascend 910B3. The checkpoint card states CC BY-NC-SA 4.0 and the UFM code is BSD-3-Clause; users must review both. Synthetic consistency fixtures do not measure optical-flow task quality.
本仓为 2301_76761127 队伍交付件(与备份账号合并提交)。