Skip to content

Commit 5ed9023

Browse files
committed
Filter out azureexecutionprovider when no gpu present
1 parent eda1936 commit 5ed9023

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

backgroundremoval.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,9 @@ def __init__(self, image_paths):
730730
self.settings = QSettings("PricklyGorse", "InteractiveBackgroundRemover")
731731

732732
# --- Hardware Acceleration ---
733-
self.available_providers = ort.get_available_providers()
733+
all_providers = ort.get_available_providers()
734+
# Hide azure showing in the list if the user has no GPU. Extremely unlikely will be used for such a simple app
735+
self.available_providers = [p for p in all_providers if p != 'AzureExecutionProvider']
734736
self.selected_provider = 'CPUExecutionProvider' # Default
735737

736738
self.original_image = None

0 commit comments

Comments
 (0)