diff --git a/onnxslim/third_party/onnx_graphsurgeon/ir/graph.py b/onnxslim/third_party/onnx_graphsurgeon/ir/graph.py index 4d40ea3..7345e07 100644 --- a/onnxslim/third_party/onnx_graphsurgeon/ir/graph.py +++ b/onnxslim/third_party/onnx_graphsurgeon/ir/graph.py @@ -915,6 +915,7 @@ def is_foldable(node): "QuantizeLinear", "DequantizeLinear", "DynamicQuantizeLinear", + "SequenceEmpty", } if node.op in NO_FOLD_OPS: return False diff --git a/onnxslim/third_party/onnx_graphsurgeon/ir/tensor.py b/onnxslim/third_party/onnx_graphsurgeon/ir/tensor.py index 6c1a5fe..b1805d3 100644 --- a/onnxslim/third_party/onnx_graphsurgeon/ir/tensor.py +++ b/onnxslim/third_party/onnx_graphsurgeon/ir/tensor.py @@ -236,7 +236,7 @@ def copy(self): Note: Generally, you should only ever make a copy of a Graph. """ - return Variable(self.name, self.dtype, self.shape) + return Variable(self.name, self.dtype, self.shape, self.type) def __eq__(self, other): """Perform a check to see if two variables are equal."""