Closed limaopeng1 closed 3 months ago
用的也是microsoft/trocr-small-stage1,图片是UniMER-Test/cpe/0000000.png
测试generate的耗时,先让模型跑了几次,然后才计算这张图片的推理耗时,这张图片的耗时是2s左右,和UniMERNet差不多,但UniMERNet毕竟是一个差不多4G的模型,这是哪里有问题吗? s3 = time.perf_counter() generated_ids = model.generate(pixel_values) s4 = time.perf_counter()
UniMERNet用的是这个模型:https://huggingface.co/wanderkid/PDF-Extract-Kit/tree/main/models/MFR/UniMERNet 同张图片耗时大概是2.8s
你测的那个?我用的是
microsoft/trocr-small-stage1