mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-02-16 18:32:25 +01:00
Load the models after the device init, to let the UI load before the models finish loading
This commit is contained in:
parent
543f13f9a3
commit
afb88616d8
@ -39,13 +39,11 @@ def init(device):
|
||||
|
||||
device_manager.device_init(thread_data, device)
|
||||
|
||||
init_and_load_default_models()
|
||||
|
||||
def destroy():
|
||||
for model_type in ('stable-diffusion', 'hypernetwork', 'gfpgan', 'realesrgan'):
|
||||
model_loader.unload_model(thread_data, model_type)
|
||||
|
||||
def init_and_load_default_models():
|
||||
def load_default_models():
|
||||
# init default model paths
|
||||
for model_type in model_manager.KNOWN_MODEL_TYPES:
|
||||
thread_data.model_paths[model_type] = model_manager.resolve_model_to_use(model_type=model_type)
|
||||
|
@ -283,6 +283,7 @@ def thread_render(device):
|
||||
'alive': True
|
||||
}
|
||||
|
||||
runtime2.load_default_models()
|
||||
current_state = ServerStates.Online
|
||||
|
||||
while True:
|
||||
|
Loading…
Reference in New Issue
Block a user