[GH-ISSUE #2363] [Bug]: macOS setup drops --source; the download-failure hint recommends it, but only STRATA_SOURCE works on a Mac #954

Closed
opened 2026-11-04 01:47:17 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @afanty2021 on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2363

On an Apple Silicon Mac, ./setup.sh failed at the model download because huggingface.co is not reachable from my network. The failure hint says:

  [X]  cannot reach huggingface.co (<urlopen error timed out>)
       check your internet connection and run it again; if huggingface.co does not reach you (mainland
       China), the same files are on ModelScope: run setup with --source modelscope (docs/INSTALL.md)

I ran it again exactly as recommended:

./setup.sh --model Q2_0 --yes --no-start --source modelscope

The flag was silently discarded — the run printed, above its normal output:

  [!]  not used on a Mac: --source modelscope

and then failed with the identical cannot reach huggingface.co error.

What works instead is the environment variable, which setup.py documents for other platforms (--source / STRATA_SOURCE):

STRATA_SOURCE=modelscope ./setup.sh --model Q2_0 --yes --no-start

That downloaded from ModelScope fine.

Why it happens: on macOS, setup.py's main() delegates everything to metal/setup_mac.py (return mac_setup(sys.argv[1:])) before setup.py's own argparse — including its os.environ["STRATA_SOURCE"] = a.source — ever runs. metal/setup_mac.py's parser does not define --source, so parse_known_args moves it into rest and it only gets the not used on a Mac warning. Meanwhile the failure hint (source_hint() in setup.py) recommends --source modelscope unconditionally, which on a Mac is a dead end.

Expected: --source modelscope is accepted on a Mac (setup_mac.py defines it and sets STRATA_SOURCE, mirroring setup.py), or the failure hint tells Mac users the env-var form.

Repro: on an Apple Silicon Mac without reach to huggingface.co:

  1. ./setup.sh --model Q2_0 --yes --no-start → fails, hint recommends --source modelscope
  2. ./setup.sh --model Q2_0 --yes --no-start --source modelscope → [!] not used on a Mac: --source modelscope, same failure
  3. STRATA_SOURCE=modelscope ./setup.sh --model Q2_0 --yes --no-start → downloads from ModelScope

If it helps: a minimal fix is adding ap.add_argument("--source", choices=S.SOURCES) to metal/setup_mac.py's parser and setting os.environ["STRATA_SOURCE"] = a.source from it, and/or making source_hint() print the env-var form on darwin. Your call — you know whether the flag or the env var is the interface you want Mac users on.

(Side note: open issue #1915 covers a different ModelScope rough edge — a truncated shard renamed to its final name. Not the same bug, but both bite on the ModelScope path.)

Originally created by @afanty2021 on GitHub (Oct 14, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/2363 On an Apple Silicon Mac, `./setup.sh` failed at the model download because huggingface.co is not reachable from my network. The failure hint says: ``` [X] cannot reach huggingface.co (<urlopen error timed out>) check your internet connection and run it again; if huggingface.co does not reach you (mainland China), the same files are on ModelScope: run setup with --source modelscope (docs/INSTALL.md) ``` I ran it again exactly as recommended: ``` ./setup.sh --model Q2_0 --yes --no-start --source modelscope ``` The flag was silently discarded — the run printed, above its normal output: ``` [!] not used on a Mac: --source modelscope ``` and then failed with the identical `cannot reach huggingface.co` error. What works instead is the environment variable, which `setup.py` documents for other platforms (`--source / STRATA_SOURCE`): ``` STRATA_SOURCE=modelscope ./setup.sh --model Q2_0 --yes --no-start ``` That downloaded from ModelScope fine. **Why it happens:** on macOS, `setup.py`'s `main()` delegates everything to `metal/setup_mac.py` (`return mac_setup(sys.argv[1:])`) before `setup.py`'s own argparse — including its `os.environ["STRATA_SOURCE"] = a.source` — ever runs. `metal/setup_mac.py`'s parser does not define `--source`, so `parse_known_args` moves it into `rest` and it only gets the `not used on a Mac` warning. Meanwhile the failure hint (`source_hint()` in setup.py) recommends `--source modelscope` unconditionally, which on a Mac is a dead end. **Expected:** `--source modelscope` is accepted on a Mac (setup_mac.py defines it and sets `STRATA_SOURCE`, mirroring setup.py), or the failure hint tells Mac users the env-var form. **Repro:** on an Apple Silicon Mac without reach to huggingface.co: 1. `./setup.sh --model Q2_0 --yes --no-start` → fails, hint recommends `--source modelscope` 2. `./setup.sh --model Q2_0 --yes --no-start --source modelscope` → `[!] not used on a Mac: --source modelscope`, same failure 3. `STRATA_SOURCE=modelscope ./setup.sh --model Q2_0 --yes --no-start` → downloads from ModelScope If it helps: a minimal fix is adding `ap.add_argument("--source", choices=S.SOURCES)` to `metal/setup_mac.py`'s parser and setting `os.environ["STRATA_SOURCE"] = a.source` from it, and/or making `source_hint()` print the env-var form on darwin. Your call — you know whether the flag or the env var is the interface you want Mac users on. (Side note: open issue #1915 covers a different ModelScope rough edge — a truncated shard renamed to its final name. Not the same bug, but both bite on the ModelScope path.)
Author
Owner

@Niko1221 commented on GitHub (Oct 19, 2026):

Thanks for taking the time to report this.

We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6270984744 --> @Niko1221 commented on GitHub (Oct 19, 2026): Thanks for taking the time to report this. We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#954
No description provided.