Commit 40e28e8b authored by Patrick von Platen's avatar Patrick von Platen
Browse files

only remove module if necessary

parent fc596c86
...@@ -86,7 +86,7 @@ class DiffusionPipeline(ConfigMixin): ...@@ -86,7 +86,7 @@ class DiffusionPipeline(ConfigMixin):
model_index_dict = dict(self.config) model_index_dict = dict(self.config)
model_index_dict.pop("_class_name") model_index_dict.pop("_class_name")
model_index_dict.pop("_diffusers_version") model_index_dict.pop("_diffusers_version")
model_index_dict.pop("_module") model_index_dict.pop("_module", None)
for pipeline_component_name in model_index_dict.keys(): for pipeline_component_name in model_index_dict.keys():
sub_model = getattr(self, pipeline_component_name) sub_model = getattr(self, pipeline_component_name)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment