"""NEvo custom Diffusers pipeline entry point. Works both when the ``stimulus_synthesis`` package is installed (``pip install``) and, off-the-shelf, when the pipeline is loaded via ``DiffusionPipeline.from_pretrained(repo, custom_pipeline=repo, trust_remote_code=True)`` without installing anything — in that case the package (and its bundled data) is fetched from the Hub and put on the import path. """ try: from stimulus_synthesis.pipeline import NevoPipeline except ModuleNotFoundError: import sys from huggingface_hub import snapshot_download _pkg_root = snapshot_download("epfl-neuroai/NEvo", allow_patterns=["stimulus_synthesis/**"]) if _pkg_root not in sys.path: sys.path.insert(0, _pkg_root) from stimulus_synthesis.pipeline import NevoPipeline __all__ = ["NevoPipeline"]