Skip to content

Commit

Permalink
🐛 lazy import (#1874)
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei authored Aug 5, 2023
1 parent 82a6213 commit 56c376a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
from typing import Callable, Tuple

from modules import safe
import mmengine


def torch_extra_handler(module, name):
""" Register HistoryBuffer to whitelist, so that A1111 does not complain.
This is for mmengine used by DW Pose detector.
"""
import mmengine
if module == 'mmengine.logging.history_buffer' and name in ['HistoryBuffer']:
return mmengine.logging.history_buffer.HistoryBuffer
return None
Expand Down

0 comments on commit 56c376a

Please sign in to comment.