From 96a57870b0657d3d1e5c26910c1c4937d88002da Mon Sep 17 00:00:00 2001 From: IlyasMoutawwakil Date: Mon, 4 Nov 2024 11:23:37 +0100 Subject: [PATCH] safety checker not a submodel --- optimum/intel/openvino/modeling_diffusion.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/optimum/intel/openvino/modeling_diffusion.py b/optimum/intel/openvino/modeling_diffusion.py index 18d8a75061..d96a98f15b 100644 --- a/optimum/intel/openvino/modeling_diffusion.py +++ b/optimum/intel/openvino/modeling_diffusion.py @@ -409,11 +409,9 @@ def _from_pretrained( "tokenizer_2": None, "tokenizer_3": None, "feature_extractor": None, - "image_encoder": None, - "safety_checker": None, } for name in submodels.keys(): - if kwargs.get(name) is not None: + if name in kwargs: submodels[name] = kwargs.pop(name) elif config.get(name, (None, None))[0] is not None: library_name, library_classes = config.get(name)