Skip to content

Commit 025a18e

Browse files
committed
Pass file path for non-.pb model checks
Ensure model_check_path is set for non-.pb selections before calling DLCLiveProcessor.get_model_backend. .pb files still use the parent directory (TensorFlow expectation); other file types now pass the file path itself to avoid using an undefined or incorrect path.
1 parent 559c775 commit 025a18e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

dlclivegui/gui/main_window.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,8 @@ def _action_browse_model(self) -> None:
10071007
if file_path.suffix == ".pb":
10081008
# For TensorFlow, DLCLive expects a directory, so we pass the parent directory for validation
10091009
model_check_path = file_path.parent
1010+
else:
1011+
model_check_path = file_path
10101012
DLCLiveProcessor.get_model_backend(str(model_check_path))
10111013
except FileNotFoundError as e:
10121014
QMessageBox.warning(self, "Model selection error", str(e))

0 commit comments

Comments
 (0)