We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b59161 commit 40e1af8Copy full SHA for 40e1af8
1 file changed
nemo_export/multimodal/build.py
@@ -21,7 +21,6 @@
21
from time import time
22
from typing import List
23
24
-import tensorrt as trt
25
import torch
26
import yaml
27
from PIL import Image
@@ -35,9 +34,15 @@
35
34
36
from nemo_export.tensorrt_llm import TensorRTLLM
37
from nemo_export.trt_llm.nemo_ckpt_loader.nemo_file import load_nemo_model
+from nemo_export_deploy_common.import_utils import UnavailableError
38
39
from .converter import convert_mllama_nemo_to_hf
40
41
+try:
42
+ import tensorrt as trt
43
+except (ImportError, ModuleNotFoundError) as e:
44
+ raise UnavailableError("tensorrt is not available. Please install it with `pip install nvidia-tensorrt`.") from e
45
+
46
logger = trt.Logger(trt.Logger.INFO)
47
48
0 commit comments