diff --git a/saxml/client/cc/sax.cc b/saxml/client/cc/sax.cc index 7e7df51..3285160 100644 --- a/saxml/client/cc/sax.cc +++ b/saxml/client/cc/sax.cc @@ -979,6 +979,7 @@ absl::Status VisionModel::TokenToVideo( char* errMsgStr = nullptr; int errCode = 0; std::vector token_buffers; + token_buffers.reserve(tokens.size()); for (const auto& token : tokens) { token_buffers.push_back( const_cast(reinterpret_cast(&token)));