remove use of original_config_file in load_single_file()

This commit is contained in:
Lincoln Stein
2024-06-20 21:21:21 -04:00
parent b0574f85bc
commit 5c8cf991a9
3 changed files with 0 additions and 7 deletions

View File

@@ -31,9 +31,7 @@ class ControlNetLoader(GenericDiffusersLoader):
if isinstance(config, ControlNetCheckpointConfig):
return ControlNetModel.from_single_file(
config.path,
config=self._app_config.legacy_conf_path / config.config_path,
torch_dtype=self._torch_dtype,
local_files_only=True,
)
else:
return super()._load_model(config, submodel_type)

View File

@@ -105,7 +105,6 @@ class StableDiffusionDiffusersModel(GenericDiffusersLoader):
load_class = load_classes[config.base][config.variant]
except KeyError as e:
raise Exception(f"No diffusers pipeline known for base={config.base}, variant={config.variant}") from e
original_config_file = self._app_config.legacy_conf_path / config.config_path
prediction_type = config.prediction_type.value
upcast_attention = config.upcast_attention
@@ -120,9 +119,7 @@ class StableDiffusionDiffusersModel(GenericDiffusersLoader):
with SilenceWarnings():
pipeline = load_class.from_single_file(
config.path,
config=original_config_file,
torch_dtype=self._torch_dtype,
local_files_only=True,
prediction_type=prediction_type,
upcast_attention=upcast_attention,
load_safety_checker=False,

View File

@@ -30,9 +30,7 @@ class VAELoader(GenericDiffusersLoader):
if isinstance(config, VAECheckpointConfig):
return AutoencoderKL.from_single_file(
config.path,
config=self._app_config.legacy_conf_path / config.config_path,
torch_dtype=self._torch_dtype,
local_files_only=True,
)
else:
return super()._load_model(config, submodel_type)