From fb088bfb6409efa1562f811539998920ec0c0621 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 11 Mar 2023 11:13:21 -0500 Subject: [PATCH 1/3] all usage of newer pytorch_lighning --- requirements_versions.txt | 2 +- webui.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/requirements_versions.txt b/requirements_versions.txt index 41e0ccc5..b98081bf 100644 --- a/requirements_versions.txt +++ b/requirements_versions.txt @@ -9,7 +9,7 @@ Pillow==9.4.0 realesrgan==0.3.0 torch omegaconf==2.2.3 -pytorch_lightning==1.7.6 +pytorch_lightning==1.9.4 scikit-image==0.19.2 fonts font-roboto diff --git a/webui.py b/webui.py index 32561877..9baa7da5 100644 --- a/webui.py +++ b/webui.py @@ -17,6 +17,8 @@ from modules import paths, timer, import_hook, errors startup_timer = timer.Timer() import torch +import pytorch_lightning # pytorch_lightning should be imported after torch, but it re-enables warnings on import so import once to disable them +warnings.filterwarnings(action="ignore", category=DeprecationWarning) startup_timer.record("import torch") import gradio From fc4d593b4e069329a1014ddc3ddb9bb4757ab7d0 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 12 Mar 2023 08:51:12 -0400 Subject: [PATCH 2/3] fix import --- webui.py | 1 + 1 file changed, 1 insertion(+) diff --git a/webui.py b/webui.py index 9baa7da5..36e18d37 100644 --- a/webui.py +++ b/webui.py @@ -4,6 +4,7 @@ import time import importlib import signal import re +import warnings from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from fastapi.middleware.gzip import GZipMiddleware From f2ed6295b9041e217c50ad57ca2f609aa6f1bac9 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 14 Mar 2023 07:46:09 -0400 Subject: [PATCH 3/3] make it module specific --- webui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webui.py b/webui.py index 36e18d37..d7bbc7b7 100644 --- a/webui.py +++ b/webui.py @@ -19,7 +19,7 @@ startup_timer = timer.Timer() import torch import pytorch_lightning # pytorch_lightning should be imported after torch, but it re-enables warnings on import so import once to disable them -warnings.filterwarnings(action="ignore", category=DeprecationWarning) +warnings.filterwarnings(action="ignore", category=DeprecationWarning, module="pytorch_lightning") startup_timer.record("import torch") import gradio