added controlnet models to frontend; backend needs to be done

This commit is contained in:
Lincoln Stein
2023-05-30 00:38:37 -04:00
parent dc54cbb1fc
commit c9ee42450e
5 changed files with 240 additions and 164 deletions

View File

@ -12,7 +12,6 @@ print("Loading Python libraries...\n",file=sys.stderr)
import argparse
import io
import os
import re
import shutil
import traceback
import warnings
@ -67,14 +66,9 @@ config = get_invokeai_config()
Model_dir = "models"
Weights_dir = "ldm/stable-diffusion-v1/"
# the initial "configs" dir is now bundled in the `invokeai.configs` package
Dataset_path = Path(configs.__path__[0]) / "INITIAL_MODELS.yaml"
Default_config_file = config.model_conf_path
SD_Configs = config.legacy_conf_path
Datasets = OmegaConf.load(Dataset_path)
# minimum size for the UI
MIN_COLS = 135
MIN_LINES = 45

View File

@ -49,9 +49,9 @@ Config_preamble = """
def default_config_file():
print(config.root_dir)
return config.model_conf_path
def sd_configs():
return config.legacy_conf_path
@ -59,8 +59,7 @@ def initial_models():
global Datasets
if Datasets:
return Datasets
return (Datasets := OmegaConf.load(Dataset_path))
return (Datasets := OmegaConf.load(Dataset_path)['diffusers'])
def install_requested_models(
install_initial_models: List[str] = None,
@ -79,7 +78,7 @@ def install_requested_models(
if not config_file_path.exists():
open(config_file_path, "w")
model_manager = ModelManager(OmegaConf.load(config_file_path), precision=precision)
model_manager = ModelManager(OmegaConf.load(config_file_path)['diffusers'], precision=precision)
if remove_models and len(remove_models) > 0:
print("== DELETING UNCHECKED STARTER MODELS ==")