Merge pull request #1782 from easydiffusion/beta

Hotfix to pin setuptools to 0.69 - for #1781
This commit is contained in:
cmdr2 2024-05-27 10:38:41 +05:30 committed by GitHub
commit 9b0a654d32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,6 +21,7 @@ os_name = platform.system()
modules_to_check = {
"torch": ("1.11.0", "1.13.1", "2.0.0", "2.0.1"),
"torchvision": ("0.12.0", "0.14.1", "0.15.1", "0.15.2"),
"setuptools": "69.5.1",
"sdkit": "2.0.15",
"stable-diffusion-sdkit": "2.1.5",
"rich": "12.6.0",
@ -110,8 +111,9 @@ def update_modules():
fail(module_name)
else:
if version(module_name) != latest_version:
print(f"WARNING! Tried to install {module_name}=={latest_version}, but the version is still {version(module_name)}!")
print(
f"WARNING! Tried to install {module_name}=={latest_version}, but the version is still {version(module_name)}!"
)
if module_name in modules_to_log:
print(f"{module_name}: {version(module_name)}")
@ -177,8 +179,10 @@ Thanks!"""
)
exit(1)
### Launcher
def get_config():
config_directory = os.path.dirname(__file__) # this will be "scripts"
config_yaml = os.path.join(config_directory, "..", "config.yaml")
@ -193,15 +197,17 @@ def get_config():
if os.path.isfile(config_yaml):
from ruamel.yaml import YAML
yaml = YAML(typ='safe')
with open(config_yaml, 'r') as configfile:
yaml = YAML(typ="safe")
with open(config_yaml, "r") as configfile:
try:
config = yaml.load(configfile)
except Exception as e:
print(e, file=sys.stderr)
elif os.path.isfile(config_json):
import json
with open(config_json, 'r') as configfile:
with open(config_json, "r") as configfile:
try:
config = json.load(configfile)
except Exception as e:
@ -297,7 +303,10 @@ def launch_uvicorn():
setup_amd_environment()
print("\nLaunching uvicorn\n")
os.system(f'python -m uvicorn main:server_api --app-dir "{os.environ["SD_UI_PATH"]}" --port {listen_port} --host {bind_ip} --log-level error')
os.system(
f'python -m uvicorn main:server_api --app-dir "{os.environ["SD_UI_PATH"]}" --port {listen_port} --host {bind_ip} --log-level error'
)
### Start