From e5905a8d6683b77900059a0ce3a1f225d7bbb4af Mon Sep 17 00:00:00 2001 From: Kaiyuan Hu Date: Tue, 3 Jan 2023 11:38:32 +0800 Subject: [PATCH] Fix load trainer issue Signed-off-by: Kaiyuan Hu --- isc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/isc.py b/isc.py index 171cdd2..f70f5c4 100644 --- a/isc.py +++ b/isc.py @@ -14,6 +14,7 @@ import logging import os +import warnings from typing import Union, List from pathlib import Path @@ -22,6 +23,7 @@ from towhee.operator.base import NNOperator, OperatorFlag from towhee.types.arg import arg, to_image_color from towhee import register from towhee.models import isc +import sys # from towhee.dc2 import accelerate import torch @@ -30,10 +32,9 @@ from torchvision import transforms from PIL import Image as PILImage import timm -import warnings - warnings.filterwarnings('ignore') log = logging.getLogger('isc_op') +_ = sys.modules[__name__] # @accelerate