Skip to content

Commit b98d757

Browse files
make dino dependency optional
1 parent 7379cf9 commit b98d757

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

cellpose/models.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
models_logger = logging.getLogger(__name__)
1717

1818
from . import transforms, dynamics, utils, plot
19-
from .vit import CPSAM, CPDINO
19+
from .vit import CPSAM
20+
try:
21+
from .vit import CPDINO
22+
except:
23+
models_logger.warning("Could not import CPDINO, run `pip install cellpose[dino]` to use CPDINO model")
2024
from .core import assign_device, run_net, run_3D
2125

2226
_MODEL_URL = "https://huggingface.co/mouseland/cellpose-sam/resolve/main/"

0 commit comments

Comments
 (0)