From 007e1d71486b66795b2ebd66a20fd789e7ff2dab Mon Sep 17 00:00:00 2001 From: zombieyang Date: Fri, 9 Aug 2024 12:22:26 +0800 Subject: [PATCH] prevent potential bug --- install.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/install.py b/install.py index c483997..ebeaf76 100644 --- a/install.py +++ b/install.py @@ -1,6 +1,9 @@ #launch script for stable-diffusion -import launch +try: + import launch -package = 'python-socketio' -if not launch.is_installed(package): - launch.run_pip(f"install {package}", f"sd-ppp requirement: {package}") \ No newline at end of file + package = 'python-socketio' + if not launch.is_installed(package): + launch.run_pip(f"install {package}", f"sd-ppp requirement: {package}") +except ImportError: + pass \ No newline at end of file