From 09be4537dbc34cd4be48ac75fa25f7ca15c35b9b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 14 Jun 2026 05:36:53 +0000 Subject: [PATCH] Respect explicit BONSAI_VARIANT in setup.sh binary auto-detection --- setup.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index 397bd91..113a5ec 100755 --- a/setup.sh +++ b/setup.sh @@ -354,9 +354,11 @@ info "mflux installed (versions <= $_pkg_cutoff)." # to swap whenever a 1-bit model is already present under models/. Binary users # who run setup before downloading a model should export BONSAI_VARIANT=binary. _variant="${BONSAI_VARIANT:-ternary}" -for _bin_model in "$SCRIPT_DIR"/models/bonsai-image-4B-binary-*; do - [ -d "$_bin_model" ] && _variant="binary" && break -done +if [ -z "${BONSAI_VARIANT:-}" ]; then + for _bin_model in "$SCRIPT_DIR"/models/bonsai-image-4B-binary-*; do + [ -d "$_bin_model" ] && _variant="binary" && break + done +fi # bf16 GPU-vs-CPU matmul check: exit 0 if the GPU kernel is correct (reldiff # < 0.1), 1 if it's miscompiled (the M5 NAX bug gives reldiff ~1.1).