Repository navigation
Report DINO import failures before checkpoint downloads - #1503
Open
sylvesterkaczmarek wants to merge 2 commits into
Open
sylvesterkaczmarek wants to merge 2 commits into
sylvesterkaczmarek wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1476 and #1474.
Load DINOv3 only when a DINO model is requested. Missing or broken imports now raise an actionable
ImportErrorwith the README installation command and the original exception as its cause, instead of leaving undefined factory names. Built-incpdinoandcpdino-vitbselections check the dependency before creating the cache or downloading weights. Direct construction and local DINO checkpoints receive the same guidance; CPSAM and unrelated utilities do not require DINO.This improves dependency handling and avoids wasted downloads. DINOv3 still needs to be installed separately. No model architecture or segmentation algorithm is changed.
Validation
--runslow: 31 passed and one existing CUDA-only skip, with unchanged candidate hashes.The full model/data-dependent suite, end-to-end segmentation, native GUI and Windows/CUDA execution were not tested.
Follow-up repair and verification
A follow-up fixes the GUI dropdown route so known CPDINO models check DINOv3 dependencies before cache directory creation or checkpoint download. Two GUI regressions failed before the follow-up; after repair, all 21 focused tests passed, including all 13 prior dependency tests. This verifies GUI path selection with controlled cache/download boundaries, without loading pretrained weights or executing full GUI inference.
Contribution-policy disclosure
This implementation was prepared with coding-agent assistance. Cellpose CONTRIBUTING.md asks contributors to write implementations themselves rather than use AI agents. An explicit maintainer exception is needed to accept this assisted work; none is established. Human review and complete model-dependent slow-suite validation remain pending.