Skip to content

pretrained_model Parameter Expected Value Documentation is Unclear #1469

Description

@DarioS

Unclear from help(models.CellposeModel) whether keyword or absolute file path is expected from the user.

__init__(self, gpu=False, pretrained_model='cpsam', ..
    ...                    ...
pretrained_model: Full path to pretrained cellpose model(s), if None or False, no model loaded.

The default value 'cpsam', a keyword and not a path, seems to contradict parameter description. In addition,

>>> models.CellposeModel(pretrained_model='cpdino')
pretrained model /users/stgrad/dario/.cellpose/models/cpsam not found, using default model
$ ls -lh /users/stgrad/dario/.cellpose/models/cpsam
-rw------- 1 dario stgrad 1.2G Jan 15 16:55 /users/stgrad/dario/.cellpose/models/cpsam
>>> print(version("cellpose"))
4.1.1

Error message seems irrelevant to cpdino request and the cpsam file actually exists on disk.

Activity

  1. added a commit that references this issue on Jun 11, 2026
  2. carsen-stringer commented on Jun 11, 2026

    @carsen-stringer
    Member

    Thanks fixed

  3. added a commit that references this issue on Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions