Skip to content

Commit

Permalink
Fix params replication when using the dummy checker (open-mmlab#602)
Browse files Browse the repository at this point in the history
Fix params replication when sing the dummy checker.
  • Loading branch information
pcuenca authored Sep 21, 2022
1 parent 2345481 commit fb03aad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/diffusers/pipeline_flax_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.P
# make sure we don't initialize the weights to save time
if name == "safety_checker":
loaded_sub_model = DummyChecker()
loaded_params = DummyChecker()
loaded_params = {}
elif from_pt:
# TODO(Suraj): Fix this in Transformers. We should be able to use `_do_init=False` here
loaded_sub_model = load_method(loadable_folder, from_pt=from_pt)
Expand Down

0 comments on commit fb03aad

Please sign in to comment.