diff --git a/ui/easydiffusion/model_manager.py b/ui/easydiffusion/model_manager.py index b569c49d..d75292c9 100644 --- a/ui/easydiffusion/model_manager.py +++ b/ui/easydiffusion/model_manager.py @@ -27,6 +27,7 @@ MODEL_EXTENSIONS = { "realesrgan": [".pth"], "lora": [".ckpt", ".safetensors"], "codeformer": [".pth"], + "embeddings": [".pt", ".bin", ".safetensors"], } DEFAULT_MODELS = { "stable-diffusion": [ @@ -57,6 +58,9 @@ def init(): def load_default_models(context: Context): set_vram_optimizations(context) + config = app.getConfig() + context.embeddings_path = os.path.join(app.MODELS_DIR, "embeddings") + # init default model paths for model_type in MODELS_TO_LOAD_ON_START: context.model_paths[model_type] = resolve_model_to_use(model_type=model_type, fail_if_not_found=False) @@ -317,6 +321,7 @@ def getModels(scan_for_malicious: bool = True): "hypernetwork": [], "lora": [], "codeformer": ["codeformer"], + "embeddings": [], }, } @@ -375,6 +380,7 @@ def getModels(scan_for_malicious: bool = True): listModels(model_type="hypernetwork") listModels(model_type="gfpgan") listModels(model_type="lora") + listModels(model_type="embeddings") if scan_for_malicious and models_scanned > 0: log.info(f"[green]Scanned {models_scanned} models. Nothing infected[/]") diff --git a/ui/index.html b/ui/index.html index cc848d14..47b05240 100644 --- a/ui/index.html +++ b/ui/index.html @@ -244,6 +244,9 @@