mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-13 21:36:43 +02:00
Merge branch 'beta' of github.com:cmdr2/stable-diffusion-ui into beta
This commit is contained in:
commit
16229caa8e
@ -41,12 +41,15 @@ def load_default_models(context: Context):
|
|||||||
for model_type in MODELS_TO_LOAD_ON_START:
|
for model_type in MODELS_TO_LOAD_ON_START:
|
||||||
context.model_paths[model_type] = resolve_model_to_use(model_type=model_type)
|
context.model_paths[model_type] = resolve_model_to_use(model_type=model_type)
|
||||||
try:
|
try:
|
||||||
load_model(context, model_type)
|
load_model(
|
||||||
|
context,
|
||||||
|
model_type,
|
||||||
|
scan_model = context.model_paths[model_type] != None and not context.model_paths[model_type].endswith('.safetensors')
|
||||||
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.error(f"[red]Error while loading {model_type} model: {context.model_paths[model_type]}[/red]")
|
log.error(f"[red]Error while loading {model_type} model: {context.model_paths[model_type]}[/red]")
|
||||||
log.exception(e)
|
log.exception(e)
|
||||||
|
|
||||||
|
|
||||||
def unload_all(context: Context):
|
def unload_all(context: Context):
|
||||||
for model_type in KNOWN_MODEL_TYPES:
|
for model_type in KNOWN_MODEL_TYPES:
|
||||||
unload_model(context, model_type)
|
unload_model(context, model_type)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user