Skip to content

Conversation

@guillemc23
Copy link
Contributor

@guillemc23 guillemc23 commented Sep 19, 2025

Added optional imports, so that the package can be imported in multiple ways without the need to pull all dependencies.

FastSAM is not working because the versions pinned on the package are too old and are not properly loading the model after torch>2.6.0, I will take a look at that package. I believe we should pin all required versions in this package as well to prevent these kind of errors in the future.

@giswqs
Copy link
Member

giswqs commented Sep 19, 2025

@guillemc23 Many thanks for the PR.

One minor change: please revert the hardcoded version change 0.13.0, which will be updated automatically with bumpversion when making a new release.

@guillemc23
Copy link
Contributor Author

@giswqs okay! I wasn't sure what to do with it, I'll put it back to how it was.

I reverted the version both in the pyproject.toml and in __init__.py

@giswqs giswqs merged commit e54c3f0 into opengeos:main Sep 22, 2025
8 checks passed
@guillemc23
Copy link
Contributor Author

guillemc23 commented Sep 22, 2025

Thank you @giswqs!
I believe that in order to make it work for python 3.13+ we would need to fix some issues on how Fast SAM loads the model, since it relies on torch 2.6 and they changed some things on how to load the weights of the model 😄

Also... we might want to add segment-geospatial[all] to other projects that require this package, like geoai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants