Skip to content

Commit 7f7d92f

Browse files
committed
Prevent flood the of issues related to Depth Anything
1 parent db01d5c commit 7f7d92f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/common_ui.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,12 @@ def custom_depthmap_change_fn(mode, zero_on, three_on):
419419
def format_exception(e: Exception):
420420
traceback.print_exc()
421421
msg = '<h3>' + 'ERROR: ' + str(e) + '</h3>' + '\n'
422-
if 'out of GPU memory' not in msg:
422+
if 'out of GPU memory' in msg:
423+
pass
424+
elif "torch.hub.load('facebookresearch/dinov2'," in traceback.format_exc():
425+
msg += ('<h4>For some mysterious reason Depth Anything integration works only in standalone mode.'
426+
'This is a known issue. Alternatively, use "--disable-safe-unpickle" command line flag</h4>')
427+
elif 'out of GPU memory' not in msg:
423428
msg += \
424429
'Please report this issue ' \
425430
f'<a href="https://github.com/thygate/{REPOSITORY_NAME}/issues">here</a>. ' \

0 commit comments

Comments
 (0)