From fb03aad8b426aefd213f002c3bd3a8bc8bae74ed Mon Sep 17 00:00:00 2001 From: Pedro Cuenca Date: Wed, 21 Sep 2022 09:38:10 +0200 Subject: [PATCH] Fix params replication when using the dummy checker (#602) Fix params replication when sing the dummy checker. --- src/diffusers/pipeline_flax_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diffusers/pipeline_flax_utils.py b/src/diffusers/pipeline_flax_utils.py index e65d95a37f..b7de33d2d5 100644 --- a/src/diffusers/pipeline_flax_utils.py +++ b/src/diffusers/pipeline_flax_utils.py @@ -427,7 +427,7 @@ class FlaxDiffusionPipeline(ConfigMixin): # 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)