From f8df293d2ce0290c7159a8c8432f1054661ef07b Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Mon, 18 Mar 2024 22:44:04 -0400 Subject: [PATCH] Revert "fix(mm): provide ckpt config as stream to diffusers" This reverts commit 9d045964d6d7157fa8162001e1f6badc6fe2ba48. --- .../load/model_loaders/stable_diffusion.py | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/invokeai/backend/model_manager/load/model_loaders/stable_diffusion.py b/invokeai/backend/model_manager/load/model_loaders/stable_diffusion.py index 7fe07cc759..8d0dc90a2d 100644 --- a/invokeai/backend/model_manager/load/model_loaders/stable_diffusion.py +++ b/invokeai/backend/model_manager/load/model_loaders/stable_diffusion.py @@ -79,18 +79,17 @@ class StableDiffusionDiffusersModel(GenericDiffusersLoader): ) self._logger.info(f"Converting {model_path} to diffusers format") - with open(self._app_config.root_path / config_file, "r") as config_stream: - convert_ckpt_to_diffusers( - model_path, - output_path, - model_type=self.model_base_to_model_type[base], - original_config_file=config_stream, - extract_ema=True, - from_safetensors=model_path.suffix == ".safetensors", - precision=self._torch_dtype, - prediction_type=prediction_type, - image_size=image_size, - upcast_attention=upcast_attention, - load_safety_checker=False, - ) + convert_ckpt_to_diffusers( + model_path, + output_path, + model_type=self.model_base_to_model_type[base], + original_config_file=self._app_config.root_path / config_file, + extract_ema=True, + from_safetensors=model_path.suffix == ".safetensors", + precision=self._torch_dtype, + prediction_type=prediction_type, + image_size=image_size, + upcast_attention=upcast_attention, + load_safety_checker=False, + ) return output_path