Skip to content

Using local models on filesystem#39

Open
servantftransperfect wants to merge 1 commit intoParskatt:mainfrom
servantftransperfect:dev/localModels
Open

Using local models on filesystem#39
servantftransperfect wants to merge 1 commit intoParskatt:mainfrom
servantftransperfect:dev/localModels

Conversation

@servantftransperfect
Copy link
Copy Markdown

@servantftransperfect servantftransperfect commented Feb 10, 2026

Following #32

This pull request introduces enhancements to the configuration and loading of model weights and modules, making the codebase more flexible for local development and custom weight loading. The key changes allow specifying a local module directory and custom weights, improving usability in distributed or offline environments.

Configuration and local module loading:

  • Added a new module_path attribute to the Cfg class in src/romav2/features.py, allowing users to specify a local directory for module loading instead of always pulling from GitHub.
  • Updated the torch.hub.load calls for both DINOv3 and DINOv2 models to use the local module_path and set the source parameter accordingly, enabling seamless switching between remote and local sources. [1] [2]

Custom weights handling:

  • Introduced a weights attribute in the Cfg class in src/romav2/romav2.py to support passing custom weights directly.
  • Modified the model initialization logic to use the provided custom weights if available; otherwise, it defaults to downloading the weights from the specified URL.

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.

1 participant