mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-01-27 16:50:45 +01: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:
|
||||
context.model_paths[model_type] = resolve_model_to_use(model_type=model_type)
|
||||
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:
|
||||
log.error(f"[red]Error while loading {model_type} model: {context.model_paths[model_type]}[/red]")
|
||||
log.exception(e)
|
||||
|
||||
|
||||
def unload_all(context: Context):
|
||||
for model_type in KNOWN_MODEL_TYPES:
|
||||
unload_model(context, model_type)
|
||||
|
Loading…
Reference in New Issue
Block a user