From b6752c74e3f1b4ebd5e1bc5f64104bc06a0b3a4d Mon Sep 17 00:00:00 2001 From: lllyasviel Date: Tue, 19 Sep 2023 18:04:36 -0700 Subject: [PATCH] minor fix (#443) * minor fix * minor fix --- fooocus_version.py | 2 +- modules/async_worker.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/fooocus_version.py b/fooocus_version.py index 544e433d..32e8bb9e 100644 --- a/fooocus_version.py +++ b/fooocus_version.py @@ -1 +1 @@ -version = '2.0.68' +version = '2.0.70' diff --git a/modules/async_worker.py b/modules/async_worker.py index 0ff66833..5f315ad4 100644 --- a/modules/async_worker.py +++ b/modules/async_worker.py @@ -55,6 +55,7 @@ def worker(): outpaint_selections = [o.lower() for o in outpaint_selections] loras = [(l1, w1), (l2, w2), (l3, w3), (l4, w4), (l5, w5)] + loras_user_raw_input = copy.deepcopy(loras) raw_style_selections = copy.deepcopy(style_selections) @@ -207,8 +208,6 @@ def worker(): inpaint_mask = core.numpy_to_pytorch(inpaint_worker.current_task.mask_ready[None]) inpaint_mask = torch.nn.functional.avg_pool2d(inpaint_mask, (8, 8)) inpaint_mask = torch.nn.functional.interpolate(inpaint_mask, (H, W), mode='bilinear') - width = W * 8 - height = H * 8 inpaint_worker.current_task.load_latent(latent=inpaint_latent, mask=inpaint_mask) progressbar(0, 'VAE inpaint encoding ...') @@ -223,6 +222,10 @@ def worker(): inpaint_mask = vae_dict['noise_mask'] inpaint_worker.current_task.load_inpaint_guidance(latent=inpaint_latent, mask=inpaint_mask, model_path=inpaint_head_model_path) + B, C, H, W = inpaint_latent.shape + height, width = inpaint_worker.current_task.image_raw.shape[:2] + print(f'Final resolution is {str((height, width))}, latent is {str((H * 8, W * 8))}.') + progressbar(1, 'Initializing ...') raw_prompt = prompt @@ -363,7 +366,7 @@ def worker(): ('Refiner Model', refiner_model_name), ('Seed', task['task_seed']) ] - for n, w in loras: + for n, w in loras_user_raw_input: if n != 'None': d.append((f'LoRA [{n}] weight', w)) log(x, d, single_line_number=3)