From 0a24a8a67adc2ce924b5b19ce31285df7507b33b Mon Sep 17 00:00:00 2001 From: cantor-set Date: Sun, 3 Mar 2024 19:25:07 -0500 Subject: [PATCH] Code fixes --- modules/async_worker.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/async_worker.py b/modules/async_worker.py index 2ff1b71c..4047a86e 100644 --- a/modules/async_worker.py +++ b/modules/async_worker.py @@ -63,8 +63,6 @@ def worker(): pid = os.getpid() print(f'Started worker with PID {pid}') - MAX_LORAS = 5 - try: async_gradio_app = shared.gradio_root flag = f'''App started successful. Use the app with {str(async_gradio_app.local_url)} or {str(async_gradio_app.server_name)}:{str(async_gradio_app.server_port)}''' @@ -165,8 +163,6 @@ def worker(): refiner_model_name = args.pop() refiner_switch = args.pop() - loras = [[str(args.pop()), float(args.pop())] for _ in range(MAX_LORAS)] - loras = apply_enabled_loras([[bool(args.pop()), str(args.pop()), float(args.pop()), ] for _ in range(modules.config.default_max_lora_number)]) input_image_checkbox = args.pop() @@ -430,7 +426,7 @@ def worker(): progressbar(async_task, 3, 'Loading models ...') # Parse lora references from prompt - loras = parse_lora_references_from_prompt(prompt, loras, loras_limit=MAX_LORAS) + loras = parse_lora_references_from_prompt(prompt, loras, loras_limit=modules.config.default_max_lora_number) pipeline.refresh_everything(refiner_model_name=refiner_model_name, base_model_name=base_model_name, loras=loras, base_model_additional_loras=base_model_additional_loras,