#!/usr/bin/env python3 """Launch Diffusion Miner from this repo or a Hugging Face snapshot.""" from __future__ import annotations import runpy import sys from pathlib import Path def _prepare_path() -> None: here = Path(__file__).resolve().parent for candidate in (here, here.parent / "src"): if (candidate / "livediffusion" / "infer_mining.py").exists(): sys.path.insert(0, str(candidate)) return raise FileNotFoundError("Could not find the livediffusion package next to this script.") if __name__ == "__main__": _prepare_path() runpy.run_module("livediffusion.infer_mining", run_name="__main__")