From 00270604ef0b6936f78c19a9e8b509b39095e4fd Mon Sep 17 00:00:00 2001 From: Laurent Date: Wed, 14 Feb 2024 16:32:34 +0000 Subject: [PATCH] fix conversion_script bug + rename control_lora e2e test --- scripts/conversion/convert_fooocus_control_lora.py | 2 +- tests/e2e/test_diffusion.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/conversion/convert_fooocus_control_lora.py b/scripts/conversion/convert_fooocus_control_lora.py index 0d59829..ceec2d2 100644 --- a/scripts/conversion/convert_fooocus_control_lora.py +++ b/scripts/conversion/convert_fooocus_control_lora.py @@ -211,7 +211,7 @@ def convert_lora_layers( f"{path}.down": lora_layer.down.weight, f"{path}.up": lora_layer.up.weight, } - state_dict = {simplify_key(key, "ControlLora"): param for key, param in state_dict.items()} + state_dict = {simplify_key(key, "ControlLora."): param for key, param in state_dict.items()} refiners_state_dict.update(state_dict) diff --git a/tests/e2e/test_diffusion.py b/tests/e2e/test_diffusion.py index 91effd5..4b1bc61 100644 --- a/tests/e2e/test_diffusion.py +++ b/tests/e2e/test_diffusion.py @@ -257,7 +257,7 @@ def controllora_sdxl_config( config_name: ControlLoraResolvedConfig( scale=config.scale, condition_image=Image.open(ref_path / config.condition_path).convert("RGB"), - weights_path=test_weights_path / "control_lora" / config.weights_path, + weights_path=test_weights_path / "control-loras" / config.weights_path, ) for config_name, config in configs.items() } @@ -1155,7 +1155,7 @@ def test_diffusion_controlnet_stack( @no_grad() -def test_diffusion_sdxl_controllora( +def test_diffusion_sdxl_control_lora( controllora_sdxl_config: tuple[Image.Image, dict[str, ControlLoraResolvedConfig]], sdxl_ddim_lda_fp16_fix: StableDiffusion_XL, ) -> None: