1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-29 07:22:12 +03:00

Fix params replication when using the dummy checker (#602)

Fix params replication when sing the dummy checker.
This commit is contained in:
Pedro Cuenca
2022-09-21 09:38:10 +02:00
committed by GitHub
parent 2345481c0e
commit fb03aad8b4

View File

@@ -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)