forked from extern/easydiffusion
Log errors during module and model initialization
This commit is contained in:
parent
7c75a61700
commit
35c75115de
@ -6,6 +6,7 @@ from sdkit.utils import hash_file_quick
|
|||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
from glob import glob
|
from glob import glob
|
||||||
|
import traceback
|
||||||
|
|
||||||
models_base_dir = os.path.abspath(os.path.join("..", "models"))
|
models_base_dir = os.path.abspath(os.path.join("..", "models"))
|
||||||
|
|
||||||
@ -55,6 +56,7 @@ def init():
|
|||||||
try:
|
try:
|
||||||
download_if_necessary(model_type, model["file_name"], model["model_id"])
|
download_if_necessary(model_type, model["file_name"], model["model_id"])
|
||||||
except:
|
except:
|
||||||
|
traceback.print_exc()
|
||||||
fail(model_type)
|
fail(model_type)
|
||||||
|
|
||||||
print(model_type, "model(s) found.")
|
print(model_type, "model(s) found.")
|
||||||
|
@ -11,6 +11,7 @@ a custom index URL depending on the platform.
|
|||||||
import os
|
import os
|
||||||
from importlib.metadata import version as pkg_version
|
from importlib.metadata import version as pkg_version
|
||||||
import platform
|
import platform
|
||||||
|
import traceback
|
||||||
|
|
||||||
os_name = platform.system()
|
os_name = platform.system()
|
||||||
|
|
||||||
@ -58,6 +59,7 @@ def init():
|
|||||||
try:
|
try:
|
||||||
install(module_name, latest_version)
|
install(module_name, latest_version)
|
||||||
except:
|
except:
|
||||||
|
traceback.print_exc()
|
||||||
fail(module_name)
|
fail(module_name)
|
||||||
|
|
||||||
print(f"{module_name}: {version(module_name)}")
|
print(f"{module_name}: {version(module_name)}")
|
||||||
|
Loading…
Reference in New Issue
Block a user