Upload ./README.md with huggingface_hub
Browse files33 unmodified lines343536373839401 unmodified line4243444546474849505152535455565758591 unmodified line6162636465666768693 unmodified lines73747576777833 unmodified lines### 2. Install the TensorRT dependencies.```shellsh trt/install.sh```### 3. Build the TensorRT engine.1 unmodified line#### Method 1: Use the prebuilt engineWe provide some prebuilt TensorRT engines.| Supported GPU | Download Link | Remote Path ||:----------------:|:---------------------------------------------------------------------------------------------------------------:|:---------------------------------:|| GeForce RTX 3090 | [HuggingFace](https://huggingface.co/Tencent-Hunyuan/TensorRT-engine/blob/main/engines/RTX3090/model_onnx.plan) | `engines/RTX3090/model_onnx.plan` || GeForce RTX 4090 | [HuggingFace](https://huggingface.co/Tencent-Hunyuan/TensorRT-engine/blob/main/engines/RTX4090/model_onnx.plan) | `engines/RTX4090/model_onnx.plan` || A100 | [HuggingFace](https://huggingface.co/Tencent-Hunyuan/TensorRT-engine/blob/main/engines/A100/model_onnx.plan) | `engines/A100/model_onnx.plan` |Use the following command to download and place the engine in the specified location.```shellhuggingface-cli download Tencent-Hunyuan/TensorRT-engine <Remote Path> --local-dir ./ckpts/t2i/model_trt/engine```#### Method 2: Build your own engine1 unmodified lineIf you are using a different GPU, you can build the engine using the following command.```shell# Set the TensorRT build environment variables first. We provide a script to set up the environment.source trt/activate.sh# Build the TensorRT engine. By default, it will read the `ckpts` folder in the current directory.sh trt/build_engine.sh```3 unmodified lines### 4. Run the inference using the TensorRT model.```shell# Run the inference using the prompt-enhanced model + HunyuanDiT TensorRT model.python sample_t2i.py --prompt "渔舟唱晚" --infer-mode trt33 unmodified lines34353637383940414243441 unmodified line464748495051525354555657585960616263646566671 unmodified line6970717273743 unmodified lines78798081828384858633 unmodified lines### 2. Install the TensorRT dependencies.```shell# Extract and install the TensorRT dependencies.sh trt/install.sh# Set the TensorRT build environment variables. We provide a script to set up the environment.source trt/activate.sh```### 3. Build the TensorRT engine.1 unmodified line#### Method 1: Use the prebuilt engineWe provide some prebuilt TensorRT engines, which need to be downloaded from Huggingface.| Supported GPU | Remote Path ||:----------------:|:---------------------------------:|| GeForce RTX 3090 | `engines/RTX3090/model_onnx.plan` || GeForce RTX 4090 | `engines/RTX4090/model_onnx.plan` || A100 | `engines/A100/model_onnx.plan` |Use the following command to download and place the engine in the specified location.*Note: Please replace `<Remote Path>` with the corresponding remote path in the table above.*```shellexport REMOTE_PATH=<Remote Path>huggingface-cli download Tencent-Hunyuan/TensorRT-engine ${REMOTE_PATH} ./ckpts/t2i/model_trt/engine/ln -s ${REMOTE_PATH} ./ckpts/t2i/model_trt/engine/model_onnx.plan```#### Method 2: Build your own engine1 unmodified lineIf you are using a different GPU, you can build the engine using the following command.```shell# Build the TensorRT engine. By default, it will read the `ckpts` folder in the current directory.sh trt/build_engine.sh```3 unmodified lines### 4. Run the inference using the TensorRT model.```shell# Important: If you have not activated the environment, please run the following command.source trt/activate.sh# Run the inference using the prompt-enhanced model + HunyuanDiT TensorRT model.python sample_t2i.py --prompt "渔舟唱晚" --infer-mode trt
README.md+19-11