mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-07-07 01:50:02 +02:00
Upgrade to PyTorch 2.0; Doesn't use a special repo url for pytorch on Linux
This commit is contained in:
@ -1,13 +1,23 @@
|
||||
'''
|
||||
"""
|
||||
This script checks if the given modules exist
|
||||
'''
|
||||
|
||||
E.g. python check_modules.py sdkit==1.0.3 sdkit.models ldm transformers numpy antlr4 gfpgan realesrgan
|
||||
"""
|
||||
|
||||
import sys
|
||||
import pkgutil
|
||||
from importlib.metadata import version
|
||||
|
||||
modules = sys.argv[1:]
|
||||
missing_modules = []
|
||||
for m in modules:
|
||||
if pkgutil.find_loader(m) is None:
|
||||
print('module', m, 'not found')
|
||||
m = m.split("==")
|
||||
module_name = m[0]
|
||||
module_version = m[1] if len(m) > 1 else None
|
||||
is_installed = pkgutil.find_loader(module_name) is not None
|
||||
if not is_installed:
|
||||
print("module", module_name, "not found")
|
||||
exit(1)
|
||||
elif module_version and version(module_name) != module_version:
|
||||
print("module version is different! expected: ", module_version, ", actual: ", version(module_name))
|
||||
exit(1)
|
||||
|
Reference in New Issue
Block a user