File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1128,7 +1128,11 @@ def onnx_export_from_model(
1128
1128
1129
1129
if check_if_transformers_greater ("4.44.99" ):
1130
1130
misplaced_generation_parameters = model .config ._get_non_default_generation_parameters ()
1131
- if isinstance (model , GenerationMixin ) and len (misplaced_generation_parameters ) > 0 :
1131
+ if (
1132
+ isinstance (model , GenerationMixin )
1133
+ and model .can_generate ()
1134
+ and len (misplaced_generation_parameters ) > 0
1135
+ ):
1132
1136
logger .warning (
1133
1137
"Moving the following attributes in the config to the generation config: "
1134
1138
f"{ misplaced_generation_parameters } . You are seeing this warning because you've set "
Original file line number Diff line number Diff line change @@ -602,6 +602,7 @@ def test_diffusion(self):
602
602
check = True ,
603
603
)
604
604
605
+ @require_sentence_transformers
605
606
def test_sentence_transformers (self ):
606
607
with TemporaryDirectory () as tmpdirname :
607
608
subprocess .run (
You can’t perform that action at this time.
0 commit comments