Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/depth_anything_3/model/dinov2/vision_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,11 @@ def _get_intermediate_layers_not_chunked(self, x, n=1, export_feat_layers=[], **
out_x = restore_original_order(out_x, b_idx)
output.append((out_x[:, :, 0], out_x))
if i in export_feat_layers:
aux_output.append(x)
# Apply the same restoration logic to auxiliary features to align with input view order
aux_x = x.clone()
if x.shape[1] >= THRESH_FOR_REF_SELECTION and self.alt_start != -1 and 'b_idx' in locals():
aux_x = restore_original_order(aux_x, b_idx)
aux_output.append(aux_x)
return output, aux_output

def process_attention(self, x, block, attn_type="global", pos=None, attn_mask=None):
Expand Down