fix(mm): regression from change to legacy conf dir change

This commit is contained in:
psychedelicious
2024-03-19 18:12:23 +11:00
parent 040ea8f41b
commit 6c13fa13ea
4 changed files with 11 additions and 13 deletions

View File

@ -35,8 +35,6 @@ class ControlNetLoader(GenericDiffusersLoader):
def _convert_model(self, config: AnyModelConfig, model_path: Path, output_path: Path) -> Path:
assert isinstance(config, CheckpointConfigBase)
config_file = config.config_path
image_size = (
512
if config.base == BaseModelType.StableDiffusion1
@ -46,7 +44,7 @@ class ControlNetLoader(GenericDiffusersLoader):
)
self._logger.info(f"Converting {model_path} to diffusers format")
with open(self._app_config.root_path / config_file, "r") as config_stream:
with open(config.config_path, "r") as config_stream:
convert_controlnet_to_diffusers(
model_path,
output_path,

View File

@ -76,7 +76,6 @@ class StableDiffusionDiffusersModel(GenericDiffusersLoader):
assert isinstance(config, MainCheckpointConfig)
base = config.base
config_file = config.config_path
prediction_type = config.prediction_type.value
upcast_attention = config.upcast_attention
image_size = (
@ -92,7 +91,7 @@ class StableDiffusionDiffusersModel(GenericDiffusersLoader):
model_path,
output_path,
model_type=self.model_base_to_model_type[base],
original_config_file=self._app_config.root_path / config_file,
original_config_file=config.config_path,
extract_ema=True,
from_safetensors=model_path.suffix == ".safetensors",
precision=self._torch_dtype,