diff --git a/services/lora-training-worker/tests/test_invocation.py b/services/lora-training-worker/tests/test_invocation.py index d79052a..bd5e866 100644 --- a/services/lora-training-worker/tests/test_invocation.py +++ b/services/lora-training-worker/tests/test_invocation.py @@ -100,6 +100,15 @@ def test_base_model_outside_allowed_roots_rejected(): build_command(_req(base_model_path="/home/someone/evil.safetensors")) +def test_storetank_checkpoint_allowed(): + # the canonical SDXL store (2026-06-13 move) — arbo dispatches base_model_path from here + argv, _, _ = build_command( + _req(base_model_path="/storetank/arbo/models/checkpoints/albedobaseXL_v31Large.safetensors") + ) + assert _flag_value(argv, "--pretrained_model_name_or_path") == \ + "/storetank/arbo/models/checkpoints/albedobaseXL_v31Large.safetensors" + + def test_unsafe_output_name_rejected(): with pytest.raises(InvalidTrainRequest, match="output_name"): build_command(_req(output_name="a; rm -rf /")) diff --git a/services/lora-training-worker/worker/config.py b/services/lora-training-worker/worker/config.py index fd1ff00..0127bb8 100644 --- a/services/lora-training-worker/worker/config.py +++ b/services/lora-training-worker/worker/config.py @@ -34,12 +34,19 @@ SDXL_TRAIN_SCRIPT = SD_SCRIPTS_DIR / "sdxl_train_network.py" # dataset_dir + output_dir MUST live under the shared handoff root (the group-shared, # setgid /worktank/arbo/train that both arbo-container-uid and llmuser can rw). base_model # must live under a known model root. Anything else → rejected before a process is spawned. +# base_model must be an absolute HOST path (the worker runs on the host, not in arbo's +# container — a container-internal path like /comfy/... or /basedir/... won't match). +# /storetank/arbo/models — canonical model store (SDXL checkpoints; the 2026-06-13 move +# to the 1.8TB /storetank volume; arbo mounts it → /basedir/models inside its container). +# /opt/fluxgym/models — fluxgym base models (flux; Phase 4). +# /worktank/arbo — handoff root (a base staged into the handoff, if ever). +# (Dropped the pre-move /worktank/models [gone] + /worktank/comfyui [empty host path] roots.) HANDOFF_ROOT = Path(os.environ.get("LORA_WORKER_HANDOFF_ROOT", "/worktank/arbo/train")) ALLOWED_MODEL_ROOTS = tuple( Path(p) for p in os.environ.get( "LORA_WORKER_MODEL_ROOTS", - "/opt/fluxgym/models:/worktank/comfyui:/worktank/models:/worktank/arbo", + "/storetank/arbo/models:/opt/fluxgym/models:/worktank/arbo", ).split(":") if p )