Added ability to use civit ai url ar model name and built a model downloader and cache manager for it

This commit is contained in:
Jaret Burkett committed 2023-08-13 13:09:51 -06:00
1 parent 1487d13191
commit 355c80df07
4 files changed
+236 -217

No files matched your search

+6
View File
@@ -5,6 +5,12 @@ CONFIG_ROOT = os.path.join(TOOLKIT_ROOT, 'config')
SD_SCRIPTS_ROOT = os.path.join(TOOLKIT_ROOT, "repositories", "sd-scripts")
REPOS_ROOT = os.path.join(TOOLKIT_ROOT, "repositories")
# check if ENV variable is set
if 'MODELS_PATH' in os.environ:
MODELS_PATH = os.environ['MODELS_PATH']
else:
MODELS_PATH = os.path.join(TOOLKIT_ROOT, "models")
def get_path(path):
# we allow absolute paths, but if it is not absolute, we assume it is relative to the toolkit root