Reorder execution providers in model initialization

When TensorRT libraries are missing, forcibly using the TensorRT Execution Provider can crash the entire ComfyUI Python process.
This commit is contained in:
hben35096
2026-09-18 09:07:50 +08:00
committed by GitHub
parent 7b678b401a
commit 5f68ae0de7
+1 -1
View File
@@ -73,7 +73,7 @@ class LS_HumanPartsUltra:
""" """
import onnxruntime as ort import onnxruntime as ort
model = ort.InferenceSession(model_path, providers=['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider']) model = ort.InferenceSession(model_path, providers=['CUDAExecutionProvider', 'CPUExecutionProvider', 'TensorrtExecutionProvider'])
ret_images = [] ret_images = []
ret_masks = [] ret_masks = []
for img in image: for img in image: