Skip to content

Commit ee54b55

Browse files
committed
Fix script mode
Fixes #443
1 parent 6e29eae commit ee54b55

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

scripts/depthmap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def run(self, p, *inputs):
5555
# TODO: could reuse
5656
if hasattr(processed, 'all_prompts') and shared.opts.enable_pnginfo:
5757
info = create_infotext(
58-
processed, processed.all_prompts, processed.all_seeds, processed.all_subseeds, "", 0, input_i)
58+
p, processed.all_prompts, processed.all_seeds, processed.all_subseeds, "", 0, input_i)
5959
else:
6060
info = None
6161

src/common_ui.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,9 @@ def format_exception(e: Exception):
437437
elif "torch.hub.load('facebookresearch/dinov2'," in traceback.format_exc():
438438
msg += ('<h4>To use Depth Anything integration in WebUI mode, please add "--disable-safe-unpickle" to the command line flags. '
439439
'Alternatively, use Standalone mode. This is a known issue.')
440+
elif "Error(s) in loading state_dict " in traceback.format_exc():
441+
msg += ('<h4>There was issue during loading the model.'
442+
'Please add "--disable-safe-unpickle" to the command line flags. This is a known issue.')
440443
elif 'out of GPU memory' not in msg:
441444
msg += \
442445
'Please report this issue ' \

0 commit comments

Comments
 (0)