Instructions to use microsoft/colipri with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- COLIPRI
How to use microsoft/colipri with COLIPRI:
pip install colipri
from colipri import get_model from colipri import get_processor from colipri import load_sample_ct from colipri import ZeroShotImageClassificationPipeline model = get_model().cuda() processor = get_processor() pipeline = ZeroShotImageClassificationPipeline("microsoft/colipri", processor) image = load_sample_ct() pipeline(image, ["No lung nodules", "Lung nodules"]) - Notebooks
- Google Colab
- Kaggle
Issue with Hydra Configurations
Thanks for releasing this model.
I ran into a Hydra integration issue when using COLIPRI inside a larger application that already uses Hydra. COLIPRI appears to initialize Hydra internally, which conflicts with applications that have already initialized GlobalHydra. Hydra only allows one global initialization at a time, so this causes COLIPRI to fail in embedded/library-style use cases. Hydra’s singleton raises exactly this error when it is already initialized. 
Problem Summary
If an application initializes Hydra and then loads COLIPRI, the following error occurs:
ValueError: GlobalHydra is already initialized, call GlobalHydra.instance().clear() if you want
Attempting to clear Hydra before loading COLIPRI leads to a second error:
hydra.errors.ConfigCompositionException: Error merging 'config.yaml' with schema
This prevents COLIPRI from being used inside new Hydra-based projects. Please let me know if this is just an error from my environment or if there is any workaround!
Hi, @george1254 . Thanks for reporting this. I've released a new version. Could you please upgrade colipri and try again?
works thank you!