mirror of
https://github.com/qdrant/fastembed.git
synced 2026-07-23 11:20:51 -05:00
fix: Pass providers and cuda to multimodal models
This commit is contained in:
@@ -151,7 +151,9 @@ class OnnxMultimodalModel(OnnxModel[T]):
|
||||
if not hasattr(self, "model") or self.model is None:
|
||||
self.load_onnx_model()
|
||||
for batch in iter_batch(documents, batch_size):
|
||||
yield from self._post_process_onnx_text_output(self.onnx_embed_text(batch))
|
||||
yield from self._post_process_onnx_text_output(
|
||||
self.onnx_embed_text(batch, cuda=cuda, providers=providers)
|
||||
)
|
||||
else:
|
||||
if parallel == 0:
|
||||
parallel = os.cpu_count()
|
||||
@@ -228,7 +230,9 @@ class OnnxMultimodalModel(OnnxModel[T]):
|
||||
self.load_onnx_model()
|
||||
|
||||
for batch in iter_batch(images, batch_size):
|
||||
yield from self._post_process_onnx_image_output(self.onnx_embed_image(batch))
|
||||
yield from self._post_process_onnx_image_output(
|
||||
self.onnx_embed_image(batch, cuda=cuda, providers=providers)
|
||||
)
|
||||
else:
|
||||
if parallel == 0:
|
||||
parallel = os.cpu_count()
|
||||
|
||||
Reference in New Issue
Block a user