From ca38e20a81f3f67ad7671f28d963e48881e8425a Mon Sep 17 00:00:00 2001 From: nagadomi Date: Thu, 17 Oct 2024 10:36:41 +0900 Subject: [PATCH] Use truststore to fix SSL error in VMWare and GCP --- iw3/__init__.py | 2 ++ requirements.txt | 1 + waifu2x/__init__.py | 3 +++ 3 files changed, 6 insertions(+) diff --git a/iw3/__init__.py b/iw3/__init__.py index e62d23d2..61fff34d 100644 --- a/iw3/__init__.py +++ b/iw3/__init__.py @@ -1,2 +1,4 @@ import os os.environ['PYTORCH_ENABLE_MPS_FALLBACK'] = '1' +import truststore +truststore.inject_into_ssl() diff --git a/requirements.txt b/requirements.txt index 20e16962..b459b604 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,3 +28,4 @@ timm numba # only for iww3 sbs training av >= 12.2.0 rembg # for --remove-bg +truststore diff --git a/waifu2x/__init__.py b/waifu2x/__init__.py index 737b0ed5..f09ec866 100644 --- a/waifu2x/__init__.py +++ b/waifu2x/__init__.py @@ -1,5 +1,8 @@ import os os.environ['PYTORCH_ENABLE_MPS_FALLBACK'] = '1' +import truststore +truststore.inject_into_ssl() + from .utils import Waifu2x from . import models