diff --git a/invokeai/backend/image_util/invisible_watermark.py b/invokeai/backend/image_util/invisible_watermark.py index b21cc2e124..84342e442f 100644 --- a/invokeai/backend/image_util/invisible_watermark.py +++ b/invokeai/backend/image_util/invisible_watermark.py @@ -10,9 +10,9 @@ from imwatermark import WatermarkEncoder from PIL import Image import invokeai.backend.util.logging as logger -from invokeai.app.services.config import InvokeAIAppConfig +from invokeai.app.services.config.config_default import get_config -config = InvokeAIAppConfig.get_config() +config = get_config() class InvisibleWatermark: @@ -20,14 +20,8 @@ class InvisibleWatermark: Wrapper around InvisibleWatermark module. """ - @classmethod - def invisible_watermark_available(cls) -> bool: - return config.invisible_watermark - @classmethod def add_watermark(cls, image: Image.Image, watermark_text: str) -> Image.Image: - if not cls.invisible_watermark_available(): - return image logger.debug(f'Applying invisible watermark "{watermark_text}"') bgr = cv2.cvtColor(np.array(image.convert("RGB")), cv2.COLOR_RGB2BGR) encoder = WatermarkEncoder()