Commit 101f208
authored
Fix benchmark_multimodal (#1714)
(1) When I run `python benchmark_multimodal.py -i
/sunghcho_data/onnx_models/whisper-tiny-en/cuda/cuda-fp16/ -au
/home/jiafa/accuracy/open_asr_leaderboard/whisper/data/20090202-0900-PLENARY-9-en_20090202-17\:20\:18_2.wav
-m 448`, the code ` inputs = processor(prompt, images=image,
audios=audio)` has core dump because `strings.size()==0` for `auto shape
= std::array<int64_t, 2>{static_cast<int64_t>(strings.size()),
static_cast<int64_t>(encoded.size() / strings.size())};` in `model.cpp`.
This is because ` WhisperProcessor::Process` only goes through
`EncodeBatch` whereas `payload.prompts={}` when we set up a single audio
there. So for single audio case, we capsulate into `prompts` and then
process.
(2) The code refactoring causes `params.set_inputs(inputs)` no longer
works.1 parent e22739f commit 101f208
1 file changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
165 | | - | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
| |||
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
191 | | - | |
| 192 | + | |
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
197 | | - | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| |||
0 commit comments