Conversation
…issing; update models_processor.py to enable model file download functionality.
There was a problem hiding this comment.
Pull request overview
This PR refines environment setup, model loading, drag‑and‑drop behavior, and path handling to improve robustness and usability of the VisoMaster application.
Changes:
- Adjusts
Start.batto explicitly activate thevisomasterConda environment and setKMP_DUPLICATE_LIB_OK. - Re-enables automatic model downloading in
models_processor.load_modelwhen a model file is missing. - Fixes media path handling in
TargetMediaLoaderWorker/InputFacesLoaderWorkerand enables drag‑and‑drop directly on list viewports; updates embedded resources viamedia_rc.py.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Start.bat | Changes environment activation to a hardcoded Miniconda conda.bat path and sets KMP_DUPLICATE_LIB_OK before launching the app. |
| app/processors/models_processor.py | Re-enables on-demand model file download if a model path does not exist before instantiating an ONNX runtime session. |
| app/ui/widgets/ui_workers.py | Simplifies media path handling by iterating directly over absolute paths from helper functions and removing redundant os.path.join for faces. |
| app/ui/main_ui.py | Enables viewport().setAcceptDrops(True) on target and input face list widgets to ensure drops on the list area are handled properly. |
| app/ui/core/media_rc.py | Updates compiled Qt resource binary data to reflect changes in embedded assets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| call conda activate visomaster | ||
| @echo off | ||
| call "%USERPROFILE%\miniconda3\condabin\conda.bat" activate visomaster |
There was a problem hiding this comment.
Hardcoding the Conda activation script path to %USERPROFILE%\miniconda3\condabin\conda.bat makes this launcher brittle for users who installed Miniconda/Conda in a non-default location or are using Anaconda, which will cause environment activation (and thus app startup) to fail. Consider resolving conda.bat via %PATH%, using %CONDA_PREFIX%/%CONDA_EXE%, or adding a small detection/fallback mechanism so the script works across different Conda installations.
This pull request introduces several improvements and fixes across the project, focusing on environment setup, model loading, drag-and-drop UI behavior, and file handling logic. The key updates ensure smoother user experience, more robust model management, and correct file path handling.
Environment and Dependency Setup:
Start.batto ensure the correct activation of thevisomasterConda environment, explicitly calling the Conda batch script and setting an environment variable to prevent library conflicts.Model Loading Improvements:
models_processor.pyif the required model file does not exist, improving robustness for new or missing models.UI Drag-and-Drop Enhancements:
main_ui.pyto allow drag-and-drop actions directly on theviewport()oftargetVideosListandinputFacesList, fixing issues where drops on the list area were previously ignored.File Handling and Worker Logic Fixes:
ui_workers.pyto correctly handle file paths when loading videos and images from a folder, ensuring that the full path is used and avoiding double-joining of paths. [1] [2]Resource File Update:
media_rc.py, reflecting changes to embedded a variety of resources.