You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i run command: python export_df_onnx.py
got error:
Traceback (most recent call last):
File "export_df_onnx.py", line 136, in
width=512,
File "export_df_onnx.py", line 115, in convert_to_onnx
text_encoder, check_inputs[0], check_inputs=[check_inputs[1]], strict=False
File "/home/lingbao/.local/lib/python3.7/site-packages/torch/jit/_trace.py", line 750, in trace
_module_class,
File "/home/lingbao/.local/lib/python3.7/site-packages/torch/jit/_trace.py", line 965, in trace_module
argument_names,
File "/home/lingbao/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/lingbao/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1090, in _slow_forward
result = self.forward(*input, **kwargs)
File "/home/lingbao/.local/lib/python3.7/site-packages/transformers/models/clip/modeling_clip.py", line 728, in forward
return_dict=return_dict,
File "/home/lingbao/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/lingbao/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1090, in _slow_forward
result = self.forward(*input, **kwargs)
File "/home/lingbao/.local/lib/python3.7/site-packages/transformers/models/clip/modeling_clip.py", line 637, in forward
causal_attention_mask = self._build_causal_attention_mask(bsz, seq_len).to(hidden_states.device)
TypeError: _build_causal_attention_mask() missing 1 required positional argument: 'dtype'
if i add this argument by this(line 115):
text_encoder, check_inputs[0], check_inputs=[check_inputs[1]],dtype=torch.int32, strict=False
then another error come "TypeError: trace() got an unexpected keyword argument 'dtype'"
maybe conflict version of transformers, my env: transformers==4.19.2
The text was updated successfully, but these errors were encountered:
when i run command: python export_df_onnx.py
got error:
Traceback (most recent call last):
File "export_df_onnx.py", line 136, in
width=512,
File "export_df_onnx.py", line 115, in convert_to_onnx
text_encoder, check_inputs[0], check_inputs=[check_inputs[1]], strict=False
File "/home/lingbao/.local/lib/python3.7/site-packages/torch/jit/_trace.py", line 750, in trace
_module_class,
File "/home/lingbao/.local/lib/python3.7/site-packages/torch/jit/_trace.py", line 965, in trace_module
argument_names,
File "/home/lingbao/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/lingbao/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1090, in _slow_forward
result = self.forward(*input, **kwargs)
File "/home/lingbao/.local/lib/python3.7/site-packages/transformers/models/clip/modeling_clip.py", line 728, in forward
return_dict=return_dict,
File "/home/lingbao/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/lingbao/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1090, in _slow_forward
result = self.forward(*input, **kwargs)
File "/home/lingbao/.local/lib/python3.7/site-packages/transformers/models/clip/modeling_clip.py", line 637, in forward
causal_attention_mask = self._build_causal_attention_mask(bsz, seq_len).to(hidden_states.device)
TypeError: _build_causal_attention_mask() missing 1 required positional argument: 'dtype'
if i add this argument by this(line 115):
text_encoder, check_inputs[0], check_inputs=[check_inputs[1]],dtype=torch.int32, strict=False
then another error come "TypeError: trace() got an unexpected keyword argument 'dtype'"
maybe conflict version of transformers, my env: transformers==4.19.2
The text was updated successfully, but these errors were encountered: