Skip to content

Commit

Permalink
safety checker not a submodel
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Nov 4, 2024
1 parent fa6ca3e commit 96a5787
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions optimum/intel/openvino/modeling_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 96a5787

Please sign in to comment.